feat(libSceNgs2): export sceNgs2ReportRegisterHandler and sceNgs2ReportUnregisterHandler #3559

Merged
EdouardSence merged 1 commit from upstream-pr/3559 into main 2026-10-11 21:33:13 +00:00
EdouardSence commented 2026-10-11 13:12:17 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by EdouardSence on 2026-10-11T13:12:17Z.


What

Exports sceNgs2ReportRegisterHandler and sceNgs2ReportUnregisterHandler from libSceNgs2 as throwing stubs, so titles that import them load.

  • PPSA04540 (Rise of the Ronin, 01.009.000) imports both. On main a11c8f7f its loader stops on the first of them:
    ./app.elf: symbol lookup error: ./app.elf: undefined symbol: uBIN24Tv2MI
    
    With this PR it loads past both and stops on its next missing import, qVOSuDRHCpA (sce::Json::Array::clear).
  • The title calls sceNgs2ReportRegisterHandler once, behind a flag in its audio settings, with report type 5 (CPU load). Its handler copies the four ratios into its audio object. It calls sceNgs2ReportUnregisterHandler on that handle at teardown.
  • NGS2 here produces no reports yet, so a registered handler would never be called. Both calls throw instead of returning success. The signatures follow SharpProspero and shadPS4's ngs2_report.h. The TechnicalDebt entry is under "Unknown function info", next to the other throwing exports.
  • ngs2_report calls both and expects them to throw without writing the out handle. On main it does not link (undefined reference to sceNgs2ReportRegisterHandler).

Tested

Linux (CachyOS), RX 9070 XT, GCC, Release, on main a11c8f7f:

  • ngs2_report and the other eight ngs2_* tests pass.
  • Both NIDs are in nm -D libSceNgs2.prx.
  • PPSA04540 relinked against this build now stops on qVOSuDRHCpA instead of uBIN24Tv2MI.

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

Tested and written by Claude (AI assistant) on a contributor's machine.

🤖 Generated with Claude Code

<!-- greyfinch-sync:boykopovar/AnyPS5:issue:4819300631 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/3559). Originally posted by [EdouardSence](https://github.com/EdouardSence) on 2026-10-11T13:12:17Z. --- ### What Exports `sceNgs2ReportRegisterHandler` and `sceNgs2ReportUnregisterHandler` from libSceNgs2 as throwing stubs, so titles that import them load. - PPSA04540 (Rise of the Ronin, 01.009.000) imports both. On `main` a11c8f7f its loader stops on the first of them: ``` ./app.elf: symbol lookup error: ./app.elf: undefined symbol: uBIN24Tv2MI ``` With this PR it loads past both and stops on its next missing import, `qVOSuDRHCpA` (`sce::Json::Array::clear`). - The title calls `sceNgs2ReportRegisterHandler` once, behind a flag in its audio settings, with report type 5 (CPU load). Its handler copies the four ratios into its audio object. It calls `sceNgs2ReportUnregisterHandler` on that handle at teardown. - NGS2 here produces no reports yet, so a registered handler would never be called. Both calls throw instead of returning success. The signatures follow [SharpProspero](https://github.com/SvenGDK/SharpProspero) and shadPS4's `ngs2_report.h`. The TechnicalDebt entry is under "Unknown function info", next to the other throwing exports. - `ngs2_report` calls both and expects them to throw without writing the out handle. On `main` it does not link (`undefined reference to sceNgs2ReportRegisterHandler`). ### Tested Linux (CachyOS), RX 9070 XT, GCC, Release, on `main` a11c8f7f: - `ngs2_report` and the other eight `ngs2_*` tests pass. - Both NIDs are in `nm -D libSceNgs2.prx`. - PPSA04540 relinked against this build now stops on `qVOSuDRHCpA` instead of `uBIN24Tv2MI`. ### 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 *Tested and written by Claude (AI assistant) on a contributor's machine.* 🤖 Generated with [Claude Code](https://claude.com/claude-code)
github-actions[bot] commented 2026-10-11 13:12:41 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by github-actions[bot] on 2026-10-11T13:12:41Z.


Progress report (a11c8f7 → 295e48f)

📉 System libraries: 85.76% (-0.05%, +2 declared functions)

🆕 2 declared as stubs
Library Name
libSceNgs2.native sceNgs2ReportRegisterHandler
libSceNgs2.native sceNgs2ReportUnregisterHandler
<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6109388577 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/3559#issuecomment-6109388577). Originally posted by [github-actions[bot]](https://github.com/apps/github-actions) on 2026-10-11T13:12:41Z. --- <!-- progress-report --> ### Progress report (a11c8f7 → 295e48f) 📉 **System libraries**: 85.76% (-0.05%, +2 declared functions) <details> <summary>🆕 2 declared as stubs</summary> | Library | Name | | - | - | | libSceNgs2.native | `sceNgs2ReportRegisterHandler` | | libSceNgs2.native | `sceNgs2ReportUnregisterHandler` | </details>
github-actions[bot] commented 2026-10-11 19:28:26 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by github-actions[bot] on 2026-10-11T19:28:26Z.


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
#3933 docs/dev/TechnicalDebt.md L280
#3995 core/libs/prx/libSceNgs2.native/CMakeLists.txt L5
core/libs/prx/libSceNgs2.native/src/Unimplemented.cpp L28-39
<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6112831524 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/3559#issuecomment-6112831524). Originally posted by [github-actions[bot]](https://github.com/apps/github-actions) on 2026-10-11T19:28:26Z. --- <!-- 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 | |---|---|---|---| | #3933 | `docs/dev/TechnicalDebt.md` [L280](https://github.com/boykopovar/AnyPS5/blob/1770f352d7546c1eae9cf1e1441e1ae2428dc3a0/docs/dev/TechnicalDebt.md#L280) | | | | #3995 | `core/libs/prx/libSceNgs2.native/CMakeLists.txt` [L5](https://github.com/boykopovar/AnyPS5/blob/1770f352d7546c1eae9cf1e1441e1ae2428dc3a0/core/libs/prx/libSceNgs2.native/CMakeLists.txt#L5)<br>`core/libs/prx/libSceNgs2.native/src/Unimplemented.cpp` [L28-39](https://github.com/boykopovar/AnyPS5/blob/1770f352d7546c1eae9cf1e1441e1ae2428dc3a0/core/libs/prx/libSceNgs2.native/src/Unimplemented.cpp#L28-L39) | | |
adriadam10 commented 2026-10-11 21:33:09 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by adriadam10 on 2026-10-11T21:33:09Z.


Checked the build, the ngs2_* tests (incl. the new ngs2_report), the NIDs (aerolib) and the signatures (shadPS4, SharpProspero); throwing stubs with a TechnicalDebt line and no duplicate with other open PRs. Merging.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6114014725 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/3559#issuecomment-6114014725). Originally posted by [adriadam10](https://github.com/adriadam10) on 2026-10-11T21:33:09Z. --- Checked the build, the `ngs2_*` tests (incl. the new `ngs2_report`), the NIDs (aerolib) and the signatures (shadPS4, SharpProspero); throwing stubs with a TechnicalDebt line and no duplicate with other open PRs. 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!3559
No description provided.