feat(libSceUserService): implement sceUserServiceGetAccessibilityKeyremapEnable and sceUserServiceGetAccessibilityZoom #5988

Merged
ErenYeager1836 merged 3 commits from upstream-pr/5988 into main 2026-10-18 04:41:21 +00:00
ErenYeager1836 commented 2026-10-14 18:31:33 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by ErenYeager1836 on 2026-10-14T18:31:33Z.


What

Declares sceUserServiceGetAccessibilityKeyremapEnable and sceUserServiceGetAccessibilityZoom in libSceUserService as throwing stubs calling NotImplemented_nid_no_patch per the exact-or-throw rule.

Titles such as Unity runtime games query user accessibility settings at startup. These exports complete the standard accessibility getter suite alongside sceUserServiceGetAccessibilityChatTranscription, PressAndHoldDelay, TriggerEffect, Vibration, ZoomEnabled, and ZoomFollowFocus.

The function names map to their respective NIDs in aerolib via tools/nid_names.py:

  • sceUserServiceGetAccessibilityKeyremapEnable -> xrtki9sUopg
  • sceUserServiceGetAccessibilityZoom -> 1zDEFUmBdoo

Documented under the unverified stubs section in docs/dev/debt/libSceUserService.md.

Tested

  • python tools/check_conventions.py --base upstream/main passes cleanly.
  • tools/nid_names.py derives matching NIDs (xrtki9sUopg, 1zDEFUmBdoo).
  • GuestUserService unit test suite updated with coverage asserting both stubs throw std::runtime_error.
  • Configured Windows unwind tables via configure_windows_unwind(guest_user_service_tests) in core/libs/prx/libSceUserService/CMakeLists.txt; unit test guest_user_service passes locally on Windows (100% tests passed out of 1).

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
  • Unblocks: Unity accessibility queries (e.g. PPSA12544)
  • GPUs tested: n/a
  • AI-assisted: yes
