AGC: Killzone: Liberation (PPSA11142) stops on WRITE_DATA register or GDS destination is not implemented for its frame fence; fix branch ready #3534
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Imported from boykopovar/AnyPS5. Originally posted by Mouad-Scriptz-0 on 2026-10-11T12:38:01Z.
Killzone: Liberation (PPSA11142 01.000.004, Sony's PSP emulator wrapper, Linux) gets past start-up with #1693 (
sceRazorCpuNamedSync, its first stop onmain) and #3428 (sceKernelOpen(""), its second), reachesOnGameStart, and then stops at its first frame:The packet is
c0030037 06100300 7dffe520 00000002 00000000: DST_SEL 3, WR_CONFIRM, cache policy 3, one dword of 0 to0x27dffe520, which is a label the title carves out of its own command-buffer memory. Its code at0xe8483(and a second copy at0x44fe7f) callsWith a
fprintfinCommand::WriteDatathe title issues this call ~50 times per second (2045 in 40 s), plusdst 4, cachePolicy 0for two-dword data writes (1022). The graphics encoding((dst & 1) << 30) | ((dst & 0x1e) << 7)is the one OpenAGC marks SPRX-confirmed, so the console receives the same DST_SEL 3 packet, and the title would wait on its own fence forever unless the console writes that label. AMD's GFX10 header (nvd.h) names DST_SEL 3 the GDS; a 40-bit address in the title's memory cannot be a GDS offset (the GDS is 64 KiB). For comparison, Middle Ages Ping Pong (PPSA28319, Unity) passesdst 4in all 32 of itssceAgcDcbWriteDatacalls, including its fences with cache policy 3, and runs onmain.Fix branch ready:
Mouad-Scriptz-0:feat/agc-write-data-dst3(9c53b7f6, one commit onmain0f863c10). I cannot open it as a PR because of the intake check; anyone eligible is welcome to carry it, keeping the commit as is (#3433 carried mytruncatethis way). No open PR touches the WRITE_DATA destination (tools/pr_overlap.py --branchreports no overlap).Validateaccepts DST_SEL 3 next to 1, 2 and 5;ExecuteandDecodeLabelWritealready treat every accepted destination as a memory write, so nothing else changes. A register destination (0) still throws.agc_driver_pm4gains: a DST_SEL 3 write lands in guest memory, a one-dword DST_SEL 3 write resolves as a label, and DST_SEL 0 is still refused.Result. With #1693, #3428 and this branch merged locally, the title runs for the full 120 s of a sandboxed run with no exception (4899 log lines,
OnGameStart,sceDisplaySetMode 480x272, continuous frames) and shows its controls screen at 49 fps; onmain+ #1693 + #3428 it dies at DWORD 248 of its first submission every time. The fourstorage image multisampling is unavailable on the target deviceshaders are an Intel driver limit, not this change.Its next stop, past this branch: pressing START saves the wrapper's settings, mounts the disc (
sceUmdActivate(1, disc0:)), loadsUCUS98646#v1.00/vms/GAME/UCUS98646/KZL.PRX, and the first frame of the PSP game itself stops in the graphics driver:(
ShaderInputState.cpp:197, a vertex shader with a vertex attribute table whose vertex buffer table user SGPRs hold 0.) No open PR or issue mentions it. Separately, with Noto fonts inanyps5-fonts/the controls screen's text reachessceFontCharacterGetSyllableStringState(the stub #2497 implemented; reported there) and thensceFontWritingLineWritesOrder: writing attribute 2147483898 is not modelled; without fonts the text is blank and the title runs.Tested on Fedora 44 (kernel 7.2.8, GCC 16.2.1, Ninja, Release, full build with
BUILD_TESTING=ON, Intel Arc Meteor Lake iGPU, Mesa 26.2.3):agc_driver_pm4passes.ctest -j4 --timeout 120without the sevenagc_driver_*tests that fail the same way on a cleanmainbuild on this iGPU (f64_fma_subnormals,vop1_float_unary,vopc_compare,prepared_shaders,prepared_shaders_indirect,prepared_shaders_uncached,prepared_shaders_debug): 822/822, Vulkan tests included;agc_driver_flat_storeandagc_driver_global_vcc_baseneed 102 s and 77 s alone here and pass.tools/check_conventions.py --base origin/mainandgit diff --checkpass.eboot.binandsce_module/libc.prxunwrapped from their SELF containers,relinker --registry,tools/import_audit.py: one absent import (sceRazorCpuNamedSync, #1693), three stubs not reached. Not tested on Windows.AI-assisted: yes (Claude Code).
Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-11T12:42:37Z.
Carried the fix into PR #3539, preserving Mouad's commit authorship. On current
main, the full Linux Release build passed andagc_driver_pm4passed three consecutive runs. PR CI is queued; the issue reporter's Fedora/Intel Arc title run is recorded separately in the PR description.Imported from boykopovar/AnyPS5. Originally posted by Mouad-Scriptz-0 on 2026-10-11T13:02:17Z.
Follow-up on the stop after this branch, with the registers. Second run (same Fedora 44 / Intel Arc setup,
main0f863c10+ #1693 + #3428 + this branch): the wrapper's settings were already in save data, so it skips the controls screen, starts the PSP game ((AppEmu) RUNNING,sceUmdActivate(1, disc0:), loadsKZL.PRX) and stops on its first frame:(
[vb-table]is a local diagnostic inShaderInputState.cppprinting the decoded direct-resource registers and the 16 user SGPRs at the throw.) The shader header places the vertex buffer table at user SGPRs 4-5 and the attribute table at 6-7, but SGPRs 0-6 are zero and the pointer-like pairs sit from SGPR 8 (7efff390 00100002,7effe190 00000002), the samelo, hi|0x00100000shape the title writes withSET_SH_REGat offset 0x8c on its controls screen. So the table the driver looks for is four registers lower than where the title put its data, or this shader's ABI is one the decoder does not model. I also checked the SET_*_REG_INDIRECT snapshot theory from TechnicalDebt with a diagnostic that re-reads every indirect list at execution and compares: no list changed between submission and execution in this run, so it is not that.I have not gone further; it needs someone who knows the shader ABI decoding. AI-assisted: yes (Claude Code).
Imported from boykopovar/AnyPS5. Originally posted by blawesom on 2026-10-11T13:08:55Z.
Independent verification on Linux: CachyOS, kernel 7.2.9, GCC 16.2.1, Ninja, Release,
BUILD_TESTING=ON.9c53b7f6onto currentmain: applies cleanly, no conflicts.tools/check_conventions.py --base origin/mainandgit diff --checkpass.The rebased branch is available at
blawesom:verify/3534for anyone carrying — the commit is otherwise unchanged.