Commit Graph
5 Commits
Author SHA1 Message Date
ps54allandClaude Sonnet 5.5 db69769f42 feat(libSceCesCs): convert two-byte EUC-JP characters through the CP932 table
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>
2026-10-14 16:10:41 +02:00
ps54allandClaude Opus 5.5 61e10efbd6 feat(libSceCesCs): convert EUC-JP (CP51932) strings through a profile context
sceCesUcsProfileInitEucJpCp51932 returns a profile for EUC-JP, and
sceCesMbcsUcsContextInit now keeps the profile in the context. The
multibyte string conversions (UTF-8, UCS-2, their length queries) and
sceCesEucJpToUcs2 convert ASCII and the JIS X 0201 half-width katakana
for that profile, and every character for the existing CP1252/CP1251
profiles. Two- and three-byte JIS X 0208/0212 characters throw, since
their mapping table is not present.

Metal Gear Solid 4 Master Collection (PPSA18194) imports the set in its
game executable, which fails to load without it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-14 14:32:42 +02:00
Kikoarl e5f0938409 feat(ces): implement sceCesUcsProfileInitSJis1997Cp932 2026-10-13 15:00:31 +02:00
xXPBSXxandClaude Sonnet 5.5 66165443c0 feat(libSceCesCs): add sceCesRefersUcsProfileCp1251 and sceCesMbcsUcsContextInit
PPSA15246 (Teardown) imports both from the module-named libSceCesCs-module and
stops at the loader without them. Cp1251 joins Cp1252 in sceCesSbcToUtf8 and
sceCesUtf8ToSbc; the context initializer succeeds without storing anything
because its layout is unknown (listed in TechnicalDebt.md).

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-11 16:20:47 +02:00
Adrià FranchandClaude fb6580ae36 feat(libSceCesCs): convert single characters between CP1252 and UTF-8
sceCesRefersUcsProfileCp1252 returns the CP1252 profile, and
sceCesSbcToUtf8 / sceCesUtf8ToSbc convert one character in each
direction. The five bytes CP1252 leaves undefined map to the matching
C1 controls, so every byte round-trips. Malformed UTF-8 and code points
outside CP1252 return the library's error codes.

Co-Authored-By: Claude <noreply@anthropic.com>
2026-10-01 18:41:25 +02:00