mirror of
https://github.com/boykopovar/AnyPS5.git
synced 2026-10-30 12:25:49 +00:00
24 lines
7.9 KiB
Markdown
24 lines
7.9 KiB
Markdown
# libSceImeDialog technical debt
|
|
|
|
### Silent stubs
|
|
|
|
- [sceImeDialogInit](../../../core/libs/prx/libSceImeDialog/Export.cpp) (libSceImeDialog) draws a keyboard over each flipped frame ([KeyboardOverlay](../../../core/libs/prx/libSceAgcDriver/Execution/src/KeyboardOverlay.cpp)) that the first controller drives with [shadPS4](https://github.com/shadps4-emu/shadPS4/blob/30f4170896ce974353a6f6486d0ecec179aec54b/src/core/libraries/ime/ime_kb_layout.cpp)'s bindings, and [ImeTextInput](../../../core/libs/prx/libSceVideoOut/src/ImeTextInput.cpp) forwards host keyboard typing from the game window while no IME panel is open. Text, Backspace, Delete, Left, Right, Home and End edit the text, Enter, R2 or Done accepts it (end status 0) and Escape or Circle cancels (end status 1). The title, placeholder and type are not shown or applied, and line breaks cannot be typed. While the dialog runs, key presses do not reach the keyboard-to-pad bindings of [PadInput](../../../core/libs/prx/libSceVideoOut/src/PadInput.cpp)
|
|
|
|
### Unknown function info
|
|
|
|
- [sceImeDialogForTestFunction](../../../core/libs/prx/libSceImeDialog/Export.cpp) (libSceImeDialog) - declared without parameters to resolve a known import, following [shadPS4](https://github.com/shadps4-emu/shadPS4/blob/f68923fe807f657348e6719ce658bcbd0a2b1c72/src/core/libraries/ime/ime_dialog.h#L34-L51); not measured on a console and not an ABI claim.
|
|
- [sceImeDialogGetCurrentStarState, sceImeDialogInitInternal, sceImeDialogSetPanelPosition](../../../core/libs/prx/libSceImeDialog/Export.cpp) (libSceImeDialog) - not measured on a console; signatures and checks follow [shadPS4](https://github.com/shadps4-emu/shadPS4/blob/a808e76/src/core/libraries/ime/ime_dialog.cpp). `sceImeDialogInitInternal` runs `sceImeDialogInit`, as shadPS4's two share one path apart from user flags this library does not keep. There is no movable panel, so `sceImeDialogSetPanelPosition` never succeeds: `DIALOG_NOT_IN_USE` without a dialog and `IME_SUSPENDING` while one is running or finished, the states in which shadPS4 refuses it too. The star state is always 0
|
|
- [sceImeDialogForceClose](../../../core/libs/prx/libSceImeDialog/Export.cpp) (libSceImeDialog) - not measured on a PS5: its `int (void)` signature and behaviour follow [shadPS4](https://github.com/shadps4-emu/shadPS4/blob/f68923fe807f657348e6719ce658bcbd0a2b1c72/src/core/libraries/ime/ime_dialog.cpp#L571-L601) (PS4). It closes a running or finished dialog, as `sceImeDialogTerm` does, without writing the typed text to the title's buffer, which shadPS4 updates while typing and this library only when the text is accepted, and returns `0x80bc0107` with no dialog open, the `NotInUse` code of [SharpProspero](https://github.com/SvenGDK/SharpProspero/blob/5dfdb4b0b166e83dc9ae275001afb695f12c7174/src/SharpProspero/Interop/Dialog/ImeDialog.cs#L224-L225), while this library's `sceImeDialogTerm` returns `0x80bc0002` in the same state. Closes when: measured on a PS5
|
|
- [sceImeDialogInit, sceImeDialogGetStatus, sceImeDialogGetResult, sceImeDialogAbort, sceImeDialogTerm](../../../core/libs/prx/libSceImeDialog/Export.cpp) (libSceImeDialog) - the statuses (none 0, running 1, finished 2), the end statuses (ok 0, user canceled 1, aborted 2) and the errors of `sceImeDialogInit` for an open dialog (`0x80bc0001`), a null parameter (`0x80bc0031`), a maximum text length outside 1 to 2048 (`0x80bc0016`) and a null text buffer (`0x80bc0017`) follow [shadPS4](https://github.com/shadps4-emu/shadPS4/blob/b2d7ec7d31f9ad9426db93afe079db8679b3e1e0/src/core/libraries/ime/ime_dialog.cpp); none is measured on a PS5. A result, abort or term on a dialog that is not finished, running or open returns `0x80bc0002`, where shadPS4 returns `0x80bc0105` to `0x80bc0107`, and `sceImeDialogTerm` also closes a running dialog, which shadPS4 refuses. The text reaches the title's buffer only when it is accepted
|
|
- [Pad capture](../../../core/libs/prx/libSceImeDialog/Export.cpp) (libSceImeDialog) - while the dialog's keyboard holds the controller, every pad read of every port ([PadState](../../../core/libs/prx/libScePad/src/PadState.cpp)) returns a neutral sample: buttons `0x80000000` and nothing else, sticks centred, triggers released, no touch and no motion, as [shadPS4](https://github.com/shadps4-emu/shadPS4/blob/30f4170896ce974353a6f6486d0ecec179aec54b/src/core/libraries/pad/pad.cpp#L376-L389) (PS4) reports its `Intercepted` bit. Neither the bit nor the rest of the sample is measured on a PS5. Buttons still held when the keyboard closes stay hidden from the title until each is released. Closes when: measured on a PS5
|
|
- [sceImeDialogGetResult, sceImeDialogTerm](../../../core/libs/prx/libSceImeDialog/Export.cpp) (libSceImeDialog) - while the keyboard is open, `sceImeDialogGetResult` returns `0x80bc0002` and `sceImeDialogTerm` closes the keyboard and returns 0. [shadPS4](https://github.com/shadps4-emu/shadPS4/blob/30f4170896ce974353a6f6486d0ecec179aec54b/src/core/libraries/ime/ime_dialog.cpp#L933-L939) (PS4) returns `DIALOG_NOT_FINISHED` (`0x80bc0106`) from both and keeps its keyboard open ([Term](https://github.com/shadps4-emu/shadPS4/blob/30f4170896ce974353a6f6486d0ecec179aec54b/src/core/libraries/ime/ime_dialog.cpp#L1331-L1334)). Neither is measured on a PS5. Closes when: measured on a PS5
|
|
|
|
- The following pending declarations have unverified signatures and behavior; they are parameterless import-resolution declarations and throw through `NotImplemented_nid_no_patch`: [`sceImeDialogInitInternalWithSubInfo`](../../../core/libs/prx/libSceImeDialog/Export.cpp).
|
|
|
|
### Functional
|
|
|
|
- [Text written on Done](../../../core/libs/prx/libSceImeDialog/Export.cpp) (libSceImeDialog) - the typed text reaches the title's buffer once, when Done, R2 or Enter accepts it. [shadPS4](https://github.com/shadps4-emu/shadPS4/blob/30f4170896ce974353a6f6486d0ecec179aec54b/src/core/libraries/ime/ime_dialog_ui.cpp#L1310-L1313) (PS4) writes it after every edit, and calls the title's text filter from `sceImeDialogGetStatus` while the dialog runs ([ime_dialog.cpp](https://github.com/shadps4-emu/shadPS4/blob/30f4170896ce974353a6f6486d0ecec179aec54b/src/core/libraries/ime/ime_dialog.cpp#L964-L966)) and again before the result. This library never calls the filter. A title that reads its buffer or relies on the filter while typing sees neither. Closes when: measured on a PS5
|
|
- [Keyboard redraw](../../../core/libs/prx/libSceImeDialog/Export.cpp) (libSceImeDialog) - the keyboard is drawn into the frames the title flips, from the dialog's state at each flip ([VideoOutDriver](../../../core/libs/prx/libSceVideoOut/src/VideoOutDriver.cpp)). A title that stops flipping while the dialog runs shows the last keyboard it flipped, and typing changes nothing on screen until it flips again. Closes when: a title is seen to wait on the dialog without flipping
|
|
- [Held-button repeat](../../../core/libs/prx/libSceImeDialog/src/PadKeyboard.cpp) (libSceImeDialog) - held Cross (on a character, Space, Backspace or arrow key), D-pad, Square, L1 and R1 repeat after 0.275 s and then every 0.050 s, Dear ImGui's `ImGuiIO` defaults `KeyRepeatDelay` and `KeyRepeatRate`, which [shadPS4](https://github.com/shadps4-emu/shadPS4/blob/30f4170896ce974353a6f6486d0ecec179aec54b/src/core/libraries/ime/ime_ui_shared.cpp#L756-L757) (PS4) reads. The left stick repeats on shadPS4's own tilt-scaled timings. None of these is measured on a PS5. Closes when: measured on a PS5
|
|
- [Keyboard extras](../../../core/libs/prx/libSceImeDialog/src/PadKeyboard.cpp) (libSceImeDialog) - the language switch, `...` menu and R3 settings keys of [shadPS4](https://github.com/shadps4-emu/shadPS4/blob/30f4170896ce974353a6f6486d0ecec179aec54b/src/core/libraries/ime/ime_kb_layout.cpp#L490-L492) (PS4) are left as empty cells, and there is no R3 control mode, no right-stick panel drag, no prediction pane, no top close panel ([kTopPanelDefaultElements](https://github.com/shadps4-emu/shadPS4/blob/30f4170896ce974353a6f6486d0ecec179aec54b/src/core/libraries/ime/ime_kb_layout.cpp#L966-L969)) and no copy or paste. Glyphs outside the pages, such as CJK text, are drawn as a box
|