Commit Graph
21 Commits
Author SHA1 Message Date
Claude b56801fc19 feat(libSceCesCs): add the code page 858 profile
sceCesRefersUcsProfileCp858 threw. It now returns a single-byte profile
accepted by sceCesSbcToUtf8, sceCesUtf8ToSbc and the MBCS context
conversions. Code page 858 is code page 850 with byte 0xD5 mapped to the
euro sign (U+20AC) instead of U+0131; that is the whole high half of
ICU's ibm-858_P100-1997.ucm. Bytes 0x00-0x7F stay unchanged, as in the
other single-byte profiles.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01FzhWRMauD3ouc8kSxT2NnT
2026-10-26 10:59:59 +00:00
orezraeyandClaude Opus 5.5 cab8c2fa88 Merge main into fix/libscecescs-jis-encode-measured-ps5
Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-24 20:07:39 -03:00
orezraeyandClaude Opus 5.5 4c3c3231d6 Merge main into fix/libscecescs-mbcs-strings-measured-ps5
Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-24 20:06:54 -03:00
boykopovar f38d29fd08 refactor(sdk): add canonical headers for remaining libraries 2026-10-24 23:17:42 +03:00
orezraeyandClaude Opus 5.5 3706b4780f test(libSceCesCs): pin the measured Shift-JIS decoding sweep
Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-23 08:27:23 -03:00
orezraeyandClaude Opus 5.5 4ec8b2d289 fix(libSceCesCs): encode EUC-JP and Shift-JIS as measured on a PS5
Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-23 08:27:22 -03:00
orezraeyandClaude Opus 5.5 5b014ba000 fix(libSceCesCs): terminate and count MBCS string conversions as measured on a PS5
The UTF-16 and UTF-32 string forms and the UTF-8 to Shift-JIS and EUC-JP
calls now share the measured string loop and UTF-8 decoder, and the
Japanese tests expect JIS X 0212 to be neither decoded nor encoded.
sceCesMbcsUcsContextInit rejects a null profile.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-23 08:17:51 -03:00
orezraey 0a33d53861 Merge branch 'fix/libscecescs-eucjp-measured-ps5' into fix/libscecescs-mbcs-strings-measured-ps5
# Conflicts:
#	core/libs/tests/GuestCes.cpp
2026-10-23 08:06:41 -03:00
orezraey 7735835ba8 Merge remote-tracking branch 'origin/main' into fix/libscecescs-eucjp-measured-ps5
# Conflicts:
#	core/libs/tests/GuestCes.cpp
#	docs/dev/debt/libSceCesCs.md
2026-10-23 08:02:15 -03:00
orezraey 803744fe85 Merge remote-tracking branch 'origin/main' into fix/libscecescs-scalar-measured-ps5
# Conflicts:
#	core/libs/prx/libSceCesCs/Export.cpp
#	core/libs/tests/GuestCes.cpp
#	docs/dev/debt/libSceCesCs.md
2026-10-23 07:55:22 -03:00
orezraeyandClaude Opus 5.5 9ae9b105bc fix(libSceCesCs): convert single EUC-JP characters as measured on a PS5
Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-22 22:08:28 -03:00
orezraeyandClaude Opus 5.5 106283e3ed fix(libSceCesCs): convert single-byte characters as measured on a PS5
Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-22 21:58:44 -03:00
NikoandClaude Opus 5.5 27c3f6ba2d feat(libSceCesCs): add 27 single-byte code page profiles
sceCesRefersUcsProfile threw for every code page except 1250, 1251 and
1252. Twenty-seven more now return a profile that sceCesSbcToUtf8,
sceCesUtf8ToSbc and the MBCS context conversions accept: ISO 8859-1,
-2, -4, -5, -9, -10, -13, -14, -15 and -16, code pages 437, 737, 775,
850, 852, 855, 860, 861, 862, 863, 865 and 866, KOI8-R, KOI8-U and
Windows 1254, 1256 and 1258.

SingleByte.hpp holds the high half of each table, taken from the
public mapping files at unicode.org: ISO8859, Microsoft's PC tables,
VENDORS/MISC for KOI8 and Microsoft's best-fit tables for 1254, 1256
and 1258, the same source and derivation as the existing Cp1250 table,
whose high half equals bestfit1250's byte table. Bytes 0x00-0x7F are
unchanged in all of them, and every table maps its 256 bytes to 256
distinct BMP characters. The three existing profiles keep their
tables; one lookup now serves them all.

Profiles whose public table leaves bytes undefined (ISO 8859-3, -6, -7,
-8, -11, code pages 857, 864, 869), maps bytes to private use (874,
1253, 1255, 1257) or has no public table here still throw.

guest_ces checks that each new profile is a distinct, stable pointer,
four bytes per table against the source, a round trip of every byte
through sceCesSbcToUtf8 and sceCesUtf8ToSbc, UNASSIGNED_CODE for a
character outside the table, and a KOI8-R string through an MBCS
context in both directions.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-21 16:36:05 +02:00
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 <[email protected]>
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 <[email protected]>
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 <[email protected]>
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 <[email protected]>
2026-10-01 18:41:25 +02:00