feat(libScePad): export scePadVrControllerReadState #3110

Merged
Recapi merged 1 commit from upstream-pr/3110 into main 2026-10-11 05:54:29 +00:00
Recapi commented 2026-10-10 22:23:06 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by Recapi on 2026-10-10T22:23:06Z.


What

Exports scePadVrControllerReadState (iA-DdobUen8) from libScePad, the next stop of PS5VR (PPSA99177, catalog 1.2.0) on main. Tracked in #1578: https://github.com/boykopovar/AnyPS5/issues/1578#issuecomment-6102764139

The function throws NotImplemented, like scePadVrControllerRead next to it. The (int handle, void* state) signature comes from the title's source (app_vr.c). There it takes a PS VR2 Sense controller handle from scePadOpen type 3 or 4 and fills a 0x68-byte state: buttons at 0, stick bytes at 4 and a connected byte at 0x40. PS5VR opens the controllers only after setup() succeeds, and setup() returns early when sceHmd2Initialize fails (L599-L602). On AnyPS5 that always fails, so the title never reaches this call. The layout and the reason for throwing are recorded in TechnicalDebt.md.

Tested

Linux (Ubuntu, GCC, Release), catalog ZIP checked against its sha256, with eboot.bin and sce_module/libc.prx unwrapped as #2605 requires, relinked with --registry and run in a sandbox with no network:

  • main: ./app.elf: symbol lookup error: ./app.elf: undefined symbol: iA-DdobUen8
  • with this PR, on a3c43ad: ./app.elf: symbol lookup error: ./app.elf: undefined symbol: oxMp8uPqa+U (pthread_set_name_np, #3031)
  • guest_pad passes 3/3 (--repeat until-fail:3), and check_conventions.py passes
  • local ctest 707/708 on 262c031: the one failure, agc_driver_dcc_keys_first_write, fails the same way on a clean main build
  • fork CI green on Linux, Windows and macOS for the same commit on 262c031: https://github.com/Recapi/AnyPS5/actions/runs/38088752856

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:4814856909 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/3110). Originally posted by [Recapi](https://github.com/Recapi) on 2026-10-10T22:23:06Z. --- ### What Exports `scePadVrControllerReadState` (`iA-DdobUen8`) from libScePad, the next stop of PS5VR (PPSA99177, catalog 1.2.0) on `main`. Tracked in #1578: https://github.com/boykopovar/AnyPS5/issues/1578#issuecomment-6102764139 The function throws `NotImplemented`, like `scePadVrControllerRead` next to it. The `(int handle, void* state)` signature comes from the title's source ([`app_vr.c`](https://github.com/theghostonline/PS5VR/blob/0e408909ce7a39891a2e06eee3438d07a09e11e3/app/src/app_vr.c#L326-L369)). There it takes a PS VR2 Sense controller handle from `scePadOpen` type 3 or 4 and fills a 0x68-byte state: buttons at 0, stick bytes at 4 and a connected byte at 0x40. PS5VR opens the controllers only after `setup()` succeeds, and `setup()` returns early when `sceHmd2Initialize` fails ([L599-L602](https://github.com/theghostonline/PS5VR/blob/0e408909ce7a39891a2e06eee3438d07a09e11e3/app/src/app_vr.c#L599-L602)). On AnyPS5 that always fails, so the title never reaches this call. The layout and the reason for throwing are recorded in `TechnicalDebt.md`. ### Tested Linux (Ubuntu, GCC, Release), catalog ZIP checked against its sha256, with `eboot.bin` and `sce_module/libc.prx` unwrapped as #2605 requires, relinked with `--registry` and run in a sandbox with no network: - `main`: `./app.elf: symbol lookup error: ./app.elf: undefined symbol: iA-DdobUen8` - with this PR, on a3c43ad: `./app.elf: symbol lookup error: ./app.elf: undefined symbol: oxMp8uPqa+U` (`pthread_set_name_np`, #3031) - `guest_pad` passes 3/3 (`--repeat until-fail:3`), and `check_conventions.py` passes - local ctest 707/708 on 262c031: the one failure, `agc_driver_dcc_keys_first_write`, fails the same way on a clean `main` build - fork CI green on Linux, Windows and macOS for the same commit on 262c031: https://github.com/Recapi/AnyPS5/actions/runs/38088752856 ### 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
github-actions[bot] commented 2026-10-10 22:23:17 +00:00 (Migrated from github.com)

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


Thank you for your interest in the project! We are sorry, but we cannot accept more PRs while we work through the existing backlog. This PR has been automatically closed and labeled "intake paused". This is not a judgment of the quality of your changes.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6102815003 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/3110#issuecomment-6102815003). Originally posted by [github-actions[bot]](https://github.com/apps/github-actions) on 2026-10-10T22:23:17Z. --- Thank you for your interest in the project! We are sorry, but we cannot accept more PRs while we work through the existing backlog. This PR has been automatically closed and labeled "intake paused". This is not a judgment of the quality of your changes.
github-actions[bot] commented 2026-10-10 22:23:32 +00:00 (Migrated from github.com)

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


Progress report (a3c43ad → 2d206e3)

📉 System libraries: 84.87% (-0.03%, +1 declared functions)

🆕 1 declared as stubs
Library Name
libScePad scePadVrControllerReadState
<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6102816882 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/3110#issuecomment-6102816882). Originally posted by [github-actions[bot]](https://github.com/apps/github-actions) on 2026-10-10T22:23:32Z. --- <!-- progress-report --> ### Progress report (a3c43ad → 2d206e3) 📉 **System libraries**: 84.87% (-0.03%, +1 declared functions) <details> <summary>🆕 1 declared as stubs</summary> | Library | Name | | - | - | | libScePad | `scePadVrControllerReadState` | </details>
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!3110
No description provided.