Files

7.6 KiB

libSceCesCs technical debt

Silent stubs

  • sceCesMbcsUcsContextInit (libSceCesCs) stores the profile pointer in the first 8 bytes of the caller's context; the console's context layout is not known. It returns the invalid-parameter error for a null context. The signature int sceCesMbcsUcsContextInit(union* context, const union* mbcsUcsPrf) follows the Orbital IDA type database. sceCesRefersUcsProfileCp1251 returns a profile accepted by sceCesSbcToUtf8 and sceCesUtf8ToSbc only, with the Windows-1251 table of Microsoft's bestfit1251.txt, where byte 0x98 (unassigned) maps to U+0098 like the unassigned Cp1252 bytes; the console behavior for that byte is not verified
  • EUC-JP (CP51932) conversions (libSceCesCs): sceCesUcsProfileInitEucJpCp51932 marks the caller's sheet with an 8-byte tag and returns it as the profile. sceCesUtf8StrToMbcsStr, sceCesUcs2StrToMbcsStr, sceCesMbcsStrToUtf8Str, sceCesMbcsStrToUcs2Str, their Get*Len forms and sceCesEucJpToUcs2 convert ASCII, the JIS X 0201 half-width katakana (0x8E + 0xA1-0xDF, U+FF61-U+FF9F) and the two-byte rows 0xA1-0xFE for that profile, and every character for the CP1252 and CP1251 profiles. The two-byte table (JisX0208.hpp, 7336 of 8836 cells) is Microsoft code page 932 read through the standard JIS row/cell to Shift-JIS arithmetic, so it includes NEC row 13 and the NEC-selected IBM rows 89-92 and maps the Microsoft variants (U+FF5E at 0xA1C1, U+2225, U+FF0D, U+FFE0-U+FFE2) instead of JIS X 0208's; that the console's CP51932 table equals it is assumed from the Microsoft code page, not measured. A character with several cells encodes to the lowest cell. A well-formed but unassigned cell answers UNASSIGNED_CODE, a trail byte outside 0xA1-0xFE INVALID_ENCODE, a cut pair SRC_BUFFER_END; the console's errors for these are not known. Three-byte JIS X 0212 (0x8F) characters convert through a second table (JisX0212.hpp, 6067 of 8836 cells) read from the Unicode consortium's JIS0212.TXT; that the console's CP51932 table equals it is assumed from that mapping, not measured. A well-formed but unassigned three-byte cell answers UNASSIGNED_CODE and a cut triple SRC_BUFFER_END. A character with cells in both JIS X 0208 and JIS X 0212 encodes to the two-byte form, and one only in JIS X 0212 to the three-byte form. Signatures follow orbital. The string forms stop at the source limit or at a zero code unit, which is neither converted nor counted, and write no terminator; *Len outputs count code units consumed and produced. A code point outside the BMP answers UNASSIGNED_CODE. Unverified on hardware.
  • Shift-JIS (CP932) conversions (libSceCesCs): sceCesUcsProfileInitSJis1997Cp932 marks the caller's sheet with an 8-byte tag and returns it as the profile. sceCesUtf8StrToMbcsStr, sceCesUcs2StrToMbcsStr, sceCesMbcsStrToUtf8Str, sceCesMbcsStrToUcs2Str, and their Get*Len forms convert ASCII, JIS X 0201 half-width katakana (0xA1-0xDF, U+FF61-U+FF9F), two-byte Shift-JIS sequences (0x81-0x9F and 0xE0-0xFC lead, 0x40-0x7E and 0x80-0xFC trail) mapped to JIS X 0208 row/cell indices against the CP932 table (JisX0208.hpp), and the IBM extensions (0xFA40-0xFC4B, 388 characters) decoded to their corresponding JIS X 0208 code points. The user-defined area (0xF040-0xF9FC, which CP932 maps to Private Use Area U+E000-U+E757) and unassigned lead/trail combinations answer UNASSIGNED_CODE, an invalid lead or trail byte INVALID_ENCODE, a cut sequence SRC_BUFFER_END. Characters with multiple cells encode to the lowest cell. Signatures follow orbital. Unverified on hardware.

Unknown function info

  • Unicode scalar conversions (libSceCesCs) - console error precedence, optional length pointers and length units are unverified. Signatures follow the Orbital type database; names are in the aerolib table pinned by tools/nid_names.py. Encoding follows Unicode section 3.9. Each call converts one scalar, including zero and U+FEFF, without a terminator or byte-order detection; lengths count bytes for UTF-8 and 16-bit units for UTF-16. Native forms use host byte order (supported hosts are little-endian). Errors follow the existing CES converters, not console measurements, and failure leaves outputs unchanged. No console or title comparison has been run
  • sceCesEucJpToUtf8 (libSceCesCs) - the scalar conversion's errors and optional length pointers are unverified against the console. Its signature follows the Orbital type database linked above; it uses the existing CP51932 profile and JIS tables, with their mapping and profile-layout assumptions listed above, converts one character (including zero), and writes no terminator. Failure leaves the output and length pointers unchanged
  • sceCesRefersUcsProfileCp1250 (libSceCesCs) - returns a profile accepted by sceCesSbcToUtf8, sceCesUtf8ToSbc and the MBCS context conversions, with the Windows-1250 table of Microsoft's bestfit1250.txt, where the unassigned bytes map to their Latin-1 control characters as the Cp1252 and Cp1251 tables do; the console behavior for those bytes and the whole profile is not verified. PPSA34501 fails to start without this export (qYu6y1E0Qbg)
  • libSceCesCs firmware 3.20 pending exports - 249 symbol names are present in the PS5 3.20 libSceCesCs export list. Their signatures and console behaviour are unverified. The declarations use the existing no-parameter unknown-signature convention solely to resolve imports, and every call throws through NotImplemented_nid_no_patch.
  • EUC-KR, UHC and Big5 conversions (libSceCesCs) - the tables, errors and Big5 duplicate choices are assumed, not measured. sceCesUcsProfileInitEucKr, sceCesUcsProfileInitUhc and sceCesUcsProfileInitBig5Cp950 tag the caller's sheet like the EUC-JP profile. The tables are Microsoft's CP949.TXT and CP950.TXT; EUC-KR is CP949 limited to bytes 0xA1-0xFE. Bytes below 0x80 are ASCII; the KS X 1003 single-byte profile (sceCesEucKrUcsProfileSetSbcs) is not implemented. The user-defined areas, which Windows maps to the Private Use Area, answer UNASSIGNED_CODE. Big5 encoding takes the lower of two cells except for U+2550, U+255E, U+2561, U+256A, U+5341 and U+5345, as Windows code page 950 does. The *ToUtf8 calls convert one character and leave their outputs unchanged on failure