fix(libScePlayGo): take the chunk set from sce_sys/playgo-chunk.dat #3435
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/3435"
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 alfalfa-star on 2026-10-11T10:31:23Z.
What
Since #3238, a dump without
playgo-chunkdefs.xmlaccepts every chunk id. Unreal Engine 4 titles find their chunks by callingscePlayGoGetLocusfor ids 0, 1, 2, ... until it returnsSCE_PLAYGO_ERROR_BAD_CHUNK_ID(0x80B2000C). That error never comes now, so the loop never ends.Title: RIDE 4 (PPSA01599, UE4) on main
8ec0e131adds a chunk entry on every pass of that loop, on the main thread during engine pre-init. It stops a few seconds in, before any window, with:Under gdb, the loop is a virtual call per chunk index at
app.elf+0x254f73f. That call returns 0 (stop) only whenscePlayGoGetLocusreturns0x80B2000C. Its loop counter is anintwhile the chunk ids areuint16_t, so it wraps and never ends.Fix
PS5 dumps do carry the package's chunk table:
sce_sys/playgo-chunk.dat, magicplgx. The 16-bit value at offset 0x0A is the chunk count. In four dumps, exactly that many 0x20-byte chunk entries follow from offset 0x100, and the field at 0x10 is the file size:The chunk set is now taken from these sources, in order:
playgo-chunkdefs.xml, unchanged.sce_sys/playgo-chunk.dat: ids 0 to count - 1 are valid, everything else returnsBAD_CHUNK_ID, andscePlayGoGetChunkIdreports the same set.The comment block above the chunk table described only the XML source, so it is removed. The TechnicalDebt entry now says where the set comes from and what is assumed about the
plgxformat.Tested
Linux (Arch), GCC, Release, on main
99c1c263.guest_playgogets a new case. A child process runs from a root whoseapp0/sce_sys/playgo-chunk.datdeclares 3 chunks:{1, 3}returns0x80B2000C;scePlayGoGetChunkIdcounts 3.selecton stdin, #2811) gets past pre-init. It renders the Unreal Engine logo and the legal screen, then stops at a #2548 shader.tools/check_conventions.pypasses.Checklist
main; no other open PR implements the same functionsNotImplemented_nid_no_patch); silent stubs are listed in TechnicalDebt.mdfiles or images added to the repository (attach them to this PR)🤖 Generated with Claude Code
Imported from boykopovar/AnyPS5. Originally posted by adriadam10 on 2026-10-11T10:36:19Z.
Checked build and ctest (libs/PlayGo, 19 tests) on the PR merged onto main, and that
guest_playgofails without the change and passes with it. Thechunk_countoffset (0x0A) matches the PlayGo header layout in shadPS4. Assumption of contiguous ids is recorded in TechnicalDebt; merging.Imported from boykopovar/AnyPS5. Originally posted by Tamalero on 2026-10-11T21:48:36Z.
Checked on Guardians of the Galaxy (PPSA01748): it keeps working. Its dump has neither
sce_sys/playgo-chunk.datnorplaygo-chunkdefs.xml, onlysce_sys/playgo-scenario.json. SoReadPackageChunksreturns false, the table stays undefined, and every chunk id is accepted as with #3238. The same holds for my Ratchet & Clank: Rift Apart (PPSA01474) and High on Life (PPSA15388) dumps, which have neither file either.Run check:
libScePlayGo.prxbuilt frommaincbd98bbd, swapped into my otherwise unchanged build. Guardians passes its chunk queries (ids 1-10) and renders to frame 1441 (one run). Without #3238 it stalls before the loading screen.So for these three dumps the new path is never taken. I couldn't test the
plgxtable itself, since none of them has one.Tested and written by Claude (AI assistant) on a contributor's machine.
Imported from boykopovar/AnyPS5. Originally posted by xXPBSXx on 2026-10-12T13:30:42Z.
The change is now open as https://github.com/boykopovar/AnyPS5/pull/4491 (ids below 256 accepted without a chunk table; Sifu, Demon Slayer and Returnal numbers in its description). The chunk count read from
playgo-chunk.dat(#3435) and the Guardians case of #3238 (ids 1 to 10) are unchanged.AI-assisted (Claude Code).