fix(libSceSysmodule): recognize the Acm module id #3769

Closed
danzaio wants to merge 2 commits from upstream-pr/3769 into main
danzaio commented 2026-10-11 16:36:45 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by danzaio on 2026-10-11T16:36:45Z.


What

Dungeons (PPSA16064) logs unknown id: 267 in sceSysmoduleLoadModule on main, as reported in #2811 at 5edae353. Decimal 267 is 0x10b; libSceAcm exists in the tree, but the module table had no entry for that ID. This adds the mapping to kModuleTable and tests its loaded/load/unload/unloaded cycle in GuestSysmodule.cpp.

The report's fatal stop in #2811 is in select, not this module load; this PR does not claim to fix that crash or prove gameplay. A Demon's Souls PPSA01342 test in this PR also hit an audio-copy failure on unmodified main; no menu was verified.

The ID is listed in libNidResolver's module table. This replaces #3203 and carries the evidence posted on #2952.

Tested

  • Rebased onto current pinned main, 5fe4bebe (5fe4bebec60ae1295aea301be28def2019b332ae); head 290c17b00 (290c17b0028bc2b7f64b6878a4e06ec1135b0705).
  • Windows 10, WinLibs MinGW 15.2, Release: built guest_sysmodule_tests and libSceSysmodule (-j1).
  • ctest --test-dir anyps5-build-acm --output-on-failure --no-tests=error --timeout 30 -R '^guest_sysmodule$': 1/1 passed (0.02s), zero skips.
  • Historical red-green proof: removing only the 0x10b table entry aborted guest_sysmodule with unknown id: 267; restoring it passed 1/1.
  • python tools/check_conventions.py --base 5fe4bebec60ae1295aea301be28def2019b332ae --head HEAD passed cleanly.
  • git diff --check 5fe4bebec60ae1295aea301be28def2019b332ae...HEAD clean with zero warnings.
  • Focused build and test only. Full Linux and Windows test suites were not run locally. Full CI requires a collaborator to dispatch the upstream build workflow; it has not run for this head.

