fix(libSceSystemService): answer parameter 400 with the console language #3933

Merged
fma-rc merged 1 commit from upstream-pr/3933 into main 2026-10-12 04:31:25 +00:00
fma-rc commented 2026-10-11 19:19:01 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by fma-rc on 2026-10-11T19:19:01Z.


What

sceSystemServiceParamGetInt answers parameter 400 with the console language, the same number parameter 1 gives.

Astro's Playroom (PPSA01325) asks for parameter 400 first and asks for parameter 1 only when that call returns non-zero (thunk at app 0x1847ad1, called once from 0x183e9ce with edi = 0x190). It uses whichever answer it got as an index below 31 into its language table, and data/common/font_languages.xml has 31 entries. On main an unknown parameter returns 0 with SYSTEM_SERVICE_OK, so the title read 0 and showed Japanese text whatever ANYPS5_LANGUAGE said.

Source for the answer: in the PS5 10.01 and 12.60 libSceSystemService modules (decrypted system modules, read as disassembly), sceSystemServiceParamGetInt reads the same registry value for parameter 400 as for parameter 1. Two differences are not modelled and are in the TechnicalDebt entry: parameter 1 maps newer language numbers down by SDK version and 400 does not, and 400 returns 0x80a10003 when an imported check I could not identify returns 1. The 4.03 module has no parameter 400. I found no public source that names the parameter (OpenOrbis, SharpProspero, shadPS4, prosper, GitHub code search), so the constant is named after its number. The default branch for other unknown parameters is unchanged.

Tested

Arch Linux, GCC 16.2.1, main a11c8f7f7 with this commit. guest_system_service_language passes; with Export.cpp reverted it aborts on the first assertion. tools/check_conventions.py --base origin/main passes. Both pass again after the rebase onto main 7a84b2226 (2026-10-12).

Astro's Playroom PPSA01325 on an RTX 5080 with #3669, #425, #3750 and #3878 merged locally (it does not reach its title screen without them): the title screen and main menu are Japanese without this commit and English with it ("PRESS ANY BUTTON", "CONTINUE", "START A NEW GAME", "CONTROLLER DEMO"). PRs 3669 and 3750 have merged since; the title was not run again on the new base. Not built on Windows.

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 in TechnicalDebt
  • 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
  • AI-assisted: yes
<!-- greyfinch-sync:boykopovar/AnyPS5:issue:4821654197 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/3933). Originally posted by [fma-rc](https://github.com/fma-rc) on 2026-10-11T19:19:01Z. --- ### What `sceSystemServiceParamGetInt` answers parameter 400 with the console language, the same number parameter 1 gives. Astro's Playroom (PPSA01325) asks for parameter 400 first and asks for parameter 1 only when that call returns non-zero (thunk at app `0x1847ad1`, called once from `0x183e9ce` with `edi = 0x190`). It uses whichever answer it got as an index below 31 into its language table, and `data/common/font_languages.xml` has 31 entries. On `main` an unknown parameter returns 0 with `SYSTEM_SERVICE_OK`, so the title read 0 and showed Japanese text whatever `ANYPS5_LANGUAGE` said. Source for the answer: in the PS5 10.01 and 12.60 `libSceSystemService` modules (decrypted system modules, read as disassembly), `sceSystemServiceParamGetInt` reads the same registry value for parameter 400 as for parameter 1. Two differences are not modelled and are in the TechnicalDebt entry: parameter 1 maps newer language numbers down by SDK version and 400 does not, and 400 returns `0x80a10003` when an imported check I could not identify returns 1. The 4.03 module has no parameter 400. I found no public source that names the parameter (OpenOrbis, SharpProspero, shadPS4, prosper, GitHub code search), so the constant is named after its number. The `default` branch for other unknown parameters is unchanged. ### Tested Arch Linux, GCC 16.2.1, `main` a11c8f7f7 with this commit. `guest_system_service_language` passes; with `Export.cpp` reverted it aborts on the first assertion. `tools/check_conventions.py --base origin/main` passes. Both pass again after the rebase onto `main` 7a84b2226 (2026-10-12). Astro's Playroom PPSA01325 on an RTX 5080 with #3669, #425, #3750 and #3878 merged locally (it does not reach its title screen without them): the title screen and main menu are Japanese without this commit and English with it ("PRESS ANY BUTTON", "CONTINUE", "START A NEW GAME", "CONTROLLER DEMO"). PRs 3669 and 3750 have merged since; the title was not run again on the new base. Not built on Windows. ### Checklist - [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 in [TechnicalDebt](https://github.com/boykopovar/AnyPS5/blob/main/docs/dev/TechnicalDebt.md#silent-stubs) - [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] 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!3933
No description provided.