fix(libSceSysmodule): register Trophy2 module ID #2541

Merged
maoxin1234 merged 1 commit from upstream-pr/2541 into main 2026-10-11 09:41:44 +00:00
maoxin1234 commented 2026-10-10 02:52:41 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by maoxin1234 on 2026-10-10T02:52:41Z.


What

Register sysmodule ID 0x00000110 as libSceNpTrophy2. Extend the guest_sysmodule test to cover Trophy2 lookup and nested load/unload reference counts.

Evidence

  • Mapping reference: astrelsky/libNidResolver source/sysmodules.c maps libSceNpTrophy2 to ID 0x110.
  • Runtime corroboration: a Hades startup log records sceSysmoduleLoadModule receiving unknown ID 272 (decimal), which is 0x110 in hexadecimal. This confirms the requested ID in that run; it does not establish a PPSA ID or call-site disassembly.

Tested

  • Windows: ninja -C build-hades guest_sysmodule_tests — passed.
  • Windows: ctest --test-dir build-hades -R '^guest_sysmodule$' --output-on-failure — 1/1 passed.
  • Hades startup was not part of this PR's validation; this change only corrects module identification.

Checklist

  • Based on current main; no other open PR implements the same functions
  • One topic per PR; follow-up work goes in a new PR
  • No comments in code except technical debt comments
  • Unimplemented paths throw; silent stubs are listed in TechnicalDebt
  • No notes, investigation files or images added to the repository
  • New third-party code is a submodule built from source
  • Generic behavior, not specific to one title
  • Depends on: none
  • AI-assisted: yes
