Commit Graph
8 Commits
Author SHA1 Message Date
al3w0f205 7cec462b2b test(libSceCesCs): assert null parameter and buffer validation in sceCesUcsProfileInit and sceCesMbcsStrToUtf8Str 2026-10-20 19:36:48 -05:00
Bl4ckk01 f4b090fbfd feat(libSceCesCs): implement Shift-JIS CP932 encoding conversions 2026-10-18 21:41:40 +02:00
primesoul-web 3f03bc0e24 feat(libs): finish the CesCs conversions and the AudioOut, AudioIn and GameUpdate exports
libSceCesCs goes to 17 of 17: three-byte EUC-JP JIS X 0212 (0x8F)
characters convert through a table read from the Unicode consortium's
JIS0212.TXT, both directions, so sceCesEucJpToUcs2, the MbcsStrTo*
and *Get*Len forms and the context conversions accept them, and a
character with cells in both JIS X 0208 and JIS X 0212 still encodes
to the two-byte form. sceCesRefersUcsProfileCp1250 returns a profile
with the Windows-1250 table of Microsoft's bestfit1250.txt, accepted
by the SBC and context conversions.

The AudioOut HDMI bitstream Sys family follows the Ex ports: SysOpen
opens a port only for mode 5, the TrueHD MAT route EVO-PLAYER-PS5
reads from the firmware 12.70 mode tables, paced at 192 kHz with no
host device; SysConfigureOutput accepts the observed HDMI MAT switch;
SysClose closes a Sys port. sceAudioOut2MasteringGetState fills the
states by states id with the descriptors KytyPS5 declares, SetParam
answers a null parameter with the mastering invalid-API-parameter
error, Set3DLatency follows KytyPS5's output validation (0x80268001
above 2, any user), SetSystemDebugState records the debug state id,
and GetSpeakerArrayCoefficients returns the front pair KytyPS5 and
prosper both return.

sceAudioInOpen accepts param 0x10 as float mono like KytyPS5; HqOpen
answers a longer grain or a lower rate with the invalid-size and
invalid-frequency errors; AsyncOpen also accepts the 384-sample grain
SharpProspero documents. sceGameUpdateGetAddcontLatestVersion answers
a null entitlement label with 0x80412803, as prosper does.
2026-10-18 18:52:36 +02:00
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