fix(libScePlayGo): read the chunk count of a PS4 plgo chunk table #8079
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/8079"
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 savvaniss on 2026-10-19T20:13:27Z.
What
scePlayGoreadsce_sys/playgo-chunk.datonly when it starts with the PS5 magicplgx, so every PS4 title that ships a chunk table threw "is not a chunk table this library reads". A PS4 table starts withplgoinstead. Up to the chunk count the two headers have the same layout: a 32-bit magic, then 16-bit version major, version minor, image count and chunk count. So the count is the little-endian 16-bit word at 0x0A in both, whereReadPackageChunksalready reads it. The PS4 layout is the one in shadPS4'splaygo_chunk.h(PLAYGO_MAGIC = 0x6F676C70, then theu16fields in that order).The table is now read for either magic. A zero chunk count is still refused, and the message names both magics.
GuestPlayGoruns the package-table layout with aplgoheader (3 chunks: ids 0 to 2 are local, 3 is a bad chunk id). It also checks that aplgoheader with no chunks is refused like any unreadable table.Tested
Windows 11 Pro 26300, WinLibs GCC 15.2.0 r7, Release,
maine80325a4c.mainguest_playgoplgolayout:expected a plgx header with a nonzero chunk countguest_playgo_dialogA PS4 dump (my own) of CUSA03312 has a
playgo-chunk.datwhose header readsplgo, version 0.0, 1 image, 1 chunk, 1 mchunk, 2 scenarios. With this change, the converted Risk from that package reads it and gets pastscePlayGo, on a local stack with #6977's PS4 path.tools/check_conventions.py --base origin/mainpasses.tools/pr_overlap.pylists only #6044, which shares the test file but conflicts withmain, so it could not be compared; it does not touch these lines.Checklist
main; no other open PR implements the same functionsNotImplemented_nid_no_patch); silent stubs are listed under Silent stubs in their library's technical debt file.mdfiles or images added to the repository (attach them to this PR)🤖 Generated with Claude Code
Imported from boykopovar/AnyPS5. Originally posted by github-actions[bot] on 2026-10-19T20:24:33Z.
Some comparisons could not be completed because a pull request conflicts with the base branch. Review these shared files manually before concluding that there is no overlap.
core/libs/tests/GuestPlayGo.cppImported from boykopovar/AnyPS5. Originally posted by wachi35676 on 2026-10-19T22:26:52Z.
Linux run (the description has Windows only): WSL Ubuntu 24.04, GCC 13.3, Release, BUILD_TESTING=ON, this PR merged onto
main9127ea36d.guest_playgoandguest_playgo_dialogpass 3/3.libScePlayGo/Export.cppfrommain, new test kept):guest_playgoaborts,guest_playgo_dialogpasses.guest_playgo(0xc0000409).The offset matches shadPS4's
playgo_chunk.h:PLAYGO_MAGIC = 0x6F676C70("plgo" little-endian), thenu16 version_major, version_minor, image_count, chunk_count, sochunk_countis at 0x0A.AI-assisted: yes (Claude Code); results above were run on this machine.