feat(libSceCesCs): add the code page 858 profile #10214

Merged
VakzOs merged 1 commit from upstream-pr/10214 into main 2026-10-26 16:03:09 +00:00
VakzOs commented 2026-10-23 14:08:34 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by VakzOs on 2026-10-23T14:08:34Z.


What

sceCesRefersUcsProfileCp858 threw. It now returns a single-byte profile that sceCesSbcToUtf8, sceCesUtf8ToSbc and the MBCS context conversions accept, like the 27 profiles added in 27c3f6ba2d.

Code page 858 is code page 850 with byte 0xD5 mapped to the euro sign (U+20AC) instead of U+0131. I compared the new table with the high half of ICU's ibm-858_P100-1997.ucm: all 128 bytes match, and 0xD5 is the only byte that differs from the existing Cp850 table. Bytes 0x00-0x7F stay unchanged as in the other single-byte profiles, not swapped as in IBM's control mapping. The assumption is recorded in docs/dev/debt/libSceCesCs.md.

Tested

Linux, GCC, Release: all 14 guest_ces* tests pass. guest_ces now runs the single-byte round trip over the new profile and checks Cp858 at 0x80, 0xD5 and 0xFF, and Cp850 at 0xD5. With U+0131 put back at 0xD5 in the Cp858 table, guest_ces fails. python3 tools/check_conventions.py --base origin/main passes. Not tested on hardware or with a title.

Checklist

  • Based on current main; no other open PR implements the same functions
  • One topic per PR; follow-ups go in a new PR
  • No comments in code except technical debt
  • Unimplemented paths throw (NotImplemented_nid_no_patch); silent stubs are listed under Silent stubs in their library's technical debt file
  • No notes, investigation .md files or images added to the repository (attach them to this PR)
  • New third-party code is a submodule built from source
  • Generic behaviour, not specific to one title
  • Depends on: #10056 (land order: #10056, then this PR; #9874 is independent)
  • Fixes: none
  • Unblocks: none
  • GPUs tested: n/a
  • AI-assisted: yes
<!-- greyfinch-sync:boykopovar/AnyPS5:issue:4984038123 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/10214). Originally posted by [VakzOs](https://github.com/VakzOs) on 2026-10-23T14:08:34Z. --- ### What `sceCesRefersUcsProfileCp858` threw. It now returns a single-byte profile that `sceCesSbcToUtf8`, `sceCesUtf8ToSbc` and the MBCS context conversions accept, like the 27 profiles added in 27c3f6ba2d. Code page 858 is code page 850 with byte `0xD5` mapped to the euro sign (U+20AC) instead of U+0131. I compared the new table with the high half of ICU's [ibm-858_P100-1997.ucm](https://github.com/unicode-org/icu-data/blob/main/charset/data/ucm/ibm-858_P100-1997.ucm): all 128 bytes match, and `0xD5` is the only byte that differs from the existing Cp850 table. Bytes `0x00`-`0x7F` stay unchanged as in the other single-byte profiles, not swapped as in IBM's control mapping. The assumption is recorded in `docs/dev/debt/libSceCesCs.md`. ### Tested Linux, GCC, Release: all 14 `guest_ces*` tests pass. `guest_ces` now runs the single-byte round trip over the new profile and checks Cp858 at `0x80`, `0xD5` and `0xFF`, and Cp850 at `0xD5`. With U+0131 put back at `0xD5` in the Cp858 table, `guest_ces` fails. `python3 tools/check_conventions.py --base origin/main` passes. Not tested on hardware or with a title. ### Checklist - [x] Based on current `main`; no other open PR implements the same functions - [x] One topic per PR; follow-ups go in a new PR - [x] No comments in code except [technical debt](https://github.com/boykopovar/AnyPS5/blob/main/docs/dev/CONVENTIONS.md) - [x] Unimplemented paths throw (`NotImplemented_nid_no_patch`); silent stubs are listed under Silent stubs in their library's [technical debt](https://github.com/boykopovar/AnyPS5/tree/main/docs/dev/debt) file - [x] No notes, investigation `.md` files or images added to the repository (attach them to this PR) - [x] New third-party code is a submodule built from source - [x] Generic behaviour, not specific to one title - [x] Depends on: #10056 (land order: #10056, then this PR; #9874 is independent) - [x] Fixes: none - [x] Unblocks: none - [x] GPUs tested: n/a - [x] AI-assisted: yes
MarcZX10 commented 2026-10-23 14:40:03 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-23T14:40:03Z.

Review: DISMISSED


Reviewed exact head 9ac21f137592e2e5a3c0bed12c7d4a669ae04c02. The new CP858 high-byte table independently matches this host's CP858 codec for all 128 bytes; hosted conventions pass, and the PR reports the 14 focused CES tests passing. Product jobs are path-skipped.

I found concrete integration conflicts that need sequencing under the repository's overlap rule. Pairwise merge previews of this head conflict with:

  • #10056 in PendingExports.cpp and docs/dev/debt/libSceCesCs.md;
  • #9874 in CES Export.cpp, PendingExports.cpp, SingleByte.hpp, GuestCes.cpp, and the CES debt file;
  • #9912 in SingleByte.hpp, GuestCes.cpp, and the CES debt file.

Please coordinate with those authors on a keep-both landing order, record the agreed dependency/order in this PR, then refresh and rerun the focused CES tests on the combined tree. Current main has advanced 395 commits from the merge base, although it does not itself modify these touched paths.

This is an integration request, not a duplicate-work finding; the CP858 getter is distinct. I have not approved until the shared-file order is explicit.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:5629847757 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/10214#pullrequestreview-5629847757). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-10-23T14:40:03Z. **Review:** DISMISSED --- Reviewed exact head `9ac21f137592e2e5a3c0bed12c7d4a669ae04c02`. The new CP858 high-byte table independently matches this host's CP858 codec for all 128 bytes; hosted conventions pass, and the PR reports the 14 focused CES tests passing. Product jobs are path-skipped. I found concrete integration conflicts that need sequencing under the repository's overlap rule. Pairwise merge previews of this head conflict with: - #10056 in `PendingExports.cpp` and `docs/dev/debt/libSceCesCs.md`; - #9874 in CES `Export.cpp`, `PendingExports.cpp`, `SingleByte.hpp`, `GuestCes.cpp`, and the CES debt file; - #9912 in `SingleByte.hpp`, `GuestCes.cpp`, and the CES debt file. Please coordinate with those authors on a keep-both landing order, record the agreed dependency/order in this PR, then refresh and rerun the focused CES tests on the combined tree. Current `main` has advanced 395 commits from the merge base, although it does not itself modify these touched paths. This is an integration request, not a duplicate-work finding; the CP858 getter is distinct. I have not approved until the shared-file order is explicit.
Sign in to join this conversation.
No reviewers
No labels
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
boykopovar/AnyPS5!10214
No description provided.