feat(libSceSysmodule): register missing user and internal sysmodule IDs #6242

Merged
fogydes merged 1 commit from upstream-pr/6242 into main 2026-10-19 05:51:25 +00:00
fogydes commented 2026-10-15 06:48:25 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by fogydes on 2026-10-15T06:48:25Z.


What

Registers missing PlayStation 5 sysmodule IDs in core/libs/prx/libSceSysmodule/ModuleTable.hpp:

  • Maps 11 user modules (libScePerf, libSceDeci5, libScePlayerSelectionDialog, libSceFrontPanelDisplay, libSceTextToSpeech2, libSceCdlgG2P, libSceCdlgPlayerReview, libSceDepth2, libSceHmd2, libSceVrTracker2, libSceVrSetupDialog).
  • Maps 51 internal modules including Next-Gen Graphics driver (libSceAgcDriver, 0x80000080), VSH interface (libSceAgcVsh, 0x80000086), audio/DSP services (libSceAjmi, 0x8000007e), AMPR (libSceAmpr, 0x800000b7), social screen (libSceSocialScreen, 0x800000ae), and resource registration (libSceAgcResourceRegistration, 0x80000093).
  • Drops duplicate/conflicting 0x132 mapping in favour of libSceProprietaryVoiceChatHelperPrx on main, and drops duplicate 0x800000c2 so libSceRazorCpu is uniquely defined at 0x80000075.
  • Documents sources (decrypted PS5 firmware 1.00–3.20 sysmodule lookup tables) and explains dual user/internal IDs (libSceNgs2 at 0x0000000b / 0x80000090; libSceHdrScopes at 0x00000109 / 0x800000bd) in docs/dev/debt/libSceSysmodule.md under "Unknown function info".

Many of these modules (libSceAgcDriver, libSceAgcVsh, libSceAjmi, libSceAmpr, libSceCdlgG2P, libSceCdlgPlayerReview, libSceHmd2, libScePlayerSelectionDialog, libSceTextToSpeech2, libSceVrSetupDialog, libSceVrTracker2) are already implemented in core/libs/prx/, but calls to sceSysmoduleLoadModule or sceSysmoduleLoadModuleInternal threw runtime errors or failed to record load state because their IDs were missing from kModuleTable.

Tested

  • Registered new guest assertions in core/libs/tests/GuestSysmodule.cpp verifying load/status/unload lifecycles for newly added user and internal IDs (kPerfModuleId 0x0005, kVrSetupDialogModuleId 0x0130, kAgcDriverModuleId 0x80000080, kNgs2InternalModuleId 0x80000090, kHdrScopesInternalModuleId 0x800000bd). On main, querying these IDs throws runtime errors or fails; with this PR, guest_sysmodule passes 100%.
  • Verified ctest --test-dir build-libs -R guest_sysmodule -V passes (1/1 passed).
  • Verified python tools/check_conventions.py --base origin/main passes with zero violations.

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: PPSA05666 #6214, PPSA01474 #2172
  • GPUs tested: n/a
  • AI-assisted: yes
