Skip to content

feat(libSceCesCs): add the code page 864 profile - #11614

Merged
oneandonlydean merged 4 commits into
boykopovar:mainfrom
noamroger:claude/project-thread-gcmyxo-cp864
Nov 5, 2026
Merged

oneandonlydean merged 4 commits into
boykopovar:mainfrom
noamroger:claude/project-thread-gcmyxo-cp864

Conversation

@noamroger

Copy link
Copy Markdown
Contributor

What

Implements sceCesRefersUcsProfileCp864, a pending export, with Microsoft's CP864.TXT table. Byte 0x25 is the Arabic percent sign U+066A, and U+0025 has no byte. The undefined bytes 0x9B, 0x9C, 0x9F, 0xA6, 0xA7 and 0xFF are 0 in the table, so they answer UNASSIGNED_CODE in both directions through the existing sbcToUnicode check.

To support the 0x25 mapping, the single-byte lookup gains a small low-byte override table (SingleByte::LOW), which sbcToUnicode and unicodeToSbc consult first. The declaration in include/Api.hpp gets the real return type, the stub leaves PendingExports.cpp (60 left), and a debt entry states what is not measured.

Tested

Linux x86-64, full build with GCC 13. ctest -R guest_ces: all 14 CesCs tests pass. GuestCes.cpp checks every Cp864 byte (the 6 undefined ones fail, the other 249 round-trip and 0x01-0x7F except 0x25 stay ASCII), U+066A ↔ 0x25, U+0025 unassigned, and decoding/encoding through an MBCS context. The table matches Python's cp864 codec byte for byte. tools/check_conventions.py --base origin/main passes. Not tested on a PS5.

Checklist

Generated with Claude Code

@github-actions

github-actions Bot commented Oct 26, 2026 •

Copy link
Copy Markdown

Progress report (9f9e420 → e44de95)

📈 System libraries: 26.74% (+0.0027%, +1 implemented functions)

✅ 1 implemented
Library Name
libSceCesCs sceCesRefersUcsProfileCp864

Changed libraries (implemented exports)

Library Before After Change
libSceCesCs 278/287 (96.86%) 279/287 (97.21%) +0.35%

@MarcZX10 MarcZX10 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed head 2d0f7e214c72883c1b4e4c66b1f39232c4ef853c. The CP864 profile is registered as a distinct single-byte profile, its byte 0x25 override is consulted in both directions, and the undefined 0x0000 table cells flow through the existing unassigned-code handling. The pending export is removed and the API declaration now has the profile-pointer return type. The added MBCS checks cover the special low-byte mapping, representative high-byte mappings, undefined bytes, and round-trip conversion. The PR reports a full Python cp864 table comparison and 14 passing guest_ces tests; I did not rerun them locally. Hosted eligibility, conventions, intake, labels and progress report pass; the build/relinker jobs are skipped by path policy, so no hosted C++ test run is available. I found no blocking issue in the diff.

@github-actions

github-actions Bot commented Oct 27, 2026 •

Copy link
Copy Markdown

Other open pull requests touch the same code. Merging one will break the other, or both implement the same thing. If this one builds on them, list them in Depends on.

Pull request Conflicting files (lines on main) Same exports Same new files
PR 14085 docs/dev/debt/libSceCesCs.md L29-30
PR 15409 sceCesRefersUcsProfileCp864

Some comparisons could not be completed because a pull request conflicts with the base branch. Review these shared files manually before concluding that there is no overlap.

