fix(libs): return what the firmware returns from 29 more calls it does not implement #9173

Merged
hypermoist merged 4 commits from upstream-pr/9173 into main 2026-10-25 16:52:10 +00:00
hypermoist commented 2026-10-21 14:16:56 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by hypermoist on 2026-10-21T14:16:56Z.


What

These 29 exports were NotImplemented stubs. In the firmware modules (system/common/lib/<library>.sprx, firmware 13.60, read from disassembly, not measured on a console), each is a single constant return that reads no arguments and makes no IPC call or syscall, so the exports now return the same value. This follows #8303, #8305 and #8307. The names are removed from the pending-declaration lists in each library's debt file.

Library Export NID Offset in the module Firmware body Now
libSceComposite sceCompositorCreateIndirectRenderTarget meXSAmyPBUE 0x6290 mov eax, 0x80d40006; ret 0x80d40006;
libSceComposite sceCompositorDeleteIndirectRenderTarget wCqghwW7vQw 0x62a0 mov eax, 0x80d40006; ret 0x80d40006;
libSceComposite sceCompositorSetIndirectCanvasCommand -zpfGY1n49E 0x1870 xor eax, eax; ret 0
libSceComposite sceCompositorSetIndirectCompositionCommand M6wp6+JUSRI 0x1850 xor eax, eax; ret 0
libSceComposite sceCompositorSetIndirectRenderTargetConfigCommand kZ7Xre07w70 0x1860 xor eax, eax; ret 0
libSceFsInternalForVsh sceFsErriCtl iLxIuu5Xs2A 0xf5f0 mov eax, 0x8002002d; ret 0x8002002d;
libSceFsInternalForVsh sceFsErriGetState -1whCDzGK1E 0x181c0 mov eax, 0x8002002d; ret 0x8002002d;
libSceHttpCache sceHttpCacheDebugSetUrl FME0+DPciaU 0x3a5e0 xor eax, eax; ret 0
libScePlayReady scePlayReadyMemGetStats iktpef6dl3k 0x1db0 mov eax, 0x80004001; ret 0x80004001;
libSceSdma sceSdmaInitialize Xc+bwbBPK00 0x26b0 xor eax, eax; ret 0
libSceSdma sceSdmaFinalize mNFbFFiI-7A 0x2960 xor eax, eax; ret 0
libSceSdma sceSdmaQueryWorkingBufferSize 1FH-82oV3PY 0xd0 mov eax, 0x8000; ret 0x8000;
libSceSdma sceSdmaFlushAllWithEvent uHobIZSa1dI 0x2ab0 mov eax, 0x809900c9; ret 0x809900c9;
libSceSdma sceSdmaWaitForEvent rzfOSPn1w7k 0x2ac0 mov eax, 0x809900c9; ret 0x809900c9;
libSceSsl CRYPTO_uninitAsymmetricKey cW7VCIMCh9A 0x38d0 xor eax, eax; ret 0
libSceSsl VLONG_freeVlongQueue wcVuyTUr5ys 0x38e0 xor eax, eax; ret 0
libSceVisionManager sceVisionManagerOpen wzr6GTOo9Dw 0x162b0 mov eax, 0x80e70004; ret 0x80e70004;
libSceVisionManager sceVisionManagerClose P9+90HStC44 0x162c0 mov eax, 0x80e70004; ret 0x80e70004;
libSceVisionManager sceVisionManagerRequestFindUser F8aomqtpD98 0x16600 mov eax, 0x80e70004; ret 0x80e70004;
libSceVisionManager sceVisionManagerRequestFindUserInRegion iBbwD8vxSEk 0x16620 mov eax, 0x80e70004; ret 0x80e70004;
libSceVisionManager sceVisionManagerRequestFindUserWithoutIdentify CZgPsIdPqSk 0x165c0 mov eax, 0x80e70004; ret 0x80e70004;
libSceVisionManager sceVisionManagerRequestRegisterUserInRegion -RJmkkuBhaY 0x165e0 mov eax, 0x80e70004; ret 0x80e70004;
libSceVisionManager sceVisionManagerGetResultOfFindUser Nuhv71YjC+g 0x16610 mov eax, 0x80e70004; ret 0x80e70004;
libSceVisionManager sceVisionManagerGetResultOfFindUserInRegion Gop3lku7E+Q 0x16630 mov eax, 0x80e70004; ret 0x80e70004;
libSceVisionManager sceVisionManagerGetResultOfFindUserWithoutIdentify ES+vLK-z0+U 0x165d0 mov eax, 0x80e70004; ret 0x80e70004;
libSceVisionManager sceVisionManagerGetResultOfRegisterUserInRegion GYamKe-3LbY 0x165f0 mov eax, 0x80e70004; ret 0x80e70004;
libSceVisionManager sceVisionManagerLoadSettings l9zev-ybPNs 0x178a0 xor eax, eax; ret 0
libmdbg_syscore sceDebugGetProcessEventCntlFlag Zi+rAm6czUg 0x4af0 mov eax, 1; ret 1;
libmdbg_syscore sceDebugSetProcessEventCntlFlag --I4Ml0ADxQ 0x4b00 mov eax, 1; ret 1;