<!-- greyfinch-sync:boykopovar/AnyPS5:issue:4869381684 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/6242). Originally posted by [fogydes](https://github.com/fogydes) on 2026-10-15T06:48:25Z. --- ### What Registers missing PlayStation 5 sysmodule IDs in `core/libs/prx/libSceSysmodule/ModuleTable.hpp`: - Maps 11 user modules (`libScePerf`, `libSceDeci5`, `libScePlayerSelectionDialog`, `libSceFrontPanelDisplay`, `libSceTextToSpeech2`, `libSceCdlgG2P`, `libSceCdlgPlayerReview`, `libSceDepth2`, `libSceHmd2`, `libSceVrTracker2`, `libSceVrSetupDialog`). - Maps 51 internal modules including Next-Gen Graphics driver (`libSceAgcDriver`, `0x80000080`), VSH interface (`libSceAgcVsh`, `0x80000086`), audio/DSP services (`libSceAjmi`, `0x8000007e`), AMPR (`libSceAmpr`, `0x800000b7`), social screen (`libSceSocialScreen`, `0x800000ae`), and resource registration (`libSceAgcResourceRegistration`, `0x80000093`). - Drops duplicate/conflicting `0x132` mapping in favour of `libSceProprietaryVoiceChatHelperPrx` on `main`, and drops duplicate `0x800000c2` so `libSceRazorCpu` is uniquely defined at `0x80000075`. - Documents sources (decrypted PS5 firmware 1.00–3.20 sysmodule lookup tables) and explains dual user/internal IDs (`libSceNgs2` at 0x0000000b / 0x80000090; `libSceHdrScopes` at 0x00000109 / 0x800000bd) in `docs/dev/debt/libSceSysmodule.md` under "Unknown function info". Many of these modules (`libSceAgcDriver`, `libSceAgcVsh`, `libSceAjmi`, `libSceAmpr`, `libSceCdlgG2P`, `libSceCdlgPlayerReview`, `libSceHmd2`, `libScePlayerSelectionDialog`, `libSceTextToSpeech2`, `libSceVrSetupDialog`, `libSceVrTracker2`) are already implemented in `core/libs/prx/`, but calls to `sceSysmoduleLoadModule` or `sceSysmoduleLoadModuleInternal` threw runtime errors or failed to record load state because their IDs were missing from `kModuleTable`. ### Tested - Registered new guest assertions in `core/libs/tests/GuestSysmodule.cpp` verifying load/status/unload lifecycles for newly added user and internal IDs (`kPerfModuleId` `0x0005`, `kVrSetupDialogModuleId` `0x0130`, `kAgcDriverModuleId` `0x80000080`, `kNgs2InternalModuleId` `0x80000090`, `kHdrScopesInternalModuleId` `0x800000bd`). On `main`, querying these IDs throws runtime errors or fails; with this PR, `guest_sysmodule` passes 100%. - Verified `ctest --test-dir build-libs -R guest_sysmodule -V` passes (1/1 passed). - Verified `python tools/check_conventions.py --base origin/main` passes with zero violations. ### 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: PPSA05666 #6214, PPSA01474 #2172 - [x] GPUs tested: n/a - [x] AI-assisted: yes
MarcZX10 commented 2026-10-18 19:24:27 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-18T19:24:27Z.


There is a concrete naming mismatch in the proposed 0x132 entry. sceSysmoduleGetModuleHandleInternal passes the table name to openHostModule, which constructs libs/<name>.prx (core/libs/prx/libSceSysmodule/Export.cpp:37,159-173). The CMake target for this implementation is libSceProprietaryVoiceChatHelperPrx, and the common PRX setup emits ${LIB_NAME}.prx, so the built artifact is libs/libSceProprietaryVoiceChatHelperPrx.prx. This PR’s mapping to libSceProprietaryVoiceChatHelper would instead look for libs/libSceProprietaryVoiceChatHelper.prx, which is not produced. Open PR #6370 has the name matching the actual target, plus module lookup/load/unload coverage. Please coordinate the duplicate 0x132 mapping and use the artifact name (or explain if a different artifact is intended).

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6254121248 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/6242#issuecomment-6254121248). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-10-18T19:24:27Z. --- There is a concrete naming mismatch in the proposed `0x132` entry. `sceSysmoduleGetModuleHandleInternal` passes the table name to `openHostModule`, which constructs `libs/<name>.prx` (`core/libs/prx/libSceSysmodule/Export.cpp:37,159-173`). The CMake target for this implementation is `libSceProprietaryVoiceChatHelperPrx`, and the common PRX setup emits `${LIB_NAME}.prx`, so the built artifact is `libs/libSceProprietaryVoiceChatHelperPrx.prx`. This PR’s mapping to `libSceProprietaryVoiceChatHelper` would instead look for `libs/libSceProprietaryVoiceChatHelper.prx`, which is not produced. Open PR #6370 has the name matching the actual target, plus module lookup/load/unload coverage. Please coordinate the duplicate `0x132` mapping and use the artifact name (or explain if a different artifact is intended).
adriadam10 commented 2026-10-18 19:26:26 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by adriadam10 on 2026-10-18T19:26:26Z.

Review: CHANGES_REQUESTED


Thanks for the PR. Points to fix:

  • ModuleTable.hpp:174: 0x132 maps to libSceProprietaryVoiceChatHelper, but openHostModule loads libs/<name>.prx (Export.cpp:38) and the built artifact is libSceProprietaryVoiceChatHelperPrx.prx. #6370 already adds this ID with the right name plus a test; drop this entry here.
  • No test: add cases in core/libs/tests/GuestSysmodule.cpp that load/query a few of the new IDs (user and internal) and fail on main.
  • Say where the IDs and names come from (reference, firmware dump, title import). The body gives no source for any of the 64 entries; every ID not backed by one needs a line in docs/dev/debt/libSceSysmodule.md under "Unknown function info".
  • Some names repeat across IDs (libSceNgs2 at 0xb and 0x80000090, libSceHdrScopes at 0x109 and 0x800000bd, libSceRazorCpu at 0x80000075 and 0x800000c2): explain why, or confirm against the source that they are distinct modules.
  • "Tested" mentions the relinker suite, which doesn't exercise this table; list the test that does.
<!-- greyfinch-sync:boykopovar/AnyPS5:review:5564591251 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/6242#pullrequestreview-5564591251). Originally posted by [adriadam10](https://github.com/adriadam10) on 2026-10-18T19:26:26Z. **Review:** CHANGES_REQUESTED --- Thanks for the PR. Points to fix: - `ModuleTable.hpp:174`: `0x132` maps to `libSceProprietaryVoiceChatHelper`, but `openHostModule` loads `libs/<name>.prx` (`Export.cpp:38`) and the built artifact is `libSceProprietaryVoiceChatHelperPrx.prx`. #6370 already adds this ID with the right name plus a test; drop this entry here. - No test: add cases in `core/libs/tests/GuestSysmodule.cpp` that load/query a few of the new IDs (user and internal) and fail on `main`. - Say where the IDs and names come from (reference, firmware dump, title import). The body gives no source for any of the 64 entries; every ID not backed by one needs a line in `docs/dev/debt/libSceSysmodule.md` under "Unknown function info". - Some names repeat across IDs (`libSceNgs2` at `0xb` and `0x80000090`, `libSceHdrScopes` at `0x109` and `0x800000bd`, `libSceRazorCpu` at `0x80000075` and `0x800000c2`): explain why, or confirm against the source that they are distinct modules. - "Tested" mentions the relinker suite, which doesn't exercise this table; list the test that does.
fogydes commented 2026-10-19 05:22:04 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by fogydes on 2026-10-19T05:22:04Z.


Thanks for the review @adriadam10 and @MarcZX10. Addressed all points:

  • Rebased on latest \origin/main.
  • Removed the conflicting \
<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6260289669 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/6242#issuecomment-6260289669). Originally posted by [fogydes](https://github.com/fogydes) on 2026-10-19T05:22:04Z. --- Thanks for the review @adriadam10 and @MarcZX10. Addressed all points: - Rebased on latest \origin/main\. - Removed the conflicting \
github-actions[bot] commented 2026-10-19 05:28:16 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by github-actions[bot] on 2026-10-19T05:28:16Z.


Other open pull requests touch the same code. Merging one will break the other, or both implement the same thing. If this one builds on them, list them in Depends on.

Pull request Conflicting files (lines on main) Same exports Same new files
PR 6823 core/libs/tests/GuestSysmodule.cpp L274

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.

Pull request Shared files not compared
PR 6044 core/libs/tests/GuestSysmodule.cpp
<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6260364656 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/6242#issuecomment-6260364656). Originally posted by [github-actions[bot]](https://github.com/apps/github-actions) on 2026-10-19T05:28:16Z. --- <!-- pr-overlap --> Other open pull requests touch the same code. Merging one will break the other, or both implement the same thing. If this one builds on them, list them in **Depends on**. | Pull request | Conflicting files (lines on `main`) | Same exports | Same new files | |---|---|---|---| | [PR 6823](https://www.github.com/boykopovar/AnyPS5/pull/6823) | `core/libs/tests/GuestSysmodule.cpp` [L274](https://github.com/boykopovar/AnyPS5/blob/4ffb0cd12b00e37aee69a5eb708b3e89f909eaff/core/libs/tests/GuestSysmodule.cpp#L274) | | | 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. | Pull request | Shared files not compared | |---|---| | [PR 6044](https://www.github.com/boykopovar/AnyPS5/pull/6044) | `core/libs/tests/GuestSysmodule.cpp` |
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!6242
No description provided.