feat(libSceSysmodule): register libSceAcm (0x10B) and libScePsml (0x137) module IDs #4068

Merged
Kikoarl merged 1 commit from upstream-pr/4068 into main 2026-10-12 23:28:43 +00:00
Kikoarl commented 2026-10-11 22:38:36 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by Kikoarl on 2026-10-11T22:38:36Z.


What

Registers the libSceAcm (0x0000010b / 267) and libScePsml (0x00000137 / 311) module IDs in libSceSysmodule's ModuleTable.hpp and adds lifecycle unit tests in GuestSysmodule.cpp (consolidating #4071 per reviewer request).

Empirical Evidence (Rule 4B):

  • Title ID: PPSA21567 (Astro Bot)
  • Console log on origin/main for libSceAcm:
    [libSceSysmodule/Export.cpp:141 sceSysmoduleLoadModule] unknown id: 267
    
  • Binary disassembly at file offset 0xe30e7a:
    0xe30e7a: mov $0x10b, %edi
    0xe30e7f: call 0x74bb170        ; sceSysmoduleLoadModule(0x10b)
    0xe30e84: mov $0x740, %edi
    0xe30e89: add -0x270(%rbp), %rdi
    0xe30e90: call 0x74bbbc0        ; Relocation 0x5b8 (ZIXln2K3XMk) -> sceAcmContextCreate
    
    Following sceSysmoduleLoadModule(0x10b), the title calls sceAcmContextCreate. libSceAcm is already implemented in core/libs/prx/libSceAcm.
  • Console log on origin/main for libScePsml:
    [libSceSysmodule/Export.cpp:141 sceSysmoduleLoadModule] unknown id: 311
    
  • Binary disassembly at file offset 0xe30eb0:
    0xe30eb0: mov $0x137, %edi
    0xe30eb5: call 0x74bb170        ; sceSysmoduleLoadModule(0x137)
    
    Following sceSysmoduleLoadModule(0x137), the title queries system power/thermal management services. libScePsml is already implemented in core/libs/prx/libScePsml.

Tested

  • Linux (Ubuntu 24.04 x86_64), ctest --test-dir /tmp/anyps5_build -R guest_sysmodule: 100% tests passed (guest_sysmodule, guest_sysmodule_maps_scan).
  • Empirical live run on Astro Bot (PPSA21567): warnings unknown id: 267 and unknown id: 311 are eliminated.

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
<!-- greyfinch-sync:boykopovar/AnyPS5:issue:4822924401 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/4068). Originally posted by [Kikoarl](https://github.com/Kikoarl) on 2026-10-11T22:38:36Z. --- ### What Registers the `libSceAcm` (`0x0000010b` / `267`) and `libScePsml` (`0x00000137` / `311`) module IDs in `libSceSysmodule`'s `ModuleTable.hpp` and adds lifecycle unit tests in `GuestSysmodule.cpp` (consolidating #4071 per reviewer request). **Empirical Evidence (Rule 4B):** - Title ID: `PPSA21567` (Astro Bot) - Console log on `origin/main` for `libSceAcm`: ```text [libSceSysmodule/Export.cpp:141 sceSysmoduleLoadModule] unknown id: 267 ``` - Binary disassembly at file offset `0xe30e7a`: ```asm 0xe30e7a: mov $0x10b, %edi 0xe30e7f: call 0x74bb170 ; sceSysmoduleLoadModule(0x10b) 0xe30e84: mov $0x740, %edi 0xe30e89: add -0x270(%rbp), %rdi 0xe30e90: call 0x74bbbc0 ; Relocation 0x5b8 (ZIXln2K3XMk) -> sceAcmContextCreate ``` Following `sceSysmoduleLoadModule(0x10b)`, the title calls `sceAcmContextCreate`. `libSceAcm` is already implemented in `core/libs/prx/libSceAcm`. - Console log on `origin/main` for `libScePsml`: ```text [libSceSysmodule/Export.cpp:141 sceSysmoduleLoadModule] unknown id: 311 ``` - Binary disassembly at file offset `0xe30eb0`: ```asm 0xe30eb0: mov $0x137, %edi 0xe30eb5: call 0x74bb170 ; sceSysmoduleLoadModule(0x137) ``` Following `sceSysmoduleLoadModule(0x137)`, the title queries system power/thermal management services. `libScePsml` is already implemented in `core/libs/prx/libScePsml`. ### Tested - Linux (Ubuntu 24.04 x86_64), `ctest --test-dir /tmp/anyps5_build -R guest_sysmodule`: 100% tests passed (`guest_sysmodule`, `guest_sysmodule_maps_scan`). - Empirical live run on *Astro Bot* (`PPSA21567`): warnings `unknown id: 267` and `unknown id: 311` are eliminated. ### 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
oneandonlydean commented 2026-10-12 08:25:07 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by oneandonlydean on 2026-10-12T08:25:07Z.


Conflicts with main in core/libs/tests/GuestSysmodule.cpp; please rebase. #4071 will conflict in the same place once #4069 is in, so add its 0x137 line and test block here and close #4071.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6120534297 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/4068#issuecomment-6120534297). Originally posted by [oneandonlydean](https://github.com/oneandonlydean) on 2026-10-12T08:25:07Z. --- Conflicts with main in `core/libs/tests/GuestSysmodule.cpp`; please rebase. #4071 will conflict in the same place once #4069 is in, so add its `0x137` line and test block here and close #4071.
Kikoarl commented 2026-10-12 13:49:06 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by Kikoarl on 2026-10-12T13:49:06Z.


@oneandonlydean Rebased cleanly onto latest main (c6efe068a), resolved the conflict in GuestSysmodule.cpp, and verified all guest_sysmodule tests pass. Standing by to rebase #4071 once this merges!

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6125601501 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/4068#issuecomment-6125601501). Originally posted by [Kikoarl](https://github.com/Kikoarl) on 2026-10-12T13:49:06Z. --- @oneandonlydean Rebased cleanly onto latest `main` (`c6efe068a`), resolved the conflict in `GuestSysmodule.cpp`, and verified all `guest_sysmodule` tests pass. Standing by to rebase #4071 once this merges!
Kikoarl commented 2026-10-12 14:25:37 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by Kikoarl on 2026-10-12T14:25:37Z.


@oneandonlydean Added the 0x137 (libScePsml) line and test block here alongside 0x10B (libSceAcm), updated the PR title/description, and closed #4071 as requested.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6126246947 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/4068#issuecomment-6126246947). Originally posted by [Kikoarl](https://github.com/Kikoarl) on 2026-10-12T14:25:37Z. --- @oneandonlydean Added the `0x137` (`libScePsml`) line and test block here alongside `0x10B` (`libSceAcm`), updated the PR title/description, and closed #4071 as requested.
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!4068
No description provided.