feat(libs): add unimplemented PS5 system library stubs and debt docs #7416

Merged
mohammad-alosta merged 7 commits from upstream-pr/7416 into main 2026-10-20 15:00:34 +00:00
mohammad-alosta commented 2026-10-18 05:22:00 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by mohammad-alosta on 2026-10-18T05:22:00Z.


What

Adds the PS5 system libraries PPSA03332 links but AnyPS5 does not provide, so the title gets past the loader instead of stopping on libSceAt9Enc.prx: cannot open shared object file, plus one SystemService silent stub.

  • libSceAt9Enc (sysmodule id 0x000000d1): five exports, names from the aerolib NID list, signatures from orbital's db_types.json. Every export throws NotImplemented_nid_no_patch(__func__); there is no encoder behind them.
  • libSceM4aacEnc (sysmodule id 0x000000bc): seventeen exports, names from the aerolib NID list. Five signatures come from orbital; the other twelve (*Ex, *WithPriority, sceM4aacEncGetContext, Initialize, Terminate) are declared without parameters because no reference gives them. Every export throws.
  • sceSystemServiceShowDisplaySafeAreaSettings returns success without showing anything, like the neighbouring sceSystemServiceShowControllerSettings: AnyPS5 has no system UI to open.

Each library has a CMakeLists.txt that builds it and registers a guest test, and each debt file records the missing behaviour under Unknown function info.

