6.6 KiB
libSceKeyboard technical debt
Functional
- sceKeyboardRead and sceKeyboardReadState: guarded writes return INVALID_ARG for non-null inaccessible output spans and preserve unread history. The console's exact error code for these pointers and whether a partially writable span may receive a prefix before failure remain unverified.
- sceDbgKeyboardInit, sceDbgKeyboardOpen and sceDbgKeyboardClose (libSceKeyboard) - forward to sceKeyboardInit, sceKeyboardOpen and sceKeyboardClose, so they share their state and every gap their entries list. In firmware 13.42's
libSceKeyboard.sprx(read from disassembly, not run on a console) each of the three is a singlejmpinto that function's code (0x1c0to0xd0,0x480to0x1d0,0x700to0x490). - Keyboard handle query (libSceKeyboard) -
sceKeyboardGetHandlequeries the handle for the open keyboard assigned touserIdon primary port (type == 0,index == 0), returningKEYBOARD_ERROR_NO_HANDLE(0x80da0008) if unassigned or if type/index differ from default port 0. Both the error constant0x80da0008and the type/index port 0 constraint are inferred from user service conventions and remain unmeasured on a retail console. - sceKeyboardDebugGetDeviceId - validation and the -1 sentinel follow the retail 11.00 dump decode: not-initialized, null output, -1 written up front, no device match returns INVALID_HANDLE, a match writes the device record's id. The decode binds the handle to a live device record, so an unopened or detached handle is the no-match case; whether firmware also has the mouse-style empty-slot success path is not decoded. The reported device id is a model constant for the single emulated device.
- sceDbgKeyboardReadState - the retail 11.00 dump decode recovers its two-argument signature and shows it calls sceKeyboardReadState's shared path with a third argument of 1 instead of 0; the flag's semantic effect inside that path is not decoded, so the export stays unimplemented until the flag is understood.
- sceKeyboardGetKey2Char: initialization, output length and reserved bytes remain unverified on a console; unconverted keys retain the host's length of 0. One title (PPSA15246) disassembled for this entry calls it after clearing the first 20 bytes of its output buffer (16-byte store 0x69942d, 32-bit store 0x699435; no size argument), uses a character only when the result is 0 and the first output byte is nonzero, and then reads the 16-bit value at offset 8. Which other output fields it reads and what its other arguments mean are not shown.
- sceKeyboardOpen: a PS5 on system software 12.40 returned
0x809B0001for user-1and0x809B0081for user 0, with type and index 0 aftersceKeyboardInit. Every other id that is not a registered user gets0x809B0081too, and other negative ids keepINVALID_ARG; neither was probed, nor was the order of the user check against a bad type or index. - sceKeyboardOpen with index 1: what the console's second keyboard port answers is unverified, and so is the range of
index; the library's code was not read. PPSA15508 opens index 0 and then index 1 for the same user, with type 0 and a null parameter, and asserts unless each result is above 0 (call sites0xd76403and0xd76427). Index 1 gives a second handle, 2, for a port with no keyboard:sceKeyboardReadreturns no samples,sceKeyboardReadStatea disconnected sample of length 1,sceKeyboardGetConnectionfalse andsceKeyboardDebugGetDeviceIdINVALID_HANDLE; the host keyboard stays on index 0. Any other index keepsINVALID_ARG.
Unknown function info
-
Keyboard export
l76jptHfizMis recorded as a function with qualifierE#Ain older and later version-labelled modules. In both, dynamic metadata maps library ID 4 and module ID 0 tolibSceKeyboard. The older module-parameter words are0x08540001and0x03200004; the later words are0x13590001and0x13600007. The 17 older function NIDs under that qualifier have sorted-LF SHA-25642ee4240ba6e95c22083ea1ce753b81bdc8852b5f241675f4eecbd9bcca83ad9using the static ELF membership procedure. Version labels are not authenticated retail provenance; this digest identifies the NID set, not the binary or ABI. The export name, signature and behavior are unverified; this declaration throws. -
sceDbgKeyboardGetHandle (logical
libSceDbgKeyboard, NIDvob3PZretTg) - signature and behavior are unknown. This parameterlessintdeclaration is an import placeholder, not a verified ABI prototype; every call throws throughNotImplemented_nid_no_patch. The binding is in the 13.60 inventory. -
sceDbgKeyboardGetKey2Char and sceDbgKeyboardRead (libSceKeyboard) - names and NIDs are present in the PS5 3.20 export inventory, but no credible prototypes were found. They are declared without parameters solely to resolve known imports; this is not an ABI claim.
-
sceKeyboardGetDeviceInfo and sceKeyboardSetProcessFocus: pointer arguments are passed to device ioctls. Device-info storage is 168 bytes in the connection-query caller, but its fields and the process-focus layout remain unresolved.
-
sceKeyboardConnectPort, sceKeyboardDisconnectPort and sceKeyboardDeviceOpen: argument widths are confirmed. The meaning/order of the two 32-bit port arguments and the final 32-bit device-open argument still require the device-service backend.
-
sceKeyboardPadEmulateClose and sceKeyboardPadEmulateOpen: the supplied keyboard library has neither export; their signatures remain unresolved.