<!-- greyfinch-sync:boykopovar/AnyPS5:issue:4862616639 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/5988). Originally posted by [ErenYeager1836](https://github.com/ErenYeager1836) on 2026-10-14T18:31:33Z. --- ### What Declares `sceUserServiceGetAccessibilityKeyremapEnable` and `sceUserServiceGetAccessibilityZoom` in `libSceUserService` as throwing stubs calling `NotImplemented_nid_no_patch` per the exact-or-throw rule. Titles such as Unity runtime games query user accessibility settings at startup. These exports complete the standard accessibility getter suite alongside `sceUserServiceGetAccessibilityChatTranscription`, `PressAndHoldDelay`, `TriggerEffect`, `Vibration`, `ZoomEnabled`, and `ZoomFollowFocus`. The function names map to their respective NIDs in aerolib via `tools/nid_names.py`: - `sceUserServiceGetAccessibilityKeyremapEnable` -> `xrtki9sUopg` - `sceUserServiceGetAccessibilityZoom` -> `1zDEFUmBdoo` Documented under the unverified stubs section in `docs/dev/debt/libSceUserService.md`. ### Tested - `python tools/check_conventions.py --base upstream/main` passes cleanly. - `tools/nid_names.py` derives matching NIDs (`xrtki9sUopg`, `1zDEFUmBdoo`). - `GuestUserService` unit test suite updated with coverage asserting both stubs throw `std::runtime_error`. - Configured Windows unwind tables via `configure_windows_unwind(guest_user_service_tests)` in `core/libs/prx/libSceUserService/CMakeLists.txt`; unit test `guest_user_service` passes locally on Windows (`100% tests passed out of 1`). ### 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] Unblocks: Unity accessibility queries (e.g. PPSA12544) - [x] GPUs tested: n/a - [x] AI-assisted: yes
github-actions[bot] commented 2026-10-14 18:32:19 +00:00 (Migrated from github.com)

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


Progress report (a86577e → 432ad48)

📉 System libraries: 90.16% (-0.05%, +2 declared functions)

🆕 2 declared as stubs
Library Name
libSceUserService sceUserServiceGetAccessibilityKeyremapEnable
libSceUserService sceUserServiceGetAccessibilityZoom
<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6175497817 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/5988#issuecomment-6175497817). Originally posted by [github-actions[bot]](https://github.com/apps/github-actions) on 2026-10-14T18:32:19Z. --- <!-- progress-report --> ### Progress report (a86577e → 432ad48) 📉 **System libraries**: 90.16% (-0.05%, +2 declared functions) <details> <summary>🆕 2 declared as stubs</summary> | Library | Name | | - | - | | libSceUserService | `sceUserServiceGetAccessibilityKeyremapEnable` | | libSceUserService | `sceUserServiceGetAccessibilityZoom` | </details>
github-actions[bot] commented 2026-10-15 12:12:48 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by github-actions[bot] on 2026-10-15T12:12:48Z.


Other open pull requests touch the same code. Merging one will break the other, or both implement the same thing. If this one builds on them, list them in Depends on.

Pull request Conflicting files (lines on main) Same exports Same new files
PR 6584 docs/dev/debt/libSceUserService.md L10

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/prx/libSceUserService/CMakeLists.txt
core/libs/tests/GuestUserService.cpp
<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6191760888 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/5988#issuecomment-6191760888). Originally posted by [github-actions[bot]](https://github.com/apps/github-actions) on 2026-10-15T12:12:48Z. --- <!-- pr-overlap --> Other open pull requests touch the same code. Merging one will break the other, or both implement the same thing. If this one builds on them, list them in **Depends on**. | Pull request | Conflicting files (lines on `main`) | Same exports | Same new files | |---|---|---|---| | [PR 6584](https://www.github.com/boykopovar/AnyPS5/pull/6584) | `docs/dev/debt/libSceUserService.md` [L10](https://github.com/boykopovar/AnyPS5/blob/a86577e46473213d82a4d46e3616452c52012150/docs/dev/debt/libSceUserService.md#L10) | | | 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/prx/libSceUserService/CMakeLists.txt`<br>`core/libs/tests/GuestUserService.cpp` |
adriadam10 commented 2026-10-16 20:09:44 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by adriadam10 on 2026-10-16T20:09:44Z.

Review: DISMISSED


Thanks for the PR. Two things need fixing before this can merge:

  • core/libs/prx/libSceUserService/Export.cpp:29 and :45: the int32_t* signature and the default 0 are copied from the sibling getters, not taken from a source. shadPS4 only has parameterless stubs for both, and KytyPS5, fpPS4 and prosper-win have nothing on them. GetAccessibilityZoom in particular may report a zoom level or factor rather than a flag, so 0 is a guess. Per the "exact or throw" rule, unverified values and params must keep throwing. Either cite a source for the signature and value (a measurement on a console, or a call site in a title with the instruction offsets), or leave them as NotImplemented_nid_no_patch.
  • docs/dev/debt/libSceUserService.md:10: that line says the values are "what a PS5 (firmware 13.60) reports for a user whose accessibility settings are all at their defaults". That was measured for the six existing getters, not for these two, so adding them makes the line false. If you keep the implementation, give them their own line under the right section saying the signature and value are inferred from the sibling getters.

"Unity titles query accessibility at startup" is also not backed in the PR: which import of PPSA12544 calls these two, and what does it do with the result?

Build and ctest were not run, since the review stops at these points. Happy to look again once there is a source for the two getters.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:5553139810 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/5988#pullrequestreview-5553139810). Originally posted by [adriadam10](https://github.com/adriadam10) on 2026-10-16T20:09:44Z. **Review:** DISMISSED --- Thanks for the PR. Two things need fixing before this can merge: - `core/libs/prx/libSceUserService/Export.cpp:29` and `:45`: the `int32_t*` signature and the default `0` are copied from the sibling getters, not taken from a source. shadPS4 only has parameterless stubs for both, and KytyPS5, fpPS4 and prosper-win have nothing on them. `GetAccessibilityZoom` in particular may report a zoom level or factor rather than a flag, so `0` is a guess. Per the "exact or throw" rule, unverified values and params must keep throwing. Either cite a source for the signature and value (a measurement on a console, or a call site in a title with the instruction offsets), or leave them as `NotImplemented_nid_no_patch`. - `docs/dev/debt/libSceUserService.md:10`: that line says the values are "what a PS5 (firmware 13.60) reports for a user whose accessibility settings are all at their defaults". That was measured for the six existing getters, not for these two, so adding them makes the line false. If you keep the implementation, give them their own line under the right section saying the signature and value are inferred from the sibling getters. "Unity titles query accessibility at startup" is also not backed in the PR: which import of PPSA12544 calls these two, and what does it do with the result? Build and ctest were not run, since the review stops at these points. Happy to look again once there is a source for the two getters.
ErenYeager1836 commented 2026-10-17 03:14:03 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by ErenYeager1836 on 2026-10-17T03:14:03Z.


Thank you @adriadam10 for the feedback! Updated sceUserServiceGetAccessibilityKeyremapEnable and sceUserServiceGetAccessibilityZoom to parameterless throwing stubs calling NotImplemented_nid_no_patch per the exact-or-throw rule, added test coverage in GuestUserService verifying they throw, and restored the debt document measured defaults section while documenting the unverified stubs separately.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6228917614 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/5988#issuecomment-6228917614). Originally posted by [ErenYeager1836](https://github.com/ErenYeager1836) on 2026-10-17T03:14:03Z. --- Thank you @adriadam10 for the feedback! Updated sceUserServiceGetAccessibilityKeyremapEnable and sceUserServiceGetAccessibilityZoom to parameterless throwing stubs calling NotImplemented_nid_no_patch per the exact-or-throw rule, added test coverage in GuestUserService verifying they throw, and restored the debt document measured defaults section while documenting the unverified stubs separately.
oneandonlydean commented 2026-10-18 02:53:26 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by oneandonlydean on 2026-10-18T02:53:26Z.


Picking this up while @adriadam10 is away: we will merge it once full CI and an independent review pass on this head.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6244920846 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/5988#issuecomment-6244920846). Originally posted by [oneandonlydean](https://github.com/oneandonlydean) on 2026-10-18T02:53:26Z. --- Picking this up while @adriadam10 is away: we will merge it once full CI and an independent review pass on this head.
oneandonlydean commented 2026-10-18 03:22:54 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by oneandonlydean on 2026-10-18T03:22:54Z.


Thanks, the stubs themselves look right. One fix is needed for Windows: guest_user_service aborts there with [libc] unhandled exception 'St13runtime_error' (CI run 39090665553), because the test executable's unwind tables aren't registered, so the new catch is never reached. Please add configure_windows_unwind(guest_user_service_tests) after its target_link_libraries in core/libs/prx/libSceUserService/CMakeLists.txt, as other tests that catch do (e.g. libSceAudioIn/CMakeLists.txt:11). Optional while you're there: the PR description still describes the first version (ReportAccessibilitySetting, null-pointer checks); please update it to say these are throwing stubs.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6245149255 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/5988#issuecomment-6245149255). Originally posted by [oneandonlydean](https://github.com/oneandonlydean) on 2026-10-18T03:22:54Z. --- Thanks, the stubs themselves look right. One fix is needed for Windows: `guest_user_service` aborts there with `[libc] unhandled exception 'St13runtime_error'` (CI run 39090665553), because the test executable's unwind tables aren't registered, so the new `catch` is never reached. Please add `configure_windows_unwind(guest_user_service_tests)` after its `target_link_libraries` in `core/libs/prx/libSceUserService/CMakeLists.txt`, as other tests that catch do (e.g. `libSceAudioIn/CMakeLists.txt:11`). Optional while you're there: the PR description still describes the first version (ReportAccessibilitySetting, null-pointer checks); please update it to say these are throwing stubs.
ErenYeager1836 commented 2026-10-18 03:55:11 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by ErenYeager1836 on 2026-10-18T03:55:11Z.


Thanks @oneandonlydean for identifying the unwind table issue on Windows!

Pushed commit 432ad4839:

  • Added configure_windows_unwind(guest_user_service_tests) in core/libs/prx/libSceUserService/CMakeLists.txt after target_link_libraries.
  • Built and ran locally on Windows via CTest; guest_user_service now unwinds and catches both throwing stubs:
Test project C:/Users/mbhni/AnyPS5/build-full
Start 988: guest_user_service
1/1 Test #988: guest_user_service ...............   Passed    0.10 sec

The following tests passed:
	guest_user_service

100% tests passed out of 1
  • Updated the PR description to accurately describe the throwing stubs and unwind table configuration.
<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6245395574 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/5988#issuecomment-6245395574). Originally posted by [ErenYeager1836](https://github.com/ErenYeager1836) on 2026-10-18T03:55:11Z. --- Thanks @oneandonlydean for identifying the unwind table issue on Windows! Pushed commit `432ad4839`: - Added `configure_windows_unwind(guest_user_service_tests)` in `core/libs/prx/libSceUserService/CMakeLists.txt` after `target_link_libraries`. - Built and ran locally on Windows via CTest; `guest_user_service` now unwinds and catches both throwing stubs: ```text Test project C:/Users/mbhni/AnyPS5/build-full Start 988: guest_user_service 1/1 Test #988: guest_user_service ............... Passed 0.10 sec The following tests passed: guest_user_service 100% tests passed out of 1 ``` - Updated the PR description to accurately describe the throwing stubs and unwind table configuration.
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!5988
No description provided.