Checklist

  • Based on current main
  • No other open PR implements the same functions (maintainer-selected carrier: Dean chose #3769 and requested this checkbox; #4068 remains open and overlaps the Acm mapping.)
  • 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:4820607253 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/3769). Originally posted by [danzaio](https://github.com/danzaio) on 2026-10-11T16:36:45Z. --- ### What Dungeons (PPSA16064) logs `unknown id: 267` in `sceSysmoduleLoadModule` on main, as reported in #2811 at `5edae353`. Decimal 267 is `0x10b`; `libSceAcm` exists in the tree, but the module table had no entry for that ID. This adds the mapping to `kModuleTable` and tests its loaded/load/unload/unloaded cycle in `GuestSysmodule.cpp`. The report's fatal stop in #2811 is in `select`, not this module load; this PR does not claim to fix that crash or prove gameplay. A Demon's Souls PPSA01342 test in this PR also hit an audio-copy failure on unmodified main; no menu was verified. The ID is listed in [libNidResolver's module table](https://github.com/astrelsky/libNidResolver/blob/master/source/sysmodules.c). This replaces #3203 and carries the evidence posted on #2952. ### Tested - Rebased onto current pinned `main`, `5fe4bebe` (`5fe4bebec60ae1295aea301be28def2019b332ae`); head `290c17b00` (`290c17b0028bc2b7f64b6878a4e06ec1135b0705`). - Windows 10, WinLibs MinGW 15.2, Release: built `guest_sysmodule_tests` and `libSceSysmodule` (`-j1`). - `ctest --test-dir anyps5-build-acm --output-on-failure --no-tests=error --timeout 30 -R '^guest_sysmodule$'`: 1/1 passed (0.02s), zero skips. - Historical red-green proof: removing only the `0x10b` table entry aborted `guest_sysmodule` with `unknown id: 267`; restoring it passed 1/1. - `python tools/check_conventions.py --base 5fe4bebec60ae1295aea301be28def2019b332ae --head HEAD` passed cleanly. - `git diff --check 5fe4bebec60ae1295aea301be28def2019b332ae...HEAD` clean with zero warnings. - Focused build and test only. Full Linux and Windows test suites were not run locally. Full CI requires a collaborator to dispatch the upstream build workflow; it has not run for this head. ### Checklist - [x] Based on current `main` - [x] No other open PR implements the same functions (maintainer-selected carrier: [Dean chose #3769](https://github.com/boykopovar/AnyPS5/pull/3769#issuecomment-6120520459) and requested this checkbox; #4068 remains open and overlaps the Acm mapping.) - [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`); silent stubs are listed in TechnicalDebt - [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
danzaio commented 2026-10-11 19:26:29 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by danzaio on 2026-10-11T19:26:29Z.


Rebased and pushed 9cf90ba11 onto a11c8f7f7. GitHub now reports MERGEABLE. Windows MinGW 15.2: guest_sysmodule passes 1/1; removing only the Acm mapping makes it abort with unknown id: 267; restoring it passes again. Local conventions pass, and the new GitHub conventions run is green. The body now distinguishes the Acm log from the unrelated select crash in #2811. I cannot remove the stale needs rebase label with my permissions. Could a collaborator remove it and dispatch the full build for this head? The automatic linux/windows jobs were skipped.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6112813244 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/3769#issuecomment-6112813244). Originally posted by [danzaio](https://github.com/danzaio) on 2026-10-11T19:26:29Z. --- Rebased and pushed 9cf90ba11 onto a11c8f7f7. GitHub now reports MERGEABLE. Windows MinGW 15.2: guest_sysmodule passes 1/1; removing only the Acm mapping makes it abort with unknown id: 267; restoring it passes again. Local conventions pass, and the new GitHub conventions run is green. The body now distinguishes the Acm log from the unrelated select crash in #2811. I cannot remove the stale needs rebase label with my permissions. Could a collaborator remove it and dispatch the full build for this head? The automatic linux/windows jobs were skipped.
Mouhand-Kaddo commented 2026-10-11 20:36:11 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by Mouhand-Kaddo on 2026-10-11T20:36:11Z.


Tested all three commits of this PR alone on main a11c8f7f7, Windows Release, ANYPS5_ENABLE_SPIRV_TOOLS=OFF, with a legal Demon's Souls PPSA01342 v1.04 copy (BuildVersion 2020-12-09.781263). guest_sysmodule passed (1/1).

The title reached [MSG-Init] Main loop started: 15.1976s, and a later debugger sample showed audio submitted/completed serials both at 4. It subsequently failed with:

FATAL: unhandled exception 0xc0000005 on 'BPE JobWorkerThread CPU5'
DemonsSouls.exe+0x1f91a90
read of 0x00000002f8410000

The input base was 0x2f840f010; the faulting instruction is in the guest audio sample-copy loop. Unmodified main also faults in that loop. This registers the module but does not resolve this v1.04 startup failure, and I did not verify a main menu. I have not tested this PR on Linux or with the v1.005 game update.

AI-assisted testing and report.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6113476549 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/3769#issuecomment-6113476549). Originally posted by [Mouhand-Kaddo](https://github.com/Mouhand-Kaddo) on 2026-10-11T20:36:11Z. --- Tested all three commits of this PR alone on main a11c8f7f7, Windows Release, ANYPS5_ENABLE_SPIRV_TOOLS=OFF, with a legal Demon's Souls PPSA01342 v1.04 copy (BuildVersion 2020-12-09.781263). guest_sysmodule passed (1/1). The title reached `[MSG-Init] Main loop started: 15.1976s`, and a later debugger sample showed audio submitted/completed serials both at 4. It subsequently failed with: ``` FATAL: unhandled exception 0xc0000005 on 'BPE JobWorkerThread CPU5' DemonsSouls.exe+0x1f91a90 read of 0x00000002f8410000 ``` The input base was 0x2f840f010; the faulting instruction is in the guest audio sample-copy loop. Unmodified main also faults in that loop. This registers the module but does not resolve this v1.04 startup failure, and I did not verify a main menu. I have not tested this PR on Linux or with the v1.005 game update. AI-assisted testing and report.
oneandonlydean commented 2026-10-11 23:16:41 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by oneandonlydean on 2026-10-11T23:16:41Z.


Conflicts with main in core/libs/tests/GuestSysmodule.cpp; please rebase. The red Linux build on 9cf90ba11 was agc_driver_depth_fast_clear_submit, not this change.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6115002494 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/3769#issuecomment-6115002494). Originally posted by [oneandonlydean](https://github.com/oneandonlydean) on 2026-10-11T23:16:41Z. --- Conflicts with main in `core/libs/tests/GuestSysmodule.cpp`; please rebase. The red Linux build on 9cf90ba11 was `agc_driver_depth_fast_clear_submit`, not this change.
danzaio commented 2026-10-12 02:42:06 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by danzaio on 2026-10-12T02:42:06Z.


Rebased cleanly onto main ceb342b94 with conflict resolved in GuestSysmodule.cpp (preserving both kAgcModuleId and kAcmModuleId). Local conventions pass, git diff --check clean, and guest_sysmodule passes 1/1 on Windows MinGW 15.2.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6116788286 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/3769#issuecomment-6116788286). Originally posted by [danzaio](https://github.com/danzaio) on 2026-10-12T02:42:06Z. --- Rebased cleanly onto main ceb342b94 with conflict resolved in GuestSysmodule.cpp (preserving both kAgcModuleId and kAcmModuleId). Local conventions pass, git diff --check clean, and guest_sysmodule passes 1/1 on Windows MinGW 15.2.
danzaio commented 2026-10-12 03:23:12 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by danzaio on 2026-10-12T03:23:12Z.


Rebased onto main 5fe4bebe (head 290c17b00). Preserves the upstream Agc lines in GuestSysmodule.cpp cleanly. Conventions pass, diff check is clean, and guest_sysmodule passes 1/1 on Windows MinGW 15.2. Could a collaborator dispatch the full CI workflow for this head?

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6117162264 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/3769#issuecomment-6117162264). Originally posted by [danzaio](https://github.com/danzaio) on 2026-10-12T03:23:12Z. --- Rebased onto main 5fe4bebe (head 290c17b00). Preserves the upstream Agc lines in GuestSysmodule.cpp cleanly. Conventions pass, diff check is clean, and guest_sysmodule passes 1/1 on Windows MinGW 15.2. Could a collaborator dispatch the full CI workflow for this head?
danzaio commented 2026-10-12 04:22:14 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by danzaio on 2026-10-12T04:22:14Z.


#4068 also adds the Acm mapping. I left the duplicate checklist item unchecked rather than claim otherwise; that is the only finding in the conventions run. Could a maintainer choose which PR should carry this fix? The local guest_sysmodule test passed 1/1; full CI still needs collaborator dispatch.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6117698720 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/3769#issuecomment-6117698720). Originally posted by [danzaio](https://github.com/danzaio) on 2026-10-12T04:22:14Z. --- #4068 also adds the Acm mapping. I left the duplicate checklist item unchecked rather than claim otherwise; that is the only finding in the [conventions run](https://github.com/boykopovar/AnyPS5/actions/runs/38199726667). Could a maintainer choose which PR should carry this fix? The local guest_sysmodule test passed 1/1; full CI still needs collaborator dispatch.
oneandonlydean commented 2026-10-12 08:24:11 +00:00 (Migrated from github.com)

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


This one carries it: it was opened first, and #4068 conflicts with main. Please tick the "no other open PR" item so conventions passes; that is its only finding.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6120520459 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/3769#issuecomment-6120520459). Originally posted by [oneandonlydean](https://github.com/oneandonlydean) on 2026-10-12T08:24:11Z. --- This one carries it: it was opened first, and #4068 conflicts with main. Please tick the "no other open PR" item so conventions passes; that is its only finding.
oneandonlydean commented 2026-10-12 23:30:47 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by oneandonlydean on 2026-10-12T23:30:47Z.


Closing: both module IDs (0x10b and 0x137) went in with #4068. That is my mistake to own: I told you here that this one would carry the fix and asked #4068 to rebase in the same minute, and #4068 was ready first. Your removal test (dropping the Acm mapping makes guest_sysmodule abort with unknown id: 267) is what showed the entry was needed. Thanks for the three rebases.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6134612357 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/3769#issuecomment-6134612357). Originally posted by [oneandonlydean](https://github.com/oneandonlydean) on 2026-10-12T23:30:47Z. --- Closing: both module IDs (`0x10b` and `0x137`) went in with #4068. That is my mistake to own: I told you here that this one would carry the fix and asked #4068 to rebase in the same minute, and #4068 was ready first. Your removal test (dropping the Acm mapping makes `guest_sysmodule` abort with `unknown id: 267`) is what showed the entry was needed. Thanks for the three rebases.

Pull request closed

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!3769
No description provided.