feat(libSceRegMgr): add sceRegMgrNonSysGetInt stub #6497

Merged
giovanniadamo merged 3 commits from upstream-pr/6497 into main 2026-10-19 02:36:36 +00:00
giovanniadamo commented 2026-10-15 17:33:41 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by giovanniadamo on 2026-10-15T17:33:41Z.


What

libSceRegMgr didn't exist at all in AnyPS5. Astro Bot (PPSA21564) fails to load because its loader can't find libSceRegMgr.prx (#4720, GetLastError 126). Its import log only needs one export from that library: sceRegMgrNonSysGetInt.

This PR adds the library with just that export. The signature isn't documented by Sony, it comes from community reverse engineering (a PS5 3.20 firmware dump, cross checked against ChonkyStation4), so the function throws via NotImplemented_nid_no_patch instead of guessing real behavior, per this repo's convention. A debt doc entry records where the signature came from.

This fixes the load failure. Whether Astro Bot runs further depends on whether it actually calls this function during play, not just resolves it.

Tested

Windows 11, MinGW (winlibs 15.2.0-14.0.0-r7). Full suite: ctest 1266/1266 passing, including the new guest_regmgr test. Not tested against the real game, I don't own it.

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); no silent stubs here
  • No notes, investigation .md files or images added to the repository
  • New third-party code is a submodule built from source (n/a, no third-party code added)
  • Generic behaviour, not specific to one title
  • Depends on: none
  • Unblocks: none (#4720 was closed as not planned by its reporter, not resolved)
  • GPUs tested: n/a
  • AI-assisted: yes

🤖 Generated with Claude Code

<!-- greyfinch-sync:boykopovar/AnyPS5:issue:4877350097 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/6497). Originally posted by [giovanniadamo](https://github.com/giovanniadamo) on 2026-10-15T17:33:41Z. --- ### What libSceRegMgr didn't exist at all in AnyPS5. Astro Bot (PPSA21564) fails to load because its loader can't find libSceRegMgr.prx (#4720, GetLastError 126). Its import log only needs one export from that library: sceRegMgrNonSysGetInt. This PR adds the library with just that export. The signature isn't documented by Sony, it comes from community reverse engineering (a PS5 3.20 firmware dump, cross checked against ChonkyStation4), so the function throws via NotImplemented_nid_no_patch instead of guessing real behavior, per this repo's convention. A debt doc entry records where the signature came from. This fixes the load failure. Whether Astro Bot runs further depends on whether it actually calls this function during play, not just resolves it. ### Tested Windows 11, MinGW (winlibs 15.2.0-14.0.0-r7). Full suite: `ctest` 1266/1266 passing, including the new `guest_regmgr` test. Not tested against the real game, I don't own it. ### 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 - [x] Unimplemented paths throw (`NotImplemented_nid_no_patch`); no silent stubs here - [x] No notes, investigation `.md` files or images added to the repository - [x] New third-party code is a submodule built from source (n/a, no third-party code added) - [x] Generic behaviour, not specific to one title - [x] Depends on: none - [x] Unblocks: none (#4720 was closed as not planned by its reporter, not resolved) - [x] GPUs tested: n/a - [x] AI-assisted: yes 🤖 Generated with [Claude Code](https://claude.com/claude-code)
jotitadev commented 2026-10-15 19:04:55 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by jotitadev on 2026-10-15T19:04:55Z.

Review: COMMENTED


Linux run. The PR only lists Windows.

Setup: Ubuntu 26.04, i7-8700, GCC 15.2, Release, full build with BUILD_TESTING=ON. Head 66b0a6082 merged onto main 44df21632. I reconfigured after the merge, because the prx/* glob only picks up the new directory at configure time.

Results

  • The patched libSceRegMgr.prx is built and exports dKeshzt29G4 next to sceRegMgrNonSysGetInt (readelf --dyn-syms).
  • guest_regmgr and patched_libraries pass, and pass 5/5 with --repeat until-fail:5.
  • Non-GPU suite (ctest -E "^agc"): 669/671. The new test is the only extra one. The two failures are file_writer_binary and file_writer_text, which also fail on plain main on this host (668/670).

Written with AI assistance (Claude Code). I ran the builds and tests above on my machine.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:5538491461 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/6497#pullrequestreview-5538491461). Originally posted by [jotitadev](https://github.com/jotitadev) on 2026-10-15T19:04:55Z. **Review:** COMMENTED --- Linux run. The PR only lists Windows. **Setup:** Ubuntu 26.04, i7-8700, GCC 15.2, Release, full build with `BUILD_TESTING=ON`. Head `66b0a6082` merged onto main `44df21632`. I reconfigured after the merge, because the `prx/*` glob only picks up the new directory at configure time. **Results** - The patched `libSceRegMgr.prx` is built and exports `dKeshzt29G4` next to `sceRegMgrNonSysGetInt` (`readelf --dyn-syms`). - `guest_regmgr` and `patched_libraries` pass, and pass 5/5 with `--repeat until-fail:5`. - Non-GPU suite (`ctest -E "^agc"`): 669/671. The new test is the only extra one. The two failures are `file_writer_binary` and `file_writer_text`, which also fail on plain main on this host (668/670). Written with AI assistance (Claude Code). I ran the builds and tests above on my machine.
github-actions[bot] commented 2026-10-19 02:22:51 +00:00 (Migrated from github.com)

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


Progress report (03c4cb5 → 66b0a60)

📉 System libraries: 88.77% (-0.03%, +1 declared functions)

🆕 1 declared as stubs
Library Name
libSceRegMgr sceRegMgrNonSysGetInt
<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6258302073 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/6497#issuecomment-6258302073). Originally posted by [github-actions[bot]](https://github.com/apps/github-actions) on 2026-10-19T02:22:51Z. --- <!-- progress-report --> ### Progress report (03c4cb5 → 66b0a60) 📉 **System libraries**: 88.77% (-0.03%, +1 declared functions) <details> <summary>🆕 1 declared as stubs</summary> | Library | Name | | - | - | | libSceRegMgr | `sceRegMgrNonSysGetInt` | </details>
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!6497
No description provided.