Pull request Shared files not compared
PR 9912 core/libs/prx/libSceCesCs/Export.cpp
core/libs/prx/libSceCesCs/PendingExports.cpp
core/libs/prx/libSceCesCs/SingleByte.hpp
core/libs/tests/GuestCes.cpp
docs/dev/debt/libSceCesCs.md
PR 12946 core/libs/prx/libSceCesCs/Export.cpp
core/libs/prx/libSceCesCs/PendingExports.cpp
core/libs/prx/libSceCesCs/include/Api.hpp
docs/dev/debt/libSceCesCs.md
PR 13486 core/libs/prx/libSceCesCs/Export.cpp
core/libs/prx/libSceCesCs/PendingExports.cpp
core/libs/prx/libSceCesCs/include/Api.hpp
docs/dev/debt/libSceCesCs.md
PR 13573 core/libs/prx/libSceCesCs/Export.cpp
core/libs/prx/libSceCesCs/PendingExports.cpp
core/libs/prx/libSceCesCs/include/Api.hpp
docs/dev/debt/libSceCesCs.md
PR 14212 docs/dev/debt/libSceCesCs.md
PR 15409 core/libs/prx/libSceCesCs/Export.cpp
core/libs/prx/libSceCesCs/PendingExports.cpp
core/libs/prx/libSceCesCs/SingleByte.hpp
core/libs/prx/libSceCesCs/include/Api.hpp
core/libs/tests/GuestCes.cpp
docs/dev/debt/libSceCesCs.md

@github-actions github-actions Bot added docs prx needs rebase Conflicts with main, rebase needed labels Oct 27, 2026
@noamroger
noamroger force-pushed the claude/project-thread-gcmyxo-cp864 branch from 2d0f7e2 to 55887e1 Compare October 27, 2026 10:03
@noamroger

Copy link
Copy Markdown
Contributor Author

