Adds the boundary rows suggested in review: PS5 SDK 0x03FFFFFF/0x04000000
for Y/Z, 0x05FFFFFF/0x06000000 for layout 38, 0x07FFFFFF/0x08000000 for 39,
and a PS4 run of the cusa title case for 0x04FFFFFF/0x05000000,
0x08FFFFFF/0x09000000, 0x0FFFFFFF/0x10000000 and layout 39. Every expected
value matches firmware 13.42's module.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Resolves the debt-entry conflict with #10437 and applies the same layout rules to sceConvertKeycodeGetCharacterFromKeyboardData.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
GetVirtualKeycode and GetCharacter threw for keyboard layouts 31 to 39,
and GetVirtualKeycode for the Y and Z keys of layouts 2, 3 and 12, which
ended the title. GetImeKeyboardType returns layouts 31 to 37 for seven
system languages, and layout 2 for another.
They now follow firmware 13.42's module: a layout the title's SDK does not
know returns INVALID_KEYBOARD_TYPE, and below PS5 SDK 0x04000000 or PS4
SDK 0x09000000 the Y and Z keys of layouts 2, 3 and 12 are swapped.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
LookUp subtracted the first mapped type, 16, from the UserService keyboard type in 32 bits, which overflows for keyboard types below INT32_MIN + 16; sceConvertKeycodeGetImeKeyboardType passes the type it read from UserService. Compute the index in 64 bits. Every type still maps to the same IME keyboard type, and types outside the table still map to 0.
AppMetadata throws length_error for a title or title ID that does not fit its
buffer, which the title ID lookup did not catch, so a homebrew title with a long
ID made sceConvertKeycodeGetImeKeyboardType throw instead of using the PS5
fallback. Catch it with the other metadata failures and cover oversized,
malformed and missing metadata at the export. sceUserServiceGetKeyboardType also
gets a test that a malformed ANYPS5_LANGUAGE is rejected with the output left
untouched, and the debt entries say so.
sceUserServiceGetKeyboardType now returns the keyboard type of the configured
system language from the repository owner's table (languages 0 to 29), with 20
(US English) for a language outside it. The input variants stay 0, the only
value the table gives for Japanese and Traditional Chinese.
sceConvertKeycodeGetImeKeyboardType takes the PS4 client rule from the title ID
prefix (CUSA is PS4); a missing or custom ID is treated as PS5. Tests walk the
owner's table through both calls and the title ID cases; both debt entries
updated.
The signature is inferred from PPSA12361: a 16-bit keycode, a second
argument the title passes as 0, the type from
sceConvertKeycodeGetImeKeyboardType and a UTF-16 output. The keycode is a
USB HID keyboard usage and the unshifted US character is returned; a
keycode without a character returns 0. A second argument or keyboard type
other than 0 throws.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
PPSA07411 (Resident Evil 4) fails to load without these imports that no library exports. Their signatures are unknown, so they are declared without parameters and throw until they are implemented. Adds one test and a TechnicalDebt entry.
Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
20 of the 31 NIDs have names in shadPS4's aerolib list. They are declared
under those names; POSIX sleep is implemented. The NpPartner001 and Psml
MFSR2 exports stay unnamed.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Strip inline explanatory comments (comments are restricted to
technical-debt markers, #endif, and namespace-close trailers) from
HitLog.hpp, libSceConvertKeycode, libSceVoiceChat, libScePngEnc, and
the new hunk in libScePlayGo; add the missing #endif trailer comment
to HitLog.hpp's include guard. Rename the local helpers/params that
didn't match the naming convention: log_soft -> logSoft and
Readable -> readable (private free functions, camelCase), and
snake_case arguments (user_id, request_id, memory_address,
memory_size, output_info) to camelCase. NID export functions and
pre-existing upstream code (libScePlayGo's existing snake_case
parameters, PngEnc's vendored stb_image_write.h) are left untouched.
Co-Authored-By: Claude Sonnet 5 <[email protected]>
sceConvertKeycodeGetImeKeyboardType is implemented for real (reports
keyboard type 0 for a valid user id). sceConvertKeycodeGetVirtualKeycode
has an unconfirmed ABI, so it only logs its raw arguments and reports
failure rather than guessing a pointer layout.