Changes since the review:

  • Dropped libSceCamera, libSceDepth2, libSceSulpha, libSceAudiodecCpu (overlaps #6847) and libSceAudiodecCpuHevag, whose only export was a made-up sceAudiodecCpuHevagUnimplemented that matches no real symbol. Only libraries whose real exports and signatures are known remain.
  • docs/dev/debt/libSceSystemService.md: the sceSystemServiceOpenChallengeActivity line is intact and the new entry is its own line.
  • Both new debt files describe the throwing stubs this PR adds instead of claiming no implementation exists; the sysmodule id 0xunknown entry is gone.
  • guest_at9_enc and guest_m4aac_enc call every new export and require it to throw, and the existing guest_system_service checks the new silent stub.

Tested

Linux (x86-64). ninja -C build libs builds and NID-patches every library, the two new ones included. ctest -R "guest_at9_enc|guest_m4aac_enc|guest_system_service" passes all three. The conventions check passes against current main.

PPSA03332 on Linux (x86-64): both libraries are in the title's DT_NEEDED, so the loader resolves them before any title code runs, and without them the title stops at start-up with

libSceAt9Enc.prx: cannot open shared object file
libSceM4aacEnc.prx: cannot open shared object file

With the stubs the title loads and runs until a later, separate stop in the AGC driver (its CMASK partial-fill refusal), which this PR does not address. The libraries are needed before any call to them can happen; the guest tests check that every export throws rather than returning a made-up success.

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 under Silent stubs in their library's technical debt file
  • 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
  • Fixes: none
  • Unblocks: PPSA03332
  • GPUs tested: n/a
  • AI-assisted: yes
<!-- greyfinch-sync:boykopovar/AnyPS5:issue:4906621635 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/7416). Originally posted by [mohammad-alosta](https://github.com/mohammad-alosta) on 2026-10-18T05:22:00Z. --- ### What Adds the PS5 system libraries PPSA03332 links but AnyPS5 does not provide, so the title gets past the loader instead of stopping on `libSceAt9Enc.prx: cannot open shared object file`, plus one SystemService silent stub. - `libSceAt9Enc` (sysmodule id `0x000000d1`): five exports, names from the aerolib NID list, signatures from orbital's `db_types.json`. Every export throws `NotImplemented_nid_no_patch(__func__)`; there is no encoder behind them. - `libSceM4aacEnc` (sysmodule id `0x000000bc`): seventeen exports, names from the aerolib NID list. Five signatures come from orbital; the other twelve (`*Ex`, `*WithPriority`, `sceM4aacEncGetContext`, `Initialize`, `Terminate`) are declared without parameters because no reference gives them. Every export throws. - `sceSystemServiceShowDisplaySafeAreaSettings` returns success without showing anything, like the neighbouring `sceSystemServiceShowControllerSettings`: AnyPS5 has no system UI to open. Each library has a `CMakeLists.txt` that builds it and registers a guest test, and each debt file records the missing behaviour under `Unknown function info`. Changes since the review: - Dropped `libSceCamera`, `libSceDepth2`, `libSceSulpha`, `libSceAudiodecCpu` (overlaps #6847) and `libSceAudiodecCpuHevag`, whose only export was a made-up `sceAudiodecCpuHevagUnimplemented` that matches no real symbol. Only libraries whose real exports and signatures are known remain. - `docs/dev/debt/libSceSystemService.md`: the `sceSystemServiceOpenChallengeActivity` line is intact and the new entry is its own line. - Both new debt files describe the throwing stubs this PR adds instead of claiming no implementation exists; the `sysmodule id 0xunknown` entry is gone. - `guest_at9_enc` and `guest_m4aac_enc` call every new export and require it to throw, and the existing `guest_system_service` checks the new silent stub. ### Tested Linux (x86-64). `ninja -C build libs` builds and NID-patches every library, the two new ones included. `ctest -R "guest_at9_enc|guest_m4aac_enc|guest_system_service"` passes all three. The conventions check passes against current `main`. PPSA03332 on Linux (x86-64): both libraries are in the title's `DT_NEEDED`, so the loader resolves them before any title code runs, and without them the title stops at start-up with ``` libSceAt9Enc.prx: cannot open shared object file libSceM4aacEnc.prx: cannot open shared object file ``` With the stubs the title loads and runs until a later, separate stop in the AGC driver (its CMASK partial-fill refusal), which this PR does not address. The libraries are needed before any call to them can happen; the guest tests check that every export throws rather than returning a made-up success. ### Checklist <!-- Rules behind each item: https://github.com/boykopovar/AnyPS5/blob/main/CONTRIBUTING.md --> - [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 under Silent stubs in their library's [technical debt](https://github.com/boykopovar/AnyPS5/tree/main/docs/dev/debt) file - [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] Fixes: none - [x] Unblocks: PPSA03332 - [x] GPUs tested: n/a - [x] AI-assisted: yes
github-actions[bot] commented 2026-10-18 05:22:40 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by github-actions[bot] on 2026-10-18T05:22:40Z.


Progress report (c21eef3 → 93a2bcb)

📉 System libraries: 71.6% (-0.27%, +1 implemented, +22 declared functions)

✅ 1 implemented
Library Name
libSceSystemService sceSystemServiceShowDisplaySafeAreaSettings
⚪ 1 behaviourally empty (constant return or throw)
Library Name
libSceSystemService sceSystemServiceShowDisplaySafeAreaSettings
🆕 22 declared as stubs
Library Name
libSceAt9Enc sceAt9EncClearContext
libSceAt9Enc sceAt9EncCreateEncoder
libSceAt9Enc sceAt9EncEncode
libSceAt9Enc sceAt9EncFlush
libSceAt9Enc sceAt9EncQueryMemSize
libSceM4aacEnc sceM4aacEncClearContext
libSceM4aacEnc sceM4aacEncClearContextEx
libSceM4aacEnc sceM4aacEncCreateEncoder
libSceM4aacEnc sceM4aacEncCreateEncoderEx
libSceM4aacEnc sceM4aacEncDeleteEncoder
libSceM4aacEnc sceM4aacEncDeleteEncoderEx
libSceM4aacEnc sceM4aacEncEncode
libSceM4aacEnc sceM4aacEncEncodeEx
libSceM4aacEnc sceM4aacEncEncodeWithPriority
libSceM4aacEnc sceM4aacEncEncodeWithPriorityEx
libSceM4aacEnc sceM4aacEncFlush
libSceM4aacEnc sceM4aacEncFlushEx
libSceM4aacEnc sceM4aacEncFlushWithPriority
libSceM4aacEnc sceM4aacEncFlushWithPriorityEx
libSceM4aacEnc sceM4aacEncGetContext
libSceM4aacEnc sceM4aacEncInitialize
libSceM4aacEnc sceM4aacEncTerminate
<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6246059874 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/7416#issuecomment-6246059874). Originally posted by [github-actions[bot]](https://github.com/apps/github-actions) on 2026-10-18T05:22:40Z. --- <!-- progress-report --> ### Progress report (c21eef3 → 93a2bcb) 📉 **System libraries**: 71.6% (-0.27%, +1 implemented, +22 declared functions) <details> <summary>✅ 1 implemented</summary> | Library | Name | | - | - | | libSceSystemService | `sceSystemServiceShowDisplaySafeAreaSettings` | </details> <details> <summary>⚪ 1 behaviourally empty (constant return or throw)</summary> | Library | Name | | - | - | | libSceSystemService | `sceSystemServiceShowDisplaySafeAreaSettings` | </details> <details> <summary>🆕 22 declared as stubs</summary> | Library | Name | | - | - | | libSceAt9Enc | `sceAt9EncClearContext` | | libSceAt9Enc | `sceAt9EncCreateEncoder` | | libSceAt9Enc | `sceAt9EncEncode` | | libSceAt9Enc | `sceAt9EncFlush` | | libSceAt9Enc | `sceAt9EncQueryMemSize` | | libSceM4aacEnc | `sceM4aacEncClearContext` | | libSceM4aacEnc | `sceM4aacEncClearContextEx` | | libSceM4aacEnc | `sceM4aacEncCreateEncoder` | | libSceM4aacEnc | `sceM4aacEncCreateEncoderEx` | | libSceM4aacEnc | `sceM4aacEncDeleteEncoder` | | libSceM4aacEnc | `sceM4aacEncDeleteEncoderEx` | | libSceM4aacEnc | `sceM4aacEncEncode` | | libSceM4aacEnc | `sceM4aacEncEncodeEx` | | libSceM4aacEnc | `sceM4aacEncEncodeWithPriority` | | libSceM4aacEnc | `sceM4aacEncEncodeWithPriorityEx` | | libSceM4aacEnc | `sceM4aacEncFlush` | | libSceM4aacEnc | `sceM4aacEncFlushEx` | | libSceM4aacEnc | `sceM4aacEncFlushWithPriority` | | libSceM4aacEnc | `sceM4aacEncFlushWithPriorityEx` | | libSceM4aacEnc | `sceM4aacEncGetContext` | | libSceM4aacEnc | `sceM4aacEncInitialize` | | libSceM4aacEnc | `sceM4aacEncTerminate` | </details>
github-actions[bot] commented 2026-10-18 05:33:23 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by github-actions[bot] on 2026-10-18T05:33:23Z.


Some comparisons could not be completed because a pull request conflicts with the base branch. Review these shared files manually before concluding that there is no overlap.

Pull request Shared files not compared
PR 6044 core/libs/tests/GuestSystemService.cpp
PR 7201 core/libs/prx/libSceSystemService/Export.cpp
<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6246138516 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/7416#issuecomment-6246138516). Originally posted by [github-actions[bot]](https://github.com/apps/github-actions) on 2026-10-18T05:33:23Z. --- <!-- pr-overlap --> Some comparisons could not be completed because a pull request conflicts with the base branch. Review these shared files manually before concluding that there is no overlap. | Pull request | Shared files not compared | |---|---| | [PR 6044](https://www.github.com/boykopovar/AnyPS5/pull/6044) | `core/libs/tests/GuestSystemService.cpp` | | [PR 7201](https://www.github.com/boykopovar/AnyPS5/pull/7201) | `core/libs/prx/libSceSystemService/Export.cpp` |
adriadam10 commented 2026-10-19 14:37:21 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by adriadam10 on 2026-10-19T14:37:21Z.

Review: CHANGES_REQUESTED


Thanks for the PR. Problems found:

  • None of the seven new directories (core/libs/prx/libSceAt9Enc, libSceAudiodecCpu, libSceAudiodecCpuHevag, libSceCamera, libSceDepth2, libSceM4aacEnc, libSceSulpha) has a CMakeLists.txt (compare libSceUsbd), so nothing is compiled or registered. The claim that all seven built does not hold for these files.
  • docs/dev/debt/libSceSystemService.md: the diff deletes the existing sceSystemServiceOpenChallengeActivity line and glues it onto the new one (...Observed with PPSA03332- [sceSystemServiceOpenChallengeActivity]...). Restore the original line and add yours separately, away from the end of the section.
  • The new debt files say there is "no core/libs/prx/<lib> implementation" and "only its entry in the sysmodule table exists", which this PR makes false. libSceDepth2.md says sysmodule id 0xunknown. libSceAt9Enc.md mixes the "related libraries" list into one file and is missing a blank line before ## Signatures.
  • libSceAudiodecCpu overlaps with #6847 (sceAudiodecCpuClearContext/Decode/InitDecoder/QueryMemSize). Coordinate or drop it from this PR.
  • Seven libraries in one PR with no evidence they are called: by your own test the title never reaches any of them, and the AGC error stops it earlier. Stubs for libraries whose signatures are unknown (Camera, Depth2, Sulpha, HEVAG) add only a made-up Unimplemented export for Hevag, which matches no real symbol. Please keep to libraries a title actually calls, with a log or a test, and drop invented exports.
  • sceSystemServiceShowDisplaySafeAreaSettings returning OK has no test and no source for the signature.

Welcome to push a revised version with those addressed.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:5573197512 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/7416#pullrequestreview-5573197512). Originally posted by [adriadam10](https://github.com/adriadam10) on 2026-10-19T14:37:21Z. **Review:** CHANGES_REQUESTED --- Thanks for the PR. Problems found: - None of the seven new directories (`core/libs/prx/libSceAt9Enc`, `libSceAudiodecCpu`, `libSceAudiodecCpuHevag`, `libSceCamera`, `libSceDepth2`, `libSceM4aacEnc`, `libSceSulpha`) has a `CMakeLists.txt` (compare `libSceUsbd`), so nothing is compiled or registered. The claim that all seven built does not hold for these files. - `docs/dev/debt/libSceSystemService.md`: the diff deletes the existing `sceSystemServiceOpenChallengeActivity` line and glues it onto the new one (`...Observed with PPSA03332- [sceSystemServiceOpenChallengeActivity]...`). Restore the original line and add yours separately, away from the end of the section. - The new debt files say there is "no `core/libs/prx/<lib>` implementation" and "only its entry in the sysmodule table exists", which this PR makes false. `libSceDepth2.md` says sysmodule id `0xunknown`. `libSceAt9Enc.md` mixes the "related libraries" list into one file and is missing a blank line before `## Signatures`. - `libSceAudiodecCpu` overlaps with #6847 (`sceAudiodecCpuClearContext/Decode/InitDecoder/QueryMemSize`). Coordinate or drop it from this PR. - Seven libraries in one PR with no evidence they are called: by your own test the title never reaches any of them, and the AGC error stops it earlier. Stubs for libraries whose signatures are unknown (Camera, Depth2, Sulpha, HEVAG) add only a made-up `Unimplemented` export for Hevag, which matches no real symbol. Please keep to libraries a title actually calls, with a log or a test, and drop invented exports. - `sceSystemServiceShowDisplaySafeAreaSettings` returning OK has no test and no source for the signature. Welcome to push a revised version with those addressed.
mohammad-alosta commented 2026-10-20 02:39:58 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by mohammad-alosta on 2026-10-20T02:39:58Z.


All six points are addressed; the branch is rebased onto current main (11 files: two
libraries, one silent stub, three tests, three debt files).

  1. CMakeLists.txt: both remaining libraries have one now, following libSceUsbd; each
    builds the library and registers a guest test. The other five directories are gone.
  2. libSceSystemService.md: the sceSystemServiceOpenChallengeActivity line is intact and
    the new entry is its own line.
  3. Debt files: rewritten under ### Unknown function info, describing the throwing stubs
    this PR adds; libSceDepth2.md, the 0xunknown id and the stray ## Signatures
    heading are gone.
  4. libSceAudiodecCpu: dropped.
  5. Scope: only the libraries with real NIDs stay; Orbital gives 5 + 5 signatures, the other
    12 M4aacEnc exports are declared without parameters, and the made-up Hevag export is
    gone. They are DT_NEEDED by PPSA03332, so the evidence is the load: without them the
    title stops at libSceAt9Enc.prx: cannot open shared object file (log in the
    description); the AGC CMASK stop after it is separate. guest_at9_enc and
    guest_m4aac_enc check that every export throws.
  6. Safe-area stub: covered by guest_system_service. No public source has its signature
    (not Orbital, SharpProspero or the 3.20 export list), so the entry records it as the
    assumed no-argument signature of its sibling sceSystemServiceShowControllerSettings,
    which is the same silent UI stub.
<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6282062879 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/7416#issuecomment-6282062879). Originally posted by [mohammad-alosta](https://github.com/mohammad-alosta) on 2026-10-20T02:39:58Z. --- All six points are addressed; the branch is rebased onto current `main` (11 files: two libraries, one silent stub, three tests, three debt files). 1. `CMakeLists.txt`: both remaining libraries have one now, following `libSceUsbd`; each builds the library and registers a guest test. The other five directories are gone. 2. `libSceSystemService.md`: the `sceSystemServiceOpenChallengeActivity` line is intact and the new entry is its own line. 3. Debt files: rewritten under `### Unknown function info`, describing the throwing stubs this PR adds; `libSceDepth2.md`, the `0xunknown` id and the stray `## Signatures` heading are gone. 4. `libSceAudiodecCpu`: dropped. 5. Scope: only the libraries with real NIDs stay; Orbital gives 5 + 5 signatures, the other 12 M4aacEnc exports are declared without parameters, and the made-up Hevag export is gone. They are `DT_NEEDED` by PPSA03332, so the evidence is the load: without them the title stops at `libSceAt9Enc.prx: cannot open shared object file` (log in the description); the AGC CMASK stop after it is separate. `guest_at9_enc` and `guest_m4aac_enc` check that every export throws. 6. Safe-area stub: covered by `guest_system_service`. No public source has its signature (not Orbital, SharpProspero or the 3.20 export list), so the entry records it as the assumed no-argument signature of its sibling `sceSystemServiceShowControllerSettings`, which is the same silent UI stub.
adriadam10 commented 2026-10-20 15:05:38 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by adriadam10 on 2026-10-20T15:05:38Z.


Re-checked against the previous review: the stub libraries with unknown signatures and the #6847 overlap are gone, both remaining libraries have a CMakeLists.txt and a registered guest test, the sceSystemServiceOpenChallengeActivity debt line is intact, and the debt entries sit under ### Unknown function info and describe the throwing stubs. The new sceSystemServiceShowDisplaySafeAreaSettings stub has a test and a debt line noting its assumed signature; merged.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6294041927 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/7416#issuecomment-6294041927). Originally posted by [adriadam10](https://github.com/adriadam10) on 2026-10-20T15:05:38Z. --- Re-checked against the previous review: the stub libraries with unknown signatures and the #6847 overlap are gone, both remaining libraries have a `CMakeLists.txt` and a registered guest test, the `sceSystemServiceOpenChallengeActivity` debt line is intact, and the debt entries sit under `### Unknown function info` and describe the throwing stubs. The new `sceSystemServiceShowDisplaySafeAreaSettings` stub has a test and a debt line noting its assumed signature; merged.
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!7416
No description provided.