Rebased on main 801d5b9 (the pending-exports count in the debt file had moved after #10426 and #10739 were merged). I re-checked the PRs the overlap bot lists, #9912, #10056, #10428, #10430, #10431 and #10751: none of them implements sceCesRefersUcsProfileCp864, and they only share neighbouring lines in SingleByte.hpp, Export.cpp, PendingExports.cpp, include/Api.hpp and the debt file.

@atharvjairath, @rooklz, @SkillzTech1: would it suit you if this one goes after your CesCs PRs? It is small, so I can rebase it whenever one of them is merged. If you prefer another order, tell me and I'll declare it with Depends on.

@maskym

maskym commented Oct 27, 2026

Copy link
Copy Markdown
Contributor

Windows result for head 55887e1c10, merged into main 2ee8e9751a (the PR's Tested section names no Windows run).

Host: Windows 11 26300, Intel i7-12700K, WinLibs GCC 15.2.0 (x86_64-ucrt-posix-seh, r6), Release, BUILD_TESTING=ON, Ninja. Build clean.

The tree also carried the open PRs #11172, #10780, #10729, #10631, #10582, #11547, #11584, #11572, all merged cleanly, so the run is a joint one; the tests of this PR are guest_ces, guest_ces_module, guest_ces_dbcs, guest_ces_dbcs_module. #10751 conflicts textually with this PR in libSceCesCs, so it was tested in a separate tree. Together with the whole libc, CesCs, Font, FreeType, LibreSsl3 and NpUniversalDataSystem suites those tests belong to: 160/160 passed, this PR's in 0.05-0.09 s; the AudioOut suite separately 21/21. Not run on a PS5.

AI-assisted: yes (Claude Code), the runs and the numbers above are from this machine.

@noamroger

Copy link
Copy Markdown
Contributor Author

Thanks for the Windows run, and for testing it alongside the other open PRs!

@github-actions github-actions Bot added the needs rebase Conflicts with main, rebase needed label Oct 28, 2026
@noamroger
noamroger force-pushed the claude/project-thread-gcmyxo-cp864 branch from 55887e1 to 64b4a0e Compare October 28, 2026 20:06
@github-actions github-actions Bot added needs rebase Conflicts with main, rebase needed and removed needs rebase Conflicts with main, rebase needed labels Oct 28, 2026
Implement sceCesRefersUcsProfileCp864 with Microsoft's CP864.TXT table.
Byte 0x25 maps to U+066A through the low-byte table, U+0025 has no
byte, and the six undefined bytes answer UNASSIGNED_CODE.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01N6PcbFBJ6WBtt4TVxUhgTW
@noamroger
noamroger force-pushed the claude/project-thread-gcmyxo-cp864 branch from 64b4a0e to f79f5ae Compare October 30, 2026 14:04
@github-actions github-actions Bot removed the needs rebase Conflicts with main, rebase needed label Oct 30, 2026
@oneandonlydean

Copy link
Copy Markdown
Collaborator

Hi noamroger, #10056 merged today, and this PR no longer merges cleanly with main. These conflicts overlap your changes, so they need your call:

Could you merge main into this branch and resolve them, keeping what that PR added? A merge commit is fine; no need to rebase or force-push. Once it's pushed we'll re-review the merge.

@github-actions github-actions Bot added the needs rebase Conflicts with main, rebase needed label Nov 2, 2026
Keep the profiles boykopovar#10056 added; Cp864 stays implemented, so its pending
stub and int declaration are dropped and the pending count goes to 17.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01N6PcbFBJ6WBtt4TVxUhgTW
@noamroger

Copy link
Copy Markdown
Contributor Author

Merged main in f2a59bf, keeping everything #10056 added; only the Cp864 pending stub is dropped, so the pending count is 17. CesCs tests pass locally.

@github-actions github-actions Bot added needs rebase Conflicts with main, rebase needed and removed needs rebase Conflicts with main, rebase needed labels Nov 2, 2026
@TechLevelZero

Copy link
Copy Markdown
Contributor

✅ AMD GPU test: passed

PR head aab0615 merged onto main b11c7bf · tested 2026-11-04 17:48 UTC · 17 min

GPU AMD Radeon RX 6300 (RADV NAVI24), driver Mesa 25.2.8-0ubuntu0.24.04.4, Vulkan 1.4.318
Host Ubuntu 26.04.1 LTS, kernel 7.0.0-42-generic, container ubuntu:24.04
Logs build and test logs for this run
Build ✅ passed (Release, -DANYPS5_ENABLE_SPIRV_TOOLS=ON)
Tests ✅ 1,143 passed · 5 failed (0 new, 4 also fail on main, 1 unstable on main) · 7 skipped (ANYPS5_REQUIRE_VULKAN=1)
Test setup CPU-only tests without a GPU; GPU tests (and any CPU-only test that failed or skipped without one) once on the GPU with VK_LAYER_KHRONOS_validation and ANYPS5_NO_SHADER_CACHE=1; main ran the same way
Test selection 1,155 of 3,894 tests run: the ones this change can reach, chosen by tools/select_tests.py from main's build graph
Vulkan validation ✅ no new validation IDs vs main (547 tests run on the GPU)
Slow tests (>30 s, GPU tests timed with validation layers) ⚠️ agc_driver_pipeline_journal 120.1 s, ⚠️ agc_driver_image_sample_unnormalized 66.7 s, ⚠️ public_headers 50.8 s, ⚠️ agc_driver_lazy_resolved_abi 43.0 s, ⚠️ agc_driver_indexed_copy 36.4 s
Unstable on main (1, these also failed in recent main runs on this machine; not counted against this PR)
agc_driver_pipeline_journal: failed in 8 of the last 10 main runs
Failing on main too (4, not counted against this PR)
agc_driver_image_table
agc_driver_native_depth_bda_clear
agc_driver_native_multisample_depth
agc_driver_submit_progress
Validation IDs already present on main (8 IDs in 468 tests)
VUID-VkDeviceCreateInfo-pNext-pNext (468 tests): agc_driver_address_draw_space_reuse, agc_driver_address_passes, agc_driver_alias_copy_label, agc_driver_alpha_to_coverage, agc_driver_array_layer_target, agc_driver_bc_block_copy, agc_driver_bda_anchor_reads, agc_driver_bda_span_reads, and 460 more
VUID-vkCmdCopyImage-srcImage-01548 (4 tests): agc_driver_depth_clear_hle, agc_driver_depth_storage_dispatch, agc_driver_depth_surface_from_storage, agc_driver_dispatch_move_depth
VUID-vkCmdCopyImage-srcImage-01551 (4 tests): agc_driver_depth_clear_hle, agc_driver_depth_storage_dispatch, agc_driver_depth_surface_from_storage, agc_driver_dispatch_move_depth
VUID-VkPipelineColorBlendStateCreateInfo-pAttachments-00605 (1 test): agc_driver_srgb8_color_target
VUID-VkSamplerCreateInfo-addressModeU-01079 (1 test): agc_driver_image_gather_volume
VUID-VkSamplerCreateInfo-addressModeU-parameter (1 test): agc_driver_image_gather_volume
VUID-VkSamplerCreateInfo-addressModeV-parameter (1 test): agc_driver_image_gather_volume
VUID-VkSamplerCreateInfo-addressModeW-parameter (1 test): agc_driver_image_gather_volume
Skipped (7)
agc_driver_copied_writer_label_order: skipped, the device reports a minStorageBufferOffsetAlignment of 4, so the dispatch binds its record at +0x1004 in place and nothing is written back; the test needs an alignment above 4
agc_driver_float16_unused_nan_payloads: skipped, the device has no native f16 conversions with RTE rounding and kept f16 denormals
agc_driver_gcn_display_present: skipped, no display: Vulkan support is either not configured in SDL or not available in current SDL video driver (offscreen) or platform
agc_driver_linear_target_direct_write_completion: skipped, the device does not keep host imports write-watched, so no completion stamp over the target is tracked
agc_driver_ngg_vertex_wave_reduction: skipped, s3 describes a 32-lane wave only on 32-lane subgroups, and the device has 64 lanes
agc_driver_scattered_runs: skipped, host imports are unavailable: /dev/udmabuf is not accessible
agc_driver_sparse_dma_buf_import: skipped, host imports are unavailable: /dev/udmabuf is not accessible
Reproduce
git fetch origin aab061574f030b5ed01d5e06a3f5ab2844c8229e b11c7bf84f5d2f636ff60166cc3371bd071e24d5
git checkout b11c7bf84f5d2f636ff60166cc3371bd071e24d5 && git merge --no-ff aab061574f030b5ed01d5e06a3f5ab2844c8229e
git submodule update --init --recursive
cmake -S . -B build -G Ninja -DCMAKE_BUILD_TYPE=Release -DBUILD_TESTING=ON -DANYPS5_ENABLE_SPIRV_TOOLS=ON
cmake --build build && cmake --build build --target libs
VK_DRIVER_FILES=/nonexistent/icd.json ctest --test-dir build -E '^(agc|shader|recompiler|videoout|video_out|guest_video_out|vulkan)|gpu' --timeout 120 --parallel 12 --output-on-failure
ANYPS5_REQUIRE_VULKAN=1 ANYPS5_NO_SHADER_CACHE=1 VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation \
  ctest --test-dir build -R '^(agc|shader|recompiler|videoout|video_out|guest_video_out|vulkan)|gpu' --timeout 120 --parallel 16 --output-on-failure
# failures are then re-run alone: --timeout 360 --parallel 2; new validation IDs: the test alone, twice, --parallel 1

Automated build and test on a contributor's AMD machine; it does not replace upstream CI. A new comment is posted for each new push. Full logs.

@github-actions github-actions Bot added needs rebase Conflicts with main, rebase needed and removed needs rebase Conflicts with main, rebase needed labels Nov 4, 2026
@github-actions github-actions Bot removed the needs rebase Conflicts with main, rebase needed label Nov 5, 2026
@oneandonlydean
oneandonlydean merged commit 0eba5db into boykopovar:main Nov 5, 2026
12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants