9.8 KiB
libSceIme technical debt
Silent stubs
- sceImeOpen (libSceIme) shows no panel: the text is typed on the host keyboard, which ImeTextInput forwards from the game window (SDL text input, Backspace, Delete, Left, Right, Home, End, Enter and Escape), and the controller cannot type. While a panel is open, key presses do not reach the keyboard-to-pad bindings of PadInput, as the console's panel takes the controller; key releases still do. Minecraft Preview (PPSA19639, #1277) opens it when entering a world. The external keyboard filter is accepted and never called because no keycode events are produced
Unknown function info
-
sceImeVshOpen (libSceIme) - VSH context, UTF-16 text and dictionary argument registers are recovered. The VSH parameter is copied as 256 bytes; preedit metadata is eight bytes. Dictionary operations transfer 224-byte records, with a fixed 11200-byte output for GetWords; the 64-bit dictionary selector and record fields still need receiver-side identification. These payload types remain incomplete. UpdateTextInfo and RemoteEventParam use the existing 64-byte ImeEditText and event payload at offset eight; their byte-sized repair flag permits correcting invalid text ranges and caret positions.
-
sceImeGetPanelPositionAndForm (libSceIme) - the output is taken to be the
PositionAndFormthatsceImeDialogGetPanelPositionAndFormfills. While a panel is open it reports the type, position and alignments passed tosceImeOpenand the sizesceImeGetPanelSizegives; the console's values for a panel moved by its own position adjustment are unknown. -
sceImeFilterText (libSceIme) - the behaviour follows the disassembly of
libSceIme.sprxfrom firmware 13.60 and is differential-tested against that function in an emulator, not measured on a console. ImeFilterCodepages.hpp holds the two codepage checks (helpers at 0x4850 and 0x48f0), rebuilt from Unicode's public CP932 and CP936 tables plus the Latin-1, CJK Extension A and a few other units the firmware also accepts (listed in the PR). The parameter layout beyondtypeis inferred:maskis the allowed-class bitmask, andversionandvariantderive it when it is 0. sceImeCheckFilterText throws, as its contract is unknown -
sceImeOpen, sceImeUpdate, sceImeSetText, sceImeSetCaret, sceImeClose (libSceIme) - the event ids (Open 0, UpdateText 1, UpdateCaret 2, PressClose 4, PressEnter 5), the caret directions (left 1, right 2), the error codes and the text event payload follow the PS4 reimplementation in shadPS4; none is measured on a PS5. Events are queued and delivered by
sceImeUpdateonly when it is passed the handler given tosceImeOpen, with that call'sarg. A text event pointsstrat a copy of the text kept inwork, andinputTextBufferholds the same text; both are terminated,caret_indexis the caret after the edit and the one edit area has the edit position and the change in UTF-16 units (0 for Enter and Close). An edit sends one UpdateText; a caret move sends one UpdateCaret per UTF-16 unit, as shadPS4 does. Enter inserts a line break with the multiline option and sends PressEnter otherwise; Escape sends PressClose. Typed text is cut tomaxTextLengthwithout splitting a surrogate pair, line breaks are dropped without the multiline option, and the BasicLatin, URL, mail and number types do not filter characters.sceImeOpenchecks, in shadPS4's order, the user, type, enter label, input method, option bits (thesceImeGetPanelSizemask),maxTextLength(1 to 2048), the text buffer, the position (below 1920x1080, or 3840x2160 with the over-2K option), the alignments, the extended priority and reserved bytes,work(non-null, 4-byte aligned), the handler, the reserved bytes and the initial text (no unpaired surrogate, no line break without the multiline option); shadPS4's SDK-dependent option, language and extended-option masks and its work-overlap check are not applied, and only the text copy is written towork.sceImeSetTextkeeps the caret unless the text became shorter,sceImeSetCaretrejects an index past the text with0x80bc0030, and neither sends an event.sceImeSetTextGeometryaccepts any geometry while a panel is open, since no panel is drawn -
sceImeForTestFunction returns a constant error without consuming arguments in the supplied module; unused argument types cannot be recovered from that body.
-
sceImeConfigSet and sceImeConfigGet preserve the native argument slots: an unused first slot, a 64-bit configuration value, a 32-bit key and, for set, a 32-bit value. The service receives a 24-byte request; configuration/key semantics and unused argument types remain unresolved. The getter advertises one output transfer but does not initialize its descriptor in this module. Protected bodies remain unchanged.
-
libSceIme pending exports - 2 named callable exports are listed in the PS5 3.20 export table and were cross-checked against the same module in PS5 firmware 13.60. Their signatures and behaviour are unverified; the declarations use the no-parameter unknown-signature convention and throw through
NotImplemented_nid_no_patch.
Functional
-
sceImeKeyboardOpen, sceImeKeyboardClose (libSceIme) - opening a keyboard that is already open for the same user returns
0x80bc0001(busy) and closing one that is not open returns0x80bc0002, as KytyPS5 does; it tracks one keyboard for all users, while the open state is kept per user id here, and the PS5 result is unverified -
sceImeKeyboardGetInfo (libSceIme) returns
0x80bc0023(no resource id) for every id while a keyboard is open, since the IME keyboard never reports a connected device. sceImeKeyboardSetMode validates the mode bits but the mode has no effect, as no IME keyboard events are delivered. -
sceImeKeyboardGetResourceId (libSceIme) reports that no USB keyboard is connected (
0x80bc0004, as shadPS4 does) because IME keyboard events are not delivered to the handler, although libSceKeyboard exposes the host keyboard -
sceImeOpen text filter (libSceIme) runs on the text edits of host input - typing, backspace, forward delete and a multiline Enter - following KytyPS5, not confirmed on a PS5. The host input thread only queues the edit under the IME mutex;
sceImeUpdateapplies it on the title's thread, where the filter also runs with the mutex released - like the event handler, so a filter that calls back intosceIme*cannot deadlock - and the structural edit and the filtered commit are serialized under the mutex, with a commit after the session closed or reopened dropped by a session id. The filter is guest code andImeTextFilterandImeExtKeyboardFilterare declaredAPS5_VABIlikeEventHandler. The filter is called with the edited text, a buffer ofmaxTextLengthUTF-16 units and its length; a nonzero return, an output longer than the capacity, an unpaired surrogate or, without the multiline option, a line break keeps the edit unfiltered. An accepted output replaces the text, the caret stays where the edit put it and is clamped to the text and normalized past a surrogate pair, and one UpdateText is sent with the minimal edit delta of the whole old and new text, as KytyPS5 computes it; an output equal to the previous text sends no event. Caret moves, PressEnter without multiline, PressClose,sceImeSetTextandsceImeSetCaretdo not run the filter, as in KytyPS5; asceImeSetTextorsceImeSetCaretthat lands while the filter runs bumps a revision beside the session id, and the filtered commit is dropped when either changed, as KytyPS5 drops the commit when its revision changed, so the title's own text or caret setting wins, the edit is discarded and sends no event. An external keyboard filter is accepted and stored on the session: it is called only for keyboard events that carry key data, which the host input path does not produce - it delivers text and actions, as KytyPS5's host API queues external inputs with a zeroed key and skips the filter for them - so it is never called -
sceImeVshNotifyCurrentTextInfo and sceImeVshNotifyCurrentTextInfoForReconvertText: assembly confirms seven and eight integer/pointer arguments, including the stack arguments, with no incoming SIMD parameter. Both take a context, UTF-16 string, signed 32-bit caret index and two pairs of 32-bit preedit/selection values. Pair endpoint-versus-length semantics and the reconversion option remain unresolved. Protected bodies are unchanged.