Left out:

  • sceCompositorGetDummyAddress and sceCompositorGetDummySize: the first returns a fixed address in the console's address space.
  • Three libSceSaveData constants (sceSaveDataDebugGetThreadId, sceSaveDataGetClientThreadPriority, sceSaveDataGetSavePoint): #7780 rewrites that file.

Tested

Linux (CachyOS, GCC), merged with current main: the eight libraries build. The new guest_firmware_constant_returns test (core/libs/tests/GuestFirmwareConstantReturns.cpp) calls all 29 exports and checks each exact return; it passes, as do the 10 existing tests matching these libraries' names. check_conventions passes. pr_overlap could not compare #6039, #8541, #8951 and #9137; I checked their hunks by hand, and none touches these functions or the debt lines edited here. No title was run.

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: none
  • GPUs tested: n/a
  • AI-assisted: yes

🤖 Generated with Claude Code

https://claude.ai/code/session_01RbLgECLQ2bpDM7oe2urGZK

<!-- greyfinch-sync:boykopovar/AnyPS5:issue:4953084451 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/9173). Originally posted by [hypermoist](https://github.com/hypermoist) on 2026-10-21T14:16:56Z. --- ### What These 29 exports were `NotImplemented` stubs. In the firmware modules (`system/common/lib/<library>.sprx`, firmware 13.60, read from disassembly, not measured on a console), each is a single constant return that reads no arguments and makes no IPC call or syscall, so the exports now return the same value. This follows #8303, #8305 and #8307. The names are removed from the pending-declaration lists in each library's debt file. | Library | Export | NID | Offset in the module | Firmware body | Now | |---|---|---|---|---|---| | libSceComposite | `sceCompositorCreateIndirectRenderTarget` | `meXSAmyPBUE` | `0x6290` | `mov eax, 0x80d40006; ret` | `0x80d40006;` | | libSceComposite | `sceCompositorDeleteIndirectRenderTarget` | `wCqghwW7vQw` | `0x62a0` | `mov eax, 0x80d40006; ret` | `0x80d40006;` | | libSceComposite | `sceCompositorSetIndirectCanvasCommand` | `-zpfGY1n49E` | `0x1870` | `xor eax, eax; ret` | 0 | | libSceComposite | `sceCompositorSetIndirectCompositionCommand` | `M6wp6+JUSRI` | `0x1850` | `xor eax, eax; ret` | 0 | | libSceComposite | `sceCompositorSetIndirectRenderTargetConfigCommand` | `kZ7Xre07w70` | `0x1860` | `xor eax, eax; ret` | 0 | | libSceFsInternalForVsh | `sceFsErriCtl` | `iLxIuu5Xs2A` | `0xf5f0` | `mov eax, 0x8002002d; ret` | `0x8002002d;` | | libSceFsInternalForVsh | `sceFsErriGetState` | `-1whCDzGK1E` | `0x181c0` | `mov eax, 0x8002002d; ret` | `0x8002002d;` | | libSceHttpCache | `sceHttpCacheDebugSetUrl` | `FME0+DPciaU` | `0x3a5e0` | `xor eax, eax; ret` | 0 | | libScePlayReady | `scePlayReadyMemGetStats` | `iktpef6dl3k` | `0x1db0` | `mov eax, 0x80004001; ret` | `0x80004001;` | | libSceSdma | `sceSdmaInitialize` | `Xc+bwbBPK00` | `0x26b0` | `xor eax, eax; ret` | 0 | | libSceSdma | `sceSdmaFinalize` | `mNFbFFiI-7A` | `0x2960` | `xor eax, eax; ret` | 0 | | libSceSdma | `sceSdmaQueryWorkingBufferSize` | `1FH-82oV3PY` | `0xd0` | `mov eax, 0x8000; ret` | `0x8000;` | | libSceSdma | `sceSdmaFlushAllWithEvent` | `uHobIZSa1dI` | `0x2ab0` | `mov eax, 0x809900c9; ret` | `0x809900c9;` | | libSceSdma | `sceSdmaWaitForEvent` | `rzfOSPn1w7k` | `0x2ac0` | `mov eax, 0x809900c9; ret` | `0x809900c9;` | | libSceSsl | `CRYPTO_uninitAsymmetricKey` | `cW7VCIMCh9A` | `0x38d0` | `xor eax, eax; ret` | 0 | | libSceSsl | `VLONG_freeVlongQueue` | `wcVuyTUr5ys` | `0x38e0` | `xor eax, eax; ret` | 0 | | libSceVisionManager | `sceVisionManagerOpen` | `wzr6GTOo9Dw` | `0x162b0` | `mov eax, 0x80e70004; ret` | `0x80e70004;` | | libSceVisionManager | `sceVisionManagerClose` | `P9+90HStC44` | `0x162c0` | `mov eax, 0x80e70004; ret` | `0x80e70004;` | | libSceVisionManager | `sceVisionManagerRequestFindUser` | `F8aomqtpD98` | `0x16600` | `mov eax, 0x80e70004; ret` | `0x80e70004;` | | libSceVisionManager | `sceVisionManagerRequestFindUserInRegion` | `iBbwD8vxSEk` | `0x16620` | `mov eax, 0x80e70004; ret` | `0x80e70004;` | | libSceVisionManager | `sceVisionManagerRequestFindUserWithoutIdentify` | `CZgPsIdPqSk` | `0x165c0` | `mov eax, 0x80e70004; ret` | `0x80e70004;` | | libSceVisionManager | `sceVisionManagerRequestRegisterUserInRegion` | `-RJmkkuBhaY` | `0x165e0` | `mov eax, 0x80e70004; ret` | `0x80e70004;` | | libSceVisionManager | `sceVisionManagerGetResultOfFindUser` | `Nuhv71YjC+g` | `0x16610` | `mov eax, 0x80e70004; ret` | `0x80e70004;` | | libSceVisionManager | `sceVisionManagerGetResultOfFindUserInRegion` | `Gop3lku7E+Q` | `0x16630` | `mov eax, 0x80e70004; ret` | `0x80e70004;` | | libSceVisionManager | `sceVisionManagerGetResultOfFindUserWithoutIdentify` | `ES+vLK-z0+U` | `0x165d0` | `mov eax, 0x80e70004; ret` | `0x80e70004;` | | libSceVisionManager | `sceVisionManagerGetResultOfRegisterUserInRegion` | `GYamKe-3LbY` | `0x165f0` | `mov eax, 0x80e70004; ret` | `0x80e70004;` | | libSceVisionManager | `sceVisionManagerLoadSettings` | `l9zev-ybPNs` | `0x178a0` | `xor eax, eax; ret` | 0 | | libmdbg_syscore | `sceDebugGetProcessEventCntlFlag` | `Zi+rAm6czUg` | `0x4af0` | `mov eax, 1; ret` | 1; | | libmdbg_syscore | `sceDebugSetProcessEventCntlFlag` | `--I4Ml0ADxQ` | `0x4b00` | `mov eax, 1; ret` | 1; | Left out: - `sceCompositorGetDummyAddress` and `sceCompositorGetDummySize`: the first returns a fixed address in the console's address space. - Three libSceSaveData constants (`sceSaveDataDebugGetThreadId`, `sceSaveDataGetClientThreadPriority`, `sceSaveDataGetSavePoint`): #7780 rewrites that file. ### Tested Linux (CachyOS, GCC), merged with current `main`: the eight libraries build. The new `guest_firmware_constant_returns` test (`core/libs/tests/GuestFirmwareConstantReturns.cpp`) calls all 29 exports and checks each exact return; it passes, as do the 10 existing tests matching these libraries' names. `check_conventions` passes. `pr_overlap` could not compare #6039, #8541, #8951 and #9137; I checked their hunks by hand, and none touches these functions or the debt lines edited here. No title was run. ### 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: none - [x] GPUs tested: n/a - [x] AI-assisted: yes 🤖 Generated with [Claude Code](https://claude.com/claude-code) https://claude.ai/code/session_01RbLgECLQ2bpDM7oe2urGZK
MarcZX10 commented 2026-10-22 08:27:11 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-22T08:27:11Z.

Review: DISMISSED


Review

The implementations are small and consistent with the stated firmware behavior. I did not find a source-level defect in the constant returns. I’m requesting changes because the submitted test counts do not exercise these new exports, and the firmware evidence is not yet specific enough to verify all 29 values.

Direct regression coverage

I searched core/libs/tests for the 29 export names in this change and found no direct references. The reported 24 library tests passing therefore do not demonstrate that these functions now return the claimed values.

Please add focused assertions that call each export and check its return constant (grouping them by library is fine). This will also ensure the changed definitions are linked and callable. Please rerun those tests after updating the branch.

Firmware evidence

The description identifies firmware 12.00 and says these bodies were read from disassembly, but the table only provides the inferred instruction shape and result. Please add concise verification context for each group (module and function offsets or an attached disassembly excerpt) so reviewers can check the 29 constant-return claims. The debt notes should continue to say these behaviors have not been measured on console.

Base and overlap

The head is 104 commits behind current main; the three-way merge check is clean, but CONTRIBUTING asks branches to stay up to date. Please rebase/update before merge and rerun the focused library tests.

The overlap report lists #6039 in docs/dev/debt/libSceSsl.md. I checked its hunk: it edits a separate entry, so I found no dependency or merge-order issue there. The other overlap PRs you checked are likewise described as separate hunks.

Checks

  • git diff --check against current main: passed.
  • Current conventions check: zero errors (five debt-length warnings in touched library debt files); hosted conventions, eligibility, labels, and report jobs passed.
  • Hosted Linux, Windows, register-context, relinker, ASan relinker, and write-watch jobs were skipped.
  • I did not build or run the library tests locally in this session. The 24 passing results in the description are author-reported and were run on the earlier base.

The firmware-derived return values are a reasonable implementation direction; direct tests and reviewable source evidence are still needed before approval.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:5611313681 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/9173#pullrequestreview-5611313681). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-10-22T08:27:11Z. **Review:** DISMISSED --- ## Review The implementations are small and consistent with the stated firmware behavior. I did not find a source-level defect in the constant returns. I’m requesting changes because the submitted test counts do not exercise these new exports, and the firmware evidence is not yet specific enough to verify all 29 values. ### Direct regression coverage I searched `core/libs/tests` for the 29 export names in this change and found no direct references. The reported 24 library tests passing therefore do not demonstrate that these functions now return the claimed values. Please add focused assertions that call each export and check its return constant (grouping them by library is fine). This will also ensure the changed definitions are linked and callable. Please rerun those tests after updating the branch. ### Firmware evidence The description identifies firmware 12.00 and says these bodies were read from disassembly, but the table only provides the inferred instruction shape and result. Please add concise verification context for each group (module and function offsets or an attached disassembly excerpt) so reviewers can check the 29 constant-return claims. The debt notes should continue to say these behaviors have not been measured on console. ### Base and overlap The head is 104 commits behind current `main`; the three-way merge check is clean, but CONTRIBUTING asks branches to stay up to date. Please rebase/update before merge and rerun the focused library tests. The overlap report lists #6039 in `docs/dev/debt/libSceSsl.md`. I checked its hunk: it edits a separate entry, so I found no dependency or merge-order issue there. The other overlap PRs you checked are likewise described as separate hunks. ### Checks - `git diff --check` against current `main`: passed. - Current conventions check: zero errors (five debt-length warnings in touched library debt files); hosted conventions, eligibility, labels, and report jobs passed. - Hosted Linux, Windows, register-context, relinker, ASan relinker, and write-watch jobs were skipped. - I did not build or run the library tests locally in this session. The 24 passing results in the description are author-reported and were run on the earlier base. The firmware-derived return values are a reasonable implementation direction; direct tests and reviewable source evidence are still needed before approval.
hypermoist commented 2026-10-22 08:50:50 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by hypermoist on 2026-10-22T08:50:50Z.


@MarcZX10 thanks, all three addressed:

  • Tests: guest_firmware_constant_returns (core/libs/tests/GuestFirmwareConstantReturns.cpp, registered in core/libs/CMakeLists.txt with the Windows DLL paths of all eight libraries) calls each of the 29 exports and checks its exact return, grouped by library. It passes on Linux, as do the existing tests for those libraries.
  • Evidence: the description table now gives each export's NID and function offset in its .sprx (firmware 12.00) next to its body. It still says the values are read from disassembly and not measured on a console, and the debt files don't claim otherwise.
  • Base: I merged current main (7b1c9cac71) before running the tests.
<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6336725288 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/9173#issuecomment-6336725288). Originally posted by [hypermoist](https://github.com/hypermoist) on 2026-10-22T08:50:50Z. --- @MarcZX10 thanks, all three addressed: - **Tests:** `guest_firmware_constant_returns` (`core/libs/tests/GuestFirmwareConstantReturns.cpp`, registered in `core/libs/CMakeLists.txt` with the Windows DLL paths of all eight libraries) calls each of the 29 exports and checks its exact return, grouped by library. It passes on Linux, as do the existing tests for those libraries. - **Evidence:** the description table now gives each export's NID and function offset in its `.sprx` (firmware 12.00) next to its body. It still says the values are read from disassembly and not measured on a console, and the debt files don't claim otherwise. - **Base:** I merged current `main` (7b1c9cac71) before running the tests.
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!9173
No description provided.