fix(libs): return what the firmware returns from 24 utility calls it does not implement #8305

Merged
hypermoist merged 2 commits from upstream-pr/8305 into main 2026-10-21 08:32:09 +00:00
hypermoist commented 2026-10-20 09:37:24 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by hypermoist on 2026-10-20T09:37:24Z.


What

These 24 exports were NotImplemented stubs. In the decrypted firmware modules (system/common/lib/*.sprx), each body is a single constant return (MoveTrackerRecordStop also clears one byte of module state). None of them makes an IPC call or a syscall or reads its arguments, so the exports now return the same value.

Library Exports Firmware result
libSceContentSearch sceContentBinderInitialize, Terminate, Start, End, Reset, IsUpdated, SearchDifference, GetNumOfDifference 0x809D000F
libSceCompanionUtil sceCompanionUtilInitialize, Terminate, OptParamInitialize, GetRemoteOskEvent 0
libSceCompanionUtil sceCompanionUtilGetEvent 0x80AD0008
libSceErrorDialog sceErrorDialogOpenDetail, OpenWithReport 0x80ED0004 (named kErrUnexpectedFatal next to the existing codes)
libSceImeDialog sceImeDialogForTestFunction 0x80BC00FF (named ErrorInternal)
libSceHttpCache sceHttpCacheSystemTerm, SystemSendStatistics 0
libSceMoveTracker sceMoveTrackerGetVersion 2
libSceMoveTracker sceMoveTrackerRecordStop 0 (the firmware also clears its "recording" byte, which nothing here reads)
libSceBluetoothHid sceBluetoothHidDebugGetVersion 0x1e
libSceSystemGesture sceSystemGestureDebugGetVersion 0x6a00
libSceMbus sceMbusTerm 0
libSceMbus sceMbusAcquireControlList 0x809B00FF

The stubs had no parameters and the firmware reads none, so only the bodies change.

Tested

Linux (CachyOS, GCC, Release): full build. ctest -R "guest_|kernel|ampr|agc|audio": 1348/1348 pass, with agc_driver_stencil_ref_export skipped as usual. check_conventions passes, and pr_overlap finds no overlap with open pull requests. No title was run.

guest_bluetooth_hid asserted that sceBluetoothHidDebugGetVersion throws, so it failed on this branch. It now checks that the call returns 0x1e; without that change the test aborts with "debug get version did not throw". No other test names any of the 24 calls.

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 (Claude Code), reviewed by the contributor

🤖 Generated with Claude Code

https://claude.ai/code/session_01RbLgECLQ2bpDM7oe2urGZK

<!-- greyfinch-sync:boykopovar/AnyPS5:issue:4933883965 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/8305). Originally posted by [hypermoist](https://github.com/hypermoist) on 2026-10-20T09:37:24Z. --- ### What These 24 exports were `NotImplemented` stubs. In the decrypted firmware modules (`system/common/lib/*.sprx`), each body is a single constant return (`MoveTrackerRecordStop` also clears one byte of module state). None of them makes an IPC call or a syscall or reads its arguments, so the exports now return the same value. | Library | Exports | Firmware result | |---|---|---| | libSceContentSearch | `sceContentBinderInitialize`, `Terminate`, `Start`, `End`, `Reset`, `IsUpdated`, `SearchDifference`, `GetNumOfDifference` | `0x809D000F` | | libSceCompanionUtil | `sceCompanionUtilInitialize`, `Terminate`, `OptParamInitialize`, `GetRemoteOskEvent` | 0 | | libSceCompanionUtil | `sceCompanionUtilGetEvent` | `0x80AD0008` | | libSceErrorDialog | `sceErrorDialogOpenDetail`, `OpenWithReport` | `0x80ED0004` (named `kErrUnexpectedFatal` next to the existing codes) | | libSceImeDialog | `sceImeDialogForTestFunction` | `0x80BC00FF` (named `ErrorInternal`) | | libSceHttpCache | `sceHttpCacheSystemTerm`, `SystemSendStatistics` | 0 | | libSceMoveTracker | `sceMoveTrackerGetVersion` | 2 | | libSceMoveTracker | `sceMoveTrackerRecordStop` | 0 (the firmware also clears its "recording" byte, which nothing here reads) | | libSceBluetoothHid | `sceBluetoothHidDebugGetVersion` | `0x1e` | | libSceSystemGesture | `sceSystemGestureDebugGetVersion` | `0x6a00` | | libSceMbus | `sceMbusTerm` | 0 | | libSceMbus | `sceMbusAcquireControlList` | `0x809B00FF` | The stubs had no parameters and the firmware reads none, so only the bodies change. ### Tested Linux (CachyOS, GCC, Release): full build. `ctest -R "guest_|kernel|ampr|agc|audio"`: 1348/1348 pass, with `agc_driver_stencil_ref_export` skipped as usual. `check_conventions` passes, and `pr_overlap` finds no overlap with open pull requests. No title was run. `guest_bluetooth_hid` asserted that `sceBluetoothHidDebugGetVersion` throws, so it failed on this branch. It now checks that the call returns `0x1e`; without that change the test aborts with "debug get version did not throw". No other test names any of the 24 calls. ### 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 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 (Claude Code), reviewed by the contributor 🤖 Generated with [Claude Code](https://claude.com/claude-code) https://claude.ai/code/session_01RbLgECLQ2bpDM7oe2urGZK
github-actions[bot] commented 2026-10-20 09:38:08 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by github-actions[bot] on 2026-10-20T09:38:08Z.


Progress report (b77bd58 → ad12ca0)

📈 System libraries: 50.2% (+0.27%, +24 implemented functions)

✅ 24 implemented
Library Name
libSceBluetoothHid sceBluetoothHidDebugGetVersion
libSceCompanionUtil sceCompanionUtilGetEvent
libSceCompanionUtil sceCompanionUtilGetRemoteOskEvent
libSceCompanionUtil sceCompanionUtilInitialize
libSceCompanionUtil sceCompanionUtilOptParamInitialize
libSceCompanionUtil sceCompanionUtilTerminate
libSceContentSearch sceContentBinderEnd
libSceContentSearch sceContentBinderGetNumOfDifference
libSceContentSearch sceContentBinderInitialize
libSceContentSearch sceContentBinderIsUpdated
libSceContentSearch sceContentBinderReset
libSceContentSearch sceContentBinderSearchDifference
libSceContentSearch sceContentBinderStart
libSceContentSearch sceContentBinderTerminate
libSceErrorDialog sceErrorDialogOpenDetail
libSceErrorDialog sceErrorDialogOpenWithReport
libSceHttpCache sceHttpCacheSystemSendStatistics
libSceHttpCache sceHttpCacheSystemTerm
libSceImeDialog sceImeDialogForTestFunction
libSceMbus sceMbusAcquireControlList
libSceMbus sceMbusTerm
libSceMoveTracker sceMoveTrackerGetVersion
libSceMoveTracker sceMoveTrackerRecordStop
libSceSystemGesture sceSystemGestureDebugGetVersion
⚪ 14 behaviourally empty (constant return or throw)
Library Name
libSceBluetoothHid sceBluetoothHidDebugGetVersion
libSceCompanionUtil sceCompanionUtilGetRemoteOskEvent
libSceCompanionUtil sceCompanionUtilInitialize
libSceCompanionUtil sceCompanionUtilOptParamInitialize
libSceCompanionUtil sceCompanionUtilTerminate
libSceErrorDialog sceErrorDialogOpenDetail
libSceErrorDialog sceErrorDialogOpenWithReport
libSceHttpCache sceHttpCacheSystemSendStatistics
libSceHttpCache sceHttpCacheSystemTerm
libSceImeDialog sceImeDialogForTestFunction
libSceMbus sceMbusTerm
libSceMoveTracker sceMoveTrackerGetVersion
libSceMoveTracker sceMoveTrackerRecordStop
libSceSystemGesture sceSystemGestureDebugGetVersion
<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6288019495 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/8305#issuecomment-6288019495). Originally posted by [github-actions[bot]](https://github.com/apps/github-actions) on 2026-10-20T09:38:08Z. --- <!-- progress-report --> ### Progress report (b77bd58 → ad12ca0) 📈 **System libraries**: 50.2% (+0.27%, +24 implemented functions) <details> <summary>✅ 24 implemented</summary> | Library | Name | | - | - | | libSceBluetoothHid | `sceBluetoothHidDebugGetVersion` | | libSceCompanionUtil | `sceCompanionUtilGetEvent` | | libSceCompanionUtil | `sceCompanionUtilGetRemoteOskEvent` | | libSceCompanionUtil | `sceCompanionUtilInitialize` | | libSceCompanionUtil | `sceCompanionUtilOptParamInitialize` | | libSceCompanionUtil | `sceCompanionUtilTerminate` | | libSceContentSearch | `sceContentBinderEnd` | | libSceContentSearch | `sceContentBinderGetNumOfDifference` | | libSceContentSearch | `sceContentBinderInitialize` | | libSceContentSearch | `sceContentBinderIsUpdated` | | libSceContentSearch | `sceContentBinderReset` | | libSceContentSearch | `sceContentBinderSearchDifference` | | libSceContentSearch | `sceContentBinderStart` | | libSceContentSearch | `sceContentBinderTerminate` | | libSceErrorDialog | `sceErrorDialogOpenDetail` | | libSceErrorDialog | `sceErrorDialogOpenWithReport` | | libSceHttpCache | `sceHttpCacheSystemSendStatistics` | | libSceHttpCache | `sceHttpCacheSystemTerm` | | libSceImeDialog | `sceImeDialogForTestFunction` | | libSceMbus | `sceMbusAcquireControlList` | | libSceMbus | `sceMbusTerm` | | libSceMoveTracker | `sceMoveTrackerGetVersion` | | libSceMoveTracker | `sceMoveTrackerRecordStop` | | libSceSystemGesture | `sceSystemGestureDebugGetVersion` | </details> <details> <summary>⚪ 14 behaviourally empty (constant return or throw)</summary> | Library | Name | | - | - | | libSceBluetoothHid | `sceBluetoothHidDebugGetVersion` | | libSceCompanionUtil | `sceCompanionUtilGetRemoteOskEvent` | | libSceCompanionUtil | `sceCompanionUtilInitialize` | | libSceCompanionUtil | `sceCompanionUtilOptParamInitialize` | | libSceCompanionUtil | `sceCompanionUtilTerminate` | | libSceErrorDialog | `sceErrorDialogOpenDetail` | | libSceErrorDialog | `sceErrorDialogOpenWithReport` | | libSceHttpCache | `sceHttpCacheSystemSendStatistics` | | libSceHttpCache | `sceHttpCacheSystemTerm` | | libSceImeDialog | `sceImeDialogForTestFunction` | | libSceMbus | `sceMbusTerm` | | libSceMoveTracker | `sceMoveTrackerGetVersion` | | libSceMoveTracker | `sceMoveTrackerRecordStop` | | libSceSystemGesture | `sceSystemGestureDebugGetVersion` | </details>
oneandonlydean commented 2026-10-21 07:01:59 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by oneandonlydean on 2026-10-21T07:01:59Z.


@hypermoist thanks. All 24 bodies match the table, but one existing test now fails: core/libs/tests/GuestBluetoothHid.cpp (ctest guest_bluetooth_hid) still requires sceBluetoothHidDebugGetVersion to throw (lines 60-65, "debug get version did not throw"). With this branch it returns 0x1e, so that Require aborts on every platform.

Please replace that block with a check of the new result, for example:

Require(sceBluetoothHidDebugGetVersion() == 0x1e, "debug get version did not return the firmware version");

No other test in core/libs names any of the 24 calls.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6310114810 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/8305#issuecomment-6310114810). Originally posted by [oneandonlydean](https://github.com/oneandonlydean) on 2026-10-21T07:01:59Z. --- @hypermoist thanks. All 24 bodies match the table, but one existing test now fails: `core/libs/tests/GuestBluetoothHid.cpp` (ctest `guest_bluetooth_hid`) still requires `sceBluetoothHidDebugGetVersion` to throw (lines 60-65, "debug get version did not throw"). With this branch it returns `0x1e`, so that `Require` aborts on every platform. Please replace that block with a check of the new result, for example: ```cpp Require(sceBluetoothHidDebugGetVersion() == 0x1e, "debug get version did not return the firmware version"); ``` No other test in `core/libs` names any of the 24 calls.
hypermoist commented 2026-10-21 07:16:52 +00:00 (Migrated from github.com)

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


@oneandonlydean thanks, you're right. I missed that test. ad12ca0066 replaces the throw check with Require(sceBluetoothHidDebugGetVersion() == 0x1e, ...). I confirmed guest_bluetooth_hid aborted with "debug get version did not throw" on the previous head, and passes now. A grep of the test sources finds no other test naming any of the 24 calls. Full Linux run: 1348/1348 pass. I've also corrected the description, which wrongly said there were no tests.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6310353884 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/8305#issuecomment-6310353884). Originally posted by [hypermoist](https://github.com/hypermoist) on 2026-10-21T07:16:52Z. --- @oneandonlydean thanks, you're right. I missed that test. ad12ca0066 replaces the throw check with `Require(sceBluetoothHidDebugGetVersion() == 0x1e, ...)`. I confirmed `guest_bluetooth_hid` aborted with "debug get version did not throw" on the previous head, and passes now. A grep of the test sources finds no other test naming any of the 24 calls. Full Linux run: 1348/1348 pass. I've also corrected the description, which wrongly said there were no tests.
oneandonlydean commented 2026-10-21 07:24:49 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by oneandonlydean on 2026-10-21T07:24:49Z.


@hypermoist thanks, checked on ad12ca0066: the only change is the sceBluetoothHidDebugGetVersion() == 0x1e check replacing the throw check. Next is a full CI run on this head.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6310481886 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/8305#issuecomment-6310481886). Originally posted by [oneandonlydean](https://github.com/oneandonlydean) on 2026-10-21T07:24:49Z. --- @hypermoist thanks, checked on `ad12ca0066`: the only change is the `sceBluetoothHidDebugGetVersion() == 0x1e` check replacing the throw check. Next is a full CI run on this head.
github-actions[bot] commented 2026-10-21 07:27:16 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by github-actions[bot] on 2026-10-21T07:27:16Z.


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/GuestBluetoothHid.cpp
<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6310522076 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/8305#issuecomment-6310522076). Originally posted by [github-actions[bot]](https://github.com/apps/github-actions) on 2026-10-21T07:27:16Z. --- <!-- 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/GuestBluetoothHid.cpp` |
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!8305
No description provided.