<!-- greyfinch-sync:boykopovar/AnyPS5:issue:4808193579 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/2541). Originally posted by [maoxin1234](https://github.com/maoxin1234) on 2026-10-10T02:52:41Z. --- ### What Register sysmodule ID `0x00000110` as `libSceNpTrophy2`. Extend the `guest_sysmodule` test to cover Trophy2 lookup and nested load/unload reference counts. ### Evidence - Mapping reference: [`astrelsky/libNidResolver` `source/sysmodules.c`](https://github.com/astrelsky/libNidResolver/blob/master/source/sysmodules.c#L864) maps `libSceNpTrophy2` to ID `0x110`. - Runtime corroboration: a Hades startup log records `sceSysmoduleLoadModule` receiving unknown ID `272` (decimal), which is `0x110` in hexadecimal. This confirms the requested ID in that run; it does not establish a PPSA ID or call-site disassembly. ### Tested - Windows: `ninja -C build-hades guest_sysmodule_tests` — passed. - Windows: `ctest --test-dir build-hades -R '^guest_sysmodule$' --output-on-failure` — 1/1 passed. - Hades startup was not part of this PR's validation; this change only corrects module identification. ### Checklist - [x] Based on current `main`; no other open PR implements the same functions - [x] One topic per PR; follow-up work goes in a new PR - [x] No comments in code except technical debt comments - [x] Unimplemented paths throw; silent stubs are listed in TechnicalDebt - [x] No notes, investigation files or images added to the repository - [x] New third-party code is a submodule built from source - [x] Generic behavior, not specific to one title - [x] Depends on: none - [x] AI-assisted: yes
github-actions[bot] commented 2026-10-10 02:52:51 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by github-actions[bot] on 2026-10-10T02:52:51Z.


Thank you for your interest in the project! We are sorry, but we cannot accept more PRs while we work through the existing backlog. This PR has been automatically closed and labeled "intake paused". This is not a judgment of the quality of your changes.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6093013095 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/2541#issuecomment-6093013095). Originally posted by [github-actions[bot]](https://github.com/apps/github-actions) on 2026-10-10T02:52:51Z. --- Thank you for your interest in the project! We are sorry, but we cannot accept more PRs while we work through the existing backlog. This PR has been automatically closed and labeled "intake paused". This is not a judgment of the quality of your changes.
adriadam10 commented 2026-10-10 09:08:32 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by adriadam10 on 2026-10-10T09:08:32Z.

Review: CHANGES_REQUESTED


Build and guest_sysmodule pass, and the new test fails without the ModuleTable.hpp line. One thing blocks this:

  • core/libs/prx/libSceSysmodule/ModuleTable.hpp:152: there is no source for 0x00000110 = libSceNpTrophy2. SharpProspero's SysmoduleMap.cs lists Trophy2 under a different numbering (0x800000D6, where this table has libSceUsbStorageDialog), and I found no reference (KytyPS5, shadPS4, prosper) giving 0x110. A wrong ID makes a title load the wrong module silently. Please cite where it comes from (a title calling sceSysmoduleLoadModule(0x110) and its PPSA id, a disassembly of the call site, or a reference table) in the PR body.

Once the source is there this is ready to merge.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:5478416198 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/2541#pullrequestreview-5478416198). Originally posted by [adriadam10](https://github.com/adriadam10) on 2026-10-10T09:08:32Z. **Review:** CHANGES_REQUESTED --- Build and `guest_sysmodule` pass, and the new test fails without the `ModuleTable.hpp` line. One thing blocks this: - `core/libs/prx/libSceSysmodule/ModuleTable.hpp:152`: there is no source for `0x00000110` = `libSceNpTrophy2`. SharpProspero's `SysmoduleMap.cs` lists Trophy2 under a different numbering (`0x800000D6`, where this table has `libSceUsbStorageDialog`), and I found no reference (KytyPS5, shadPS4, prosper) giving `0x110`. A wrong ID makes a title load the wrong module silently. Please cite where it comes from (a title calling `sceSysmoduleLoadModule(0x110)` and its PPSA id, a disassembly of the call site, or a reference table) in the PR body. Once the source is there this is ready to merge.
maoxin1234 commented 2026-10-10 09:35:00 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by maoxin1234 on 2026-10-10T09:35:00Z.


Thanks for the review. I added the mapping source to the PR body: the libNidResolver sysmodule table explicitly maps libSceNpTrophy2 to 0x110 (linked there). As runtime corroboration, the Hades startup log records sceSysmoduleLoadModule receiving ID 272 decimal (0x110). I have not established a PPSA ID or call-site disassembly, so the mapping reference is the source for the ID-to-module association.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6096174944 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/2541#issuecomment-6096174944). Originally posted by [maoxin1234](https://github.com/maoxin1234) on 2026-10-10T09:35:00Z. --- Thanks for the review. I added the mapping source to the PR body: the `libNidResolver` sysmodule table explicitly maps `libSceNpTrophy2` to `0x110` (linked there). As runtime corroboration, the Hades startup log records `sceSysmoduleLoadModule` receiving ID `272` decimal (`0x110`). I have not established a PPSA ID or call-site disassembly, so the mapping reference is the source for the ID-to-module association.
MarcZX10 commented 2026-10-10 09:44:16 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-10T09:44:16Z.


Updated validation on current upstream main

The source requested in the review is now cited in the PR body: libNidResolver/source/sysmodules.c maps libSceNpTrophy2 to sysmodule ID 0x110. The Hades log's decimal 272 is consistent runtime corroboration, but the table is the direct mapping evidence.

I reapplied the current PR diff (two files) to upstream main at 507f49fb in an isolated worktree. It applies cleanly.

Check Result
Build guest_sysmodule_tests (Linux x86_64, GCC 12.2, Release) Passed
CTest guest_sysmodule Passed (1/1)
Conventions against current main Passed
git diff --check Passed

This verifies the registration and nested reference-count behavior in the focused test; I did not run Hades. The PR's automatic Linux/Windows full builds and relinker matrix are skipped for contributor eligibility. Per CONTRIBUTING.md, a collaborator still needs to trigger the exact-head Build workflow on main before merge. The existing CHANGES_REQUESTED review also still awaits re-review after the cited source was added.

The same two-file change was present in my intake-closed #2609. I have not reopened it or opened a replacement to work around intake; #2541 remains the open carrier of the original contributor's change. AI-assisted change.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6096243218 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/2541#issuecomment-6096243218). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-10-10T09:44:16Z. --- ### Updated validation on current upstream `main` The source requested in the review is now cited in the PR body: [`libNidResolver/source/sysmodules.c`](https://github.com/astrelsky/libNidResolver/blob/master/source/sysmodules.c#L37) maps `libSceNpTrophy2` to sysmodule ID `0x110`. The Hades log's decimal `272` is consistent runtime corroboration, but the table is the direct mapping evidence. I reapplied the current PR diff (two files) to upstream `main` at `507f49fb` in an isolated worktree. It applies cleanly. | Check | Result | |---|---| | Build `guest_sysmodule_tests` (Linux x86_64, GCC 12.2, Release) | Passed | | CTest `guest_sysmodule` | Passed (1/1) | | Conventions against current `main` | Passed | | `git diff --check` | Passed | This verifies the registration and nested reference-count behavior in the focused test; I did not run Hades. The PR's automatic Linux/Windows full builds and relinker matrix are skipped for contributor eligibility. Per `CONTRIBUTING.md`, a collaborator still needs to trigger the exact-head Build workflow on `main` before merge. The existing CHANGES_REQUESTED review also still awaits re-review after the cited source was added. The same two-file change was present in my intake-closed #2609. I have not reopened it or opened a replacement to work around intake; #2541 remains the open carrier of the original contributor's change. AI-assisted change.
Mouhand-Kaddo commented 2026-10-10 10:04:49 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by Mouhand-Kaddo on 2026-10-10T10:04:49Z.


Additional platform validation on standalone PR head c916b428f93431a726ceae32c104f4f1c7e2279d:

Linux: passed — Arch Linux in WSL2 (kernel 6.6.87.2), GCC 16.2.1 20260810; CMake 4.3.1 / Ninja.

Release / BUILD_TESTING=ON: built the selected test targets; 1 CTest cases, 0 failures, 0 CTest skips.

Tests: guest_sysmodule.

Reproduce after building the test targets: ctest --test-dir <build> --verbose --no-tests=error --timeout 30 -R "^guest_sysmodule$".

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6096392080 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/2541#issuecomment-6096392080). Originally posted by [Mouhand-Kaddo](https://github.com/Mouhand-Kaddo) on 2026-10-10T10:04:49Z. --- <!-- anyps5-platform-validation:c916b428f93431a726ceae32c104f4f1c7e2279d --> Additional platform validation on standalone PR head `c916b428f93431a726ceae32c104f4f1c7e2279d`: **Linux: passed** — Arch Linux in WSL2 (kernel 6.6.87.2), GCC 16.2.1 20260810; CMake 4.3.1 / Ninja. Release / `BUILD_TESTING=ON`: built the selected test targets; 1 CTest cases, 0 failures, 0 CTest skips. Tests: `guest_sysmodule`. Reproduce after building the test targets: `ctest --test-dir <build> --verbose --no-tests=error --timeout 30 -R "^guest_sysmodule$"`.
MarcZX10 commented 2026-10-10 10:56:55 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-10T10:56:55Z.

Review: APPROVED


The requested mapping source is now present in the PR body and directly maps libSceNpTrophy2 to 0x110. I reapplied the two-file diff to current main 507f49fb; guest_sysmodule_tests built, guest_sysmodule passed 1/1, and conventions plus git diff --check passed.

I approve the code change. This review does not replace the collaborator-triggered exact-head Linux/Windows Build and Linux/Windows/macOS relinker matrix required by CONTRIBUTING.md; those jobs remain skipped in the PR checks.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:5478697488 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/2541#pullrequestreview-5478697488). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-10-10T10:56:55Z. **Review:** APPROVED --- The requested mapping source is now present in the PR body and directly maps `libSceNpTrophy2` to `0x110`. I reapplied the two-file diff to current `main` `507f49fb`; `guest_sysmodule_tests` built, `guest_sysmodule` passed 1/1, and conventions plus `git diff --check` passed. I approve the code change. This review does not replace the collaborator-triggered exact-head Linux/Windows Build and Linux/Windows/macOS relinker matrix required by `CONTRIBUTING.md`; those jobs remain skipped in the PR checks.
MarcZX10 commented 2026-10-10 11:44:55 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-10T11:44:55Z.


Overlap and validation comparison with my #2609

The code diff in my intake-closed #2609 is identical to this PR's two-file change. I updated #2609's description with the direct libNidResolver mapping reference and the scope of the runtime evidence now documented here.

For automated CI coverage, #2609 has the broader green relinker matrix: Ubuntu, Windows, and macOS all passed there, while the relinker jobs on #2541 are skipped. Both PRs also have successful register-context checks; #2609 additionally has successful macOS write-watch checks. The full Linux and Windows Build jobs are skipped on both, so neither matrix establishes those builds.

The mapping source and Hades log in this PR are useful evidence, and its guest_sysmodule validation is also recorded. Since #2609 was automatically closed by intake and the code diffs are identical, #2541 remains the open carrier. I am not asking to reopen or duplicate the change in #2609.

Review state

The PR still reports CHANGES_REQUESTED from the earlier review, even though that reviewer said the cited source would clear the blocker. My approval does not clear the other reviewer's change request. Please request a re-review so the review state reflects the added mapping source.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6097149503 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/2541#issuecomment-6097149503). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-10-10T11:44:55Z. --- ### Overlap and validation comparison with my #2609 The code diff in my intake-closed [#2609](https://github.com/boykopovar/AnyPS5/pull/2609) is identical to this PR's two-file change. I updated #2609's description with the direct `libNidResolver` mapping reference and the scope of the runtime evidence now documented here. For automated CI coverage, **#2609 has the broader green relinker matrix**: Ubuntu, Windows, and macOS all passed there, while the relinker jobs on #2541 are skipped. Both PRs also have successful register-context checks; #2609 additionally has successful macOS write-watch checks. The full Linux and Windows Build jobs are skipped on both, so neither matrix establishes those builds. The mapping source and Hades log in this PR are useful evidence, and its `guest_sysmodule` validation is also recorded. Since #2609 was automatically closed by intake and the code diffs are identical, #2541 remains the open carrier. I am not asking to reopen or duplicate the change in #2609. ### Review state The PR still reports `CHANGES_REQUESTED` from the earlier review, even though that reviewer said the cited source would clear the blocker. My approval does not clear the other reviewer's change request. Please request a re-review so the review state reflects the added mapping source.
reyani-dev commented 2026-10-10 12:36:47 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by reyani-dev on 2026-10-10T12:36:47Z.


Windows check (Windows 11, WinLibs GCC 15.2.0 r7, Release), merged onto current main 197ffac9:

Build guest_sysmodule
main + test change only Failed
main + this PR Passed (3/3, --repeat until-fail:3)

ctest -E "^agc_|video_out" with the PR passes 379/379.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6097560825 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/2541#issuecomment-6097560825). Originally posted by [reyani-dev](https://github.com/reyani-dev) on 2026-10-10T12:36:47Z. --- Windows check (Windows 11, WinLibs GCC 15.2.0 r7, Release), merged onto current `main` 197ffac9: | Build | `guest_sysmodule` | |---|---| | `main` + test change only | **Failed** | | `main` + this PR | **Passed** (3/3, `--repeat until-fail:3`) | `ctest -E "^agc_|video_out"` with the PR passes 379/379.
adriadam10 commented 2026-10-11 09:38:34 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by adriadam10 on 2026-10-11T09:38:34Z.

Review: APPROVED


Thanks for the source: libNidResolver source/sysmodules.c maps libSceNpTrophy2 to 0x110, which matches the table entry.

Checked: the new guest_sysmodule case fails without the ModuleTable.hpp line and passes with it. The only conflict with main was adjacency in core/libs/tests/GuestSysmodule.cpp; I rebased and kept both blocks. Build and ctest of the touched directories are green (19/19). Also confirmed by @MarcZX100 and @Mouhand-Kaddo (Linux) and @AchrafReyani (Windows); merging.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:5482781230 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/2541#pullrequestreview-5482781230). Originally posted by [adriadam10](https://github.com/adriadam10) on 2026-10-11T09:38:34Z. **Review:** APPROVED --- Thanks for the source: `libNidResolver` `source/sysmodules.c` maps `libSceNpTrophy2` to `0x110`, which matches the table entry. Checked: the new `guest_sysmodule` case fails without the `ModuleTable.hpp` line and passes with it. The only conflict with `main` was adjacency in `core/libs/tests/GuestSysmodule.cpp`; I rebased and kept both blocks. Build and ctest of the touched directories are green (19/19). Also confirmed by @MarcZX100 and @Mouhand-Kaddo (Linux) and @AchrafReyani (Windows); merging.
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!2541
No description provided.