playgo: answer chunks of an unknown chunk table as installed #2538
No reviewers
Labels
No labels
bug
documentation
duplicate
enhancement
GPU
GUI
help wanted
question
Shaders
Video
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/KytyPS5--KytyPS5!2538
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-2538"
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?
@Nawid3333 on GitHub · 2026-11-24 07:09 UTC · original
Nawid3333:fix/playgo-unknown-chunk-table→main· +45 −6 · 2 files · 1 commits · openCrimson Desert (#2321) has no PlayGo chunk table in its dump:
sce_sys/playgo-chunk.dat,playgo-chunkdefs.xmlandData/chunkmanifestare all missing. Sincee4cc27d11such a package counts as one chunk, so every id from 1 up getsPLAYGO_ERROR_BAD_CHUNK_ID. OnKytyPS5-2026-11-17-2638b1bthe game reads its ownpackages/meta/0.papgt, asksPlayGoGetLocusfor chunk 1, opens a message dialog and returns -1 from main. OnKytyPS5-2026-11-16-1e87171, before that commit,PlayGoOpenanswersPLAYGO_ERROR_NOT_SUPPORT_PLAYGOwithout a table (and without--playgo-hack); the game made no chunk query there and ran on until a later shader stop.Without a table the emulator can't tell which chunk ids exist; Crimson Desert asks for chunk 1 right after reading its own
0.papgt.Change
PlayGoGetChunkIdstill lists chunk 0 only (--playgo-hackstill lists 1000), but ids belowPLAYGO_DEFAULT_CHUNKS_NUM(1000) count as installed (PLAYGO_LOCUS_LOCAL_FAST). Ids from 1000 still getPLAYGO_ERROR_BAD_CHUNK_ID, so a game that walks ids until the first error still stops.This reverses part of the test that came with
e4cc27d11:GetLocus(1)for a package without chunk metadata wasPLAYGO_ERROR_BAD_CHUNK_IDand is nowPLAYGO_LOCUS_LOCAL_FAST.Test
tests/PlayGoTests.cpp: the no-metadata test now expects 1 listed chunk,GetLocus0 and 1 =PLAYGO_LOCUS_LOCAL_FASTand 1000 =PLAYGO_ERROR_BAD_CHUNK_ID. Withupstream/mainsrc it fails (GetLocus(1)returns0x80B2000C).PackageWithChunkMetadataRejectsChunksPastItsTable: a 2-chunk table gives 2 listed chunks, id 1 =PLAYGO_LOCUS_LOCAL_FAST, id 2 =PLAYGO_ERROR_BAD_CHUNK_ID.playgo_tests: 3 of 3 pass with the change.Fork CI (Windows, Linux, macOS): https://github.com/Nawid3333/KytyPS5/actions/runs/45337601126/attempts/1
Game: with a fork build of this commit (
2a03bda) and without--playgo-hack, Crimson Desert gets past PlayGo in a tester's run (#2321): it asks for chunk 1 and goes on to readpackages/0000/0.pamtand the other package tables. It then stops at the same compute shader as on1e87171(0xfc0aa7b2901ca28e, pc0x74, resource tracking), a separate issue.Other dumps without a table also ask for chunk ids from 1 up in tester logs. GTA San Andreas Definitive Edition (PPSA03524 in #2370), Returnal (#2373) and Alan Wake 2 (#947) ask for chunk 1 once on builds with
e4cc27d11and go on. A Plague Tale: Innocence (#1994) asks for 1 and 2, and Avatar: Frontiers of Pandora (#2331) polls 0 to 5. In these logs, Crimson Desert is the only game that ends right after the answer.Refs #2321
Written with Claude Code (AI): Claude Code wrote the change and the tests and ran the local tests; the game run is a tester's.
🤖 Generated with Claude Code
@coderabbitai[bot] on GitHub · 2026-11-24 07:13 UTC · original
No actionable comments were generated in the recent review.
Walkthrough
PlayGo now records whether the system-content lookup returned a chunk count. Chunk validation uses the returned count when known and otherwise uses the default limit of 1000. Tests cover chunk IDs with no package metadata and with metadata that declares two chunks.
Suggested reviewers:
nmzikChange: Bug fix
Merge Risk:
Minimal · up to
2a03bThis change lets packages without PlayGo chunk metadata report chunk IDs below 1000 as installed, while packages with a chunk table still reject IDs beyond it. Tests cover both cases, and no merge-blocking risk is apparent.
Pre-merge checks:
4
Full details: Title check
Explanation
The title names the main behavior change: PlayGo now answers chunk IDs from an unknown chunk table as installed. The raw summary describes a change to is_valid_chunk and the no-metadata default, which matches this. The title is short and specific, and it does not describe the emulator's wider behavior in detail, which is acceptable.
Full details: Description check
Explanation
The description states the problem (Crimson Desert's missing PlayGo chunk table causing PLAYGO_ERROR_BAD_CHUNK_ID for chunk 1), the change (IDs below PLAYGO_DEFAULT_CHUNKS_NUM count as installed when no table exists, while the table case is unchanged), and the tests updated in tests/PlayGoTests.cpp. This matches the raw summary and objectives.
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.
Share
5245b0f4-8cff-47c0-a87f-5bd987110986Reviewing files that changed from the base of the PR and between
4e90654506and2a03bda58d.src/libs/libPlayGo.cpptests/PlayGoTests.cppIncluded review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 9 remain after this review.
@Nawid3333 on GitHub · 2026-11-24 07:23 UTC · original
@Crispy81 This PR is the change in build
2a03bda: with it, Crimson Desert got past PlayGo for you without--playgo-hack(#2321). Could you confirm that here? No new run needed.@Crispy81 on GitHub · 2026-11-24 07:29 UTC · original
Believe so
View command line instructions
Manual merge helper
Use this merge commit message when completing the merge manually.
Checkout
From your project repository, check out a new branch and test the changes.Merge
Merge the changes and update on Forgejo.