mirror of
https://github.com/boykopovar/AnyPS5.git
synced 2026-10-22 08:33:12 -05:00
The EUC-JP profile threw on every two-byte character. It now maps the rows 0xA1-0xFE through a 94x94 table taken from Microsoft code page 932 (JIS X 0208 plus NEC row 13 and the NEC-selected IBM rows), and encodes a code point to its lowest cell. Unassigned cells answer UNASSIGNED_CODE, a bad trail byte INVALID_ENCODE, and a cut pair SRC_BUFFER_END. Three-byte JIS X 0212 characters still throw. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
3.3 KiB
3.3 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.sceCesRefersUcsProfileCp1251returns a profile accepted bysceCesSbcToUtf8andsceCesUtf8ToSbconly, 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):
sceCesUcsProfileInitEucJpCp51932marks the caller's sheet with an 8-byte tag and returns it as the profile.sceCesUtf8StrToMbcsStr,sceCesUcs2StrToMbcsStr,sceCesMbcsStrToUtf8Str,sceCesMbcsStrToUcs2Str, theirGet*Lenforms andsceCesEucJpToUcs2convert ASCII, the JIS X 0201 half-width katakana (0x8E+0xA1-0xDF, U+FF61-U+FF9F) and the two-byte rows0xA1-0xFEfor 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 at0xA1C1, 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 answersUNASSIGNED_CODE, a trail byte outside0xA1-0xFEINVALID_ENCODE, a cut pairSRC_BUFFER_END; the console's errors for these are not known. Three-byte JIS X 0212 (0x8F) characters throw: their table is not present. 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;*Lenoutputs count code units consumed and produced. A code point outside the BMP answersUNASSIGNED_CODE. Unverified on hardware. - sceCesUcsProfileInitSJis1997Cp932 (libSceCesCs) - returns the sheet argument without writing profile tables to it, and returns null for a null pointer; Shift-JIS conversion tables are unimplemented. The signature
union* sceCesUcsProfileInitSJis1997Cp932(SceCesUcsProfileSheet* sheet)follows the Orbital IDA type database
Unknown function info
- sceCesRefersUcsProfileCp1250 (libSceCesCs) - declared without parameters and returning a pointer, following
sceCesRefersUcsProfileCp1251; the signature and behavior are unverified. PPSA34501 fails to start without this export (qYu6y1E0Qbg).