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

Merged
milescoviello merged 1 commit from upstream-pr/6033 into main 2026-10-14 23:15:32 +00:00
milescoviello commented 2026-10-14 19:55:18 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by milescoviello on 2026-10-14T19:55:18Z.


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 411e5e6d9:

  • 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 #3507 (opened separately).
  • tools/check_conventions.py --base upstream/main passes. tools/pr_overlap.py --branch reports #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

<!-- greyfinch-sync:boykopovar/AnyPS5:issue:4863667929 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/6033). Originally posted by [milescoviello](https://github.com/milescoviello) on 2026-10-14T19:55:18Z. --- ### 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` 411e5e6d9: - `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 #3507 (opened separately). - `tools/check_conventions.py --base upstream/main` passes. `tools/pr_overlap.py --branch` reports #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 <!-- Rules behind each item: https://github.com/boykopovar/AnyPS5/blob/main/CONTRIBUTING.md --> - [x] Based on current `main`; no other open PR implements the same functions - [x] One topic per PR; follow-ups go in a new PR - [x] No comments in code except [technical debt](https://github.com/boykopovar/AnyPS5/blob/main/docs/dev/CONVENTIONS.md) - [x] Unimplemented paths throw (`NotImplemented_nid_no_patch`); silent stubs are listed under Silent stubs in their library's [technical debt](https://github.com/boykopovar/AnyPS5/tree/main/docs/dev/debt) file - [x] No notes, investigation `.md` files or images added to the repository (attach them to this PR) - [x] New third-party code is a submodule built from source - [x] Generic behaviour, not specific to one title - [x] Depends on: none - [x] Unblocks: none - [x] AI-assisted: yes 🤖 Generated with [Claude Code](https://claude.com/claude-code)
MarcZX10 commented 2026-10-14 20:11:10 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-14T20:11:10Z.


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.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6177373091 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/6033#issuecomment-6177373091). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-10-14T20:11:10Z. --- 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 commented 2026-10-14 20:11:45 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by milescoviello on 2026-10-14T20:11:45Z.


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

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6177384807 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/6033#issuecomment-6177384807). Originally posted by [milescoviello](https://github.com/milescoviello) on 2026-10-14T20:11:45Z. --- 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 commented 2026-10-14 22:14:24 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by Tamalero on 2026-10-14T22:14:24Z.


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 #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

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6179670461 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/6033#issuecomment-6179670461). Originally posted by [Tamalero](https://github.com/Tamalero) on 2026-10-14T22:14:24Z. --- 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><summary>Details</summary> - 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 #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. </details> *Tested and written by Claude (AI assistant) on a contributor's machine.* BEFORE FIX: <img width="3322" height="1915" alt="image" src="https://github.com/user-attachments/assets/42be2c5b-227e-4e2a-996f-1c09be54ea0e" /> AFTER: AMD EPYC + V620 <img width="1469" height="878" alt="image" src="https://github.com/user-attachments/assets/0e3c4c23-ed4c-442d-82d2-d720aa9de835" /> Intel 14900k+Nvidia 4090 <img width="2225" height="1291" alt="image" src="https://github.com/user-attachments/assets/ecf60195-82e4-4ed9-8bd8-f65ad6b26738" />
milescoviello commented 2026-10-14 22:34:08 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by milescoviello on 2026-10-14T22:34:08Z.


Rebased onto main eea428ca8: 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

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6180016504 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/6033#issuecomment-6180016504). Originally posted by [milescoviello](https://github.com/milescoviello) on 2026-10-14T22:34:08Z. --- Rebased onto `main` eea428ca8: 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 in to join this conversation.
No reviewers
No labels
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
boykopovar/AnyPS5!6033
No description provided.