feat(libSceCesCs): report the JIS X 0213 level of a cell as the console does #10751
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/10751"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Imported from boykopovar/AnyPS5. Originally posted by rooklz on 2026-10-24T21:12:46Z.
What
sceCesJisGetLevelthrew. It now reports the JIS X 0213 level of a plane, row and cell, as a PS5 does:int sceCesJisGetLevel(uint8_t plane, uint8_t row, uint8_t cell, uint32_t* level). The signature comes from the console module's disassembly (libSceCesCs.sprx, NIDhQeUMTVgPHU).I measured it on a PS5 with a homebrew payload that loads the console's
libSceCesCs.sprxand calls it for every plane 0-3, row 0-255 and cell 0-255. On the console:0x805C0020with its level; the 25 cells that need two code points count as assigned;0x805C0015and stores level 0;0x805C0001.The function uses the JIS X 0213 tables of #10426. A native build of it matches the console for all 262144 inputs.
Tested
guest_ces_jis2004sweeps every plane, row and cell, hashing result and level, and checks the hash of the console's sweep (0xD41EFACB, 11233 assigned cells), plus spot cases for each level, empty cells, the out-of-range answer and a null pointer. The otherguest_ces*tests pass.guest_ces*sources pass against thisExport.cpp.27ef055d64(verify run on my fork; Ubuntu 24.04, GCC, Release, lavapipe): everyguest_ces*test passes; its one failure,agc_driver_sgpr_pattern_fill_keys, ismain's on that runner.check_conventions.pypasses.Checklist
main; no other open PR implements the same functionsNotImplemented_nid_no_patch); silent stubs are listed under Silent stubs in their library's technical debt file.mdfiles or images added to the repository (attach them to this PR)Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-24T21:44:40Z.
Review: APPROVED
Reviewed exact head 27ef055d6402c1b376395d40a647cbfd978e6879 and its incremental 62-line change over declared prerequisite #10426. The level calculation distinguishes the JIS X 0208 ranges from the remaining plane-1 cells and plane 2; assignment status includes the 25 multi-code-point cells, and invalid plane/row/cell handling writes level zero when the output pointer is available. The exhaustive 0..3 by 0..255 by 0..255 hash and targeted cases match the reported PS5 sweep. I verified the JIS X 0213 source table permits use/modification/distribution, checked conventions and diff whitespace, and syntax-compiled the exact PR Export.cpp and GuestCesJis2004.cpp successfully. The current hosted product jobs are skipped; I did not run the exhaustive runtime sweep locally. Merge remains dependent on #10426.
Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-24T23:57:09Z.
Review: APPROVED
Reviewed the new
sceCesJisGetLevelimplementation and its exhaustive test against the prerequisite EUC-JIS-2004/Shift_JIS-2004 profile work in #10426. The bounds checks happen before table indexing, invalid coordinates zero the output when present, and valid coordinates return the level independently of whether the cell is assigned. The level classification and assignment test cover plane 2, JIS X 0208 rows, the remaining plane-1 rows, and the 25 two-code-point cells.I independently compiled this head's
Export.cppandGuestCesJis2004.cppwith GCC 12/C++20, linked the focused test directly, and ran it successfully (exit 0). That exercises the full 4 × 256 × 256 coordinate sweep and expected hash/count, along with the profile round trips.git diff --check upstream/main...headis clean.I could not run the full CMake target in this checkout because the other third-party git submodules are not initialized; the hosted product-build jobs are also path-skipped. The PR records the author's Linux and Windows test runs and the PS5 sweep used for the expected results. I did not independently reproduce the console measurement. With that limitation recorded, I found no blocking issue in this change.
Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-25T04:53:13Z.
Review: CHANGES_REQUESTED
Requesting a fix for the assigned two-code-point JIS X 0213 cells described in the inline comment. The current tests explicitly expect valid standard mappings to fail in both directions.
Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-29T06:13:49Z.
Review: APPROVED
Re-checked — approved
The console measurements you supplied resolve my earlier concern about the assigned two-code-point JIS X 0213 cells. The evidence distinguishes these specific EUC-JIS-2004/Shift_JIS-2004 mappings from other valid two-code-point sequences that do round-trip, so the measured rejection is consistent with the implementation and pinned expectations. The PR description now records those console results; the current head contains no behavior change that would invalidate the prior implementation review.
I also confirmed prerequisite #10426 is merged, this PR records it as a dependency, and the current branch is mergeable. The author reports Windows tests on a merge with current main and the prior exhaustive sweep plus macOS test results; hosted Windows and policy checks pass, while Linux hosted CI is skipped. I did not rerun the exhaustive sweep locally.
Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-31T22:31:21Z.
Review: APPROVED
Re-checked — new head, looks good
The
sceCesJisGetLevelimplementation and its exhaustive test are unchanged from the previously approved head; the rebase only reconciles the pending-export count in the debt entry.What I ran
Reviewed head
04112df6ff52bd2e12cc6eb14806daa1d87f1dc9against base1bc97b9527eaf6b56681cd3465bca67b75329161; the local merge preview against currentmainwas clean and dependency #10426 is already in the base. Environment: Debian Linux x86_64, Python 3.11.2. I compared the exact implementation and test blocks with the previously approved head0647217ecf16797ad496d6c3fe8e3a01e61cd636and ran the no-build precheck.Results
guest_ces_jis2004andguest_ces_jis2004_modulepassed 2/2 on this head.Unedited output — conventions
Unedited output — merge preview
Findings
Blocking
None.
Non-blocking
None.
Sources
Not verified