Repository navigation
feat(libScePad): implement scePadGetAccessibilityControllerState (zBsgF0q8DIM) - #7909
Merged
oneandonlydean merged 1 commit intoOct 19, 2026
Conversation
…gF0q8DIM) The name hashes to zBsgF0q8DIM. Signature and error order follow the OS 10.01 system module: NOT_INITIALIZED, INVALID_ARG for a NULL output, INVALID_HANDLE for a bad handle. The emulated pad is not an Access controller and reports 0.
|
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.
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.
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
zBsgF0q8DIMisscePadGetAccessibilityControllerState:compute_nid("scePadGetAccessibilityControllerState")intools/nid_names.pygiveszBsgF0q8DIM. The name is not in the aerolib list; I found it with a dictionary search over pad vocabulary. This replaces theAPS5_EXPORTalias and the throwingscePadUnknown_zBsgF0q8DIMwith the named function and its real signature, so the patchedlibScePad.prxexports the same NID from the name.Signature, errors and their order come from a static analysis of the OS 10.01 system module (
libScePad.sprx). At pseudocode level:scePadGetUsbDetectionState(sub-op 5) andscePadIsCoPilot(sub-op 0xA).The implementation keeps the three checks in the same order (
Pad::IsInitialized(),PAD_ERROR_INVALID_ARG,PAD_HANDLE) and, for the open handle, writes 0 and returns 0. The emulated pad is a DualSense, not an Access controller, so 0 is my reading of the name. It is inferred: the value a console reports for a DualSense is not measured, and the module writes 1 when the driver has no answer, so a console might report 1 for a DualSense. The debt entry records this.Title evidence: Marvel's Wolverine (PPSA03671) imports it (#4962, #5516), but the #4962 scan and a later run in #5516 found no call site, so no title is known to call it. When #6281 was closed, the reason given was that a silent 0 would hide an unknown function. With this change the function is no longer unknown: the name matches the NID, the error paths are those of the system module, and only the DualSense value is inferred. Thanks to fdfawef324 for #4962, which declared the import.
My other libScePad pull request (
n3kSX62fgNo) touches the same three files; the two merge cleanly in either order.Tested
Windows 10 (19045), WinLibs GCC 15.2.0, Release, Ninja,
mainf3bb6a4 plus this commit:ctest -R "^guest_pad":guest_padandguest_pad_vibration_modepass.guest_padchecks:scePadInit:0x80920005with a NULL and with a valid pointer, output left alone;INVALID_ARG(the NULL check comes first), a bad handle givesINVALID_HANDLEwith the output left alone, and the open handle gives 0 with*state == 0.mainthe new test does not link (undefined reference to scePadGetAccessibilityControllerState). Withmain's throwing body under the new name,guest_padaborts withscePadGetAccessibilityControllerState not implemented.libScePad.prxexportszBsgF0q8DIM(objdump -p).python tools/check_conventions.py --base origin/mainwith this title and body passes.The title was not run.
Checklist
main; no other open PR implements the same functionsNotImplemented_nid_no_patch); silent stubs are listed under Silent stubs in their library's technical debt file.mdfiles or images added to the repository (attach them to this PR)