Skip to content

fix(libScePlayGo): report optional chunks as supported and installed - #6033

Merged
oneandonlydean merged 1 commit into
boykopovar:mainfrom
milescoviello:carry/playgo-optional-chunks
Oct 14, 2026
Merged

oneandonlydean merged 1 commit into
boykopovar:mainfrom
milescoviello:carry/playgo-optional-chunks

Conversation

@milescoviello

Copy link
Copy Markdown
Contributor

What

Carried from #6031 by @Tamalero, who cannot open pull requests yet. Their commit is unchanged apart from a rebase onto current main, and keeps them as author.

Marvel's Guardians of the Galaxy (PPSA01748) opens on a language picker. On main its text row offers only Arabic, Korean and the Chinese variants, so the game runs in Chinese. Before the picker the title calls scePlayGoGetSupportedOptionalChunk (twice) and scePlayGoGetOptionalChunk (once) with type 0. Both returned 0 with an empty bitmask: no language packs supported or installed. The row then hides every language its playgo-scenario.json lists in chunkSupportedLanguages, English included.

A dump is fully installed, so both functions now set every bit, as scePlayGoGetLanguageMask already does for languages. type stays ignored. The bit layout and the type values are not known, and docs/dev/debt/libScePlayGo.md records that. guest_playgo checks both functions for a bad handle, a null pointer and every bit set.

Fixes #6031.

Tested

By Tamalero (details in #6031): PPSA01748 v01.006.000, Linux, RTX 4090. On main the text row lists only Arabic, Korean and Chinese in 3 of 3 runs. With both functions reporting every bit, every language in param.json is listed, English included, and the title goes on past the picker (1 of 1 run).

Re-checked here, without the title: Ubuntu 24.04, GCC 13.3 (CI's compiler), Release with CI's configure flags, on main 411e5e6:

  • guest_playgo and guest_playgo_dialog pass. With main's Export.cpp and the new checks, guest_playgo fails.
  • 374 of 375 guest_* tests pass. guest_user_service aborts the same way on main without this change, since test(libSceUserService): cover user event polling #3507 (opened separately).
  • tools/check_conventions.py --base upstream/main passes. tools/pr_overlap.py --branch reports fix(libScePlayGo): report missing chunk metadata #5494, which changes the existing docs/dev/debt/libScePlayGo.md entry just above the one this adds; the overlap is only in text.

Not checked on Windows or on a console.

Checklist

  • Based on current main; no other open PR implements the same functions
  • One topic per PR; follow-ups go in a new PR
  • No comments in code except technical debt
  • Unimplemented paths throw (NotImplemented_nid_no_patch); silent stubs are listed under Silent stubs in their library's technical debt file
  • No notes, investigation .md files or images added to the repository (attach them to this PR)
  • New third-party code is a submodule built from source
  • Generic behaviour, not specific to one title
  • Depends on: none
  • Unblocks: none
  • AI-assisted: yes

🤖 Generated with Claude Code

@MarcZX10

Copy link
Copy Markdown
Contributor

I built and ran the full GuestPlayGo.cpp regression executable with Export.cpp in a standalone Linux harness using a temporary ResolvePath_nid_no_patch shim; it passed (exit 0), including the new bad-handle, null-pointer and all-bits-set checks. The normal CMake guest_playgo_tests target also built, but its CTest run aborts before the PlayGo checks because this Xeon E5-1620 v2 host lacks the AVX2/BMI/LZCNT features required by the emulator. This was not a title run.

@milescoviello

Copy link
Copy Markdown
Contributor Author

Thanks for running it. To fill in the CTest part: on an i7-13700K (Ubuntu 24.04, GCC 13.3, Release) the normal guest_playgo CTest passes on this branch and fails with main's Export.cpp.

AI-assisted: yes

@Tamalero

Tamalero commented Oct 14, 2026 •

Copy link
Copy Markdown
Contributor

Ran this PR's head (0fda02190) with Guardians of the Galaxy (PPSA01748 v01.006.000) on NVIDIA and on AMD, each from a fresh profile so the language picker comes up. On both, the picker is in English and both rows (voice and text) default to English. On main without the change, the same screen opens in Simplified Chinese and the text row offers only Arabic, Korean and Chinese.

GPU / driver Result
Desktop RTX 4090, NVIDIA 615.78.08, i9-14900K, --to-intel relink Picker in English, both rows English; the title continues through the intro
VM Radeon Pro V620, RADV (Mesa 25.2.8), EPYC 7452, relinked without --to-intel Picker in English, both rows English
Details
  • Same build on both: this PR's head plus one local change the title needs to start (sceNpGetUserIdByAccountId returns USER_NOT_FOUND offline), unrelated to PlayGo. No PlayGo environment switches.
  • Linux on both (CachyOS desktop; Ubuntu 24.04 VM, kernel 6.8). The AMD run was watched through a stream from the VM.
  • Separate from this PR: on the 4090 the run later stops during the first level's load on the two-pointer-hop T# shape reported on feat(agc): implement image and sampler tables indexed at runtime offsets #757, the same stop as on main without this change.
  • Also separate: on the V620 the title stops presenting after about 2,400 frames, while the picker is on screen. The GPUs go idle and the log stops, while about 14 guest threads stay busy. The desktop doesn't do this. I haven't looked into it yet.

Tested and written by Claude (AI assistant) on a contributor's machine.
BEFORE FIX:
image

AFTER:

AMD EPYC + V620
image

Intel 14900k+Nvidia 4090
image

A dump is fully installed, so scePlayGoGetSupportedOptionalChunk and
scePlayGoGetOptionalChunk report every optional chunk (language pack) like
scePlayGoGetLanguageMask reports every language. They returned an empty
bitmask, so PPSA01748 hid every text language its playgo-scenario.json
lists as a chunk language, English included.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@milescoviello
milescoviello force-pushed the carry/playgo-optional-chunks branch from 0fda021 to c43af1f Compare October 14, 2026 22:33
@milescoviello

milescoviello commented Oct 14, 2026 •

Copy link
Copy Markdown
Contributor Author

Rebased onto main eea428c: the only conflict was the libScePlayGo debt entry next to #5494's (now merged). Main's entry is kept and this one added below it. guest_playgo still passes and tools/check_conventions.py --base upstream/main passes. Thanks @Tamalero for the NVIDIA and AMD runs.

AI-assisted: yes

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

libScePlayGo: optional chunks report an empty bitmask, so Guardians of the Galaxy (PPSA01748) offers no English text; fix branch ready

4 participants