Skip to content

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

Merged
adriadam10 merged 1 commit into
boykopovar:mainfrom
fogydes:feat/sysmodule-ps5-module-table-mappings
Oct 19, 2026
Merged

adriadam10 merged 1 commit into
boykopovar:mainfrom
fogydes:feat/sysmodule-ps5-module-table-mappings

Conversation

@fogydes

@fogydes fogydes commented Oct 15, 2026 •

Copy link
Copy Markdown
Contributor

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 Horizon Call of the Mountain (PPSA05666) #6214, PPSA01474 Ratchet & Clank: Rift Apart (PPSA01474) on Linux #2172
  • GPUs tested: n/a
  • AI-assisted: yes

@MarcZX10

Copy link
Copy Markdown
Contributor

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 adriadam10 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@github-actions github-actions Bot added unblocks title Names a title ID on the Unblocks line needs rebase Conflicts with main, rebase needed labels Oct 18, 2026
@fogydes
fogydes force-pushed the feat/sysmodule-ps5-module-table-mappings branch from 9888216 to fcdf046 Compare October 19, 2026 05:21
@fogydes

fogydes commented Oct 19, 2026

Copy link
Copy Markdown
Contributor Author

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

  • Rebased on latest \origin/main.
  • Removed the conflicting \

@github-actions github-actions Bot removed the needs rebase Conflicts with main, rebase needed label Oct 19, 2026
@github-actions

Copy link
Copy Markdown

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

@github-actions github-actions Bot added the docs label Oct 19, 2026
@adriadam10
adriadam10 merged commit 5710355 into boykopovar:main Oct 19, 2026
12 checks passed
@fogydes
fogydes deleted the feat/sysmodule-ps5-module-table-mappings branch October 19, 2026 09:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

docs prx unblocks title Names a title ID on the Unblocks line

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants