feat(libSceCesCs): declare the missing firmware character set exports #8240

Merged
adhimiw merged 1 commit from upstream-pr/8240 into main 2026-10-21 04:54:18 +00:00
adhimiw commented 2026-10-20 05:46:30 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by adhimiw on 2026-10-20T05:46:30Z.


What

Declares 249 libSceCesCs exports that the console's character-set service has and the project did not provide.

AnyPS5 resolves a title's imports by NID, so a title that imports a system function that no AnyPS5 library provides fails to load with an unresolved import. The PS5 3.20 export inventory lists 249 such exports for libSceCesCs: the UTF-16, UTF-16BE, UTF-16LE and UTF-32 forms of the conversions the library already does to and from UTF-8, the EUC-KR, Big5, UHC and ISO-2022-JP profile builders, the JIS level queries and the remaining profile setters.

Every declaration calls NotImplemented_nid_no_patch and returns 0, so none of them implements the function and none of them fakes a success. No credible prototype is known for them, so they are declared without parameters, which resolves the import without making an ABI claim. The declarations live in the new core/libs/prx/libSceCesCs/PendingExports.cpp, which the shared CesLibrary.cmake builds into both libSceCesCs and libSceCesCs-module.

docs/dev/debt/libSceCesCs.md records the limitation in the same terms as the other libraries' pending export lists.

The names and NIDs come from the export inventory and every one of them recomputes to its NID with tools/nid_names.py; the file is generated with tools/stubgen.py.

Tested

Linux (Omarchy, kernel 7.2.8), GCC 16.2.1, CMake 4.4.4: cmake -S . -B build -DCMAKE_BUILD_TYPE=Release -DBUILD_TESTING=ON configured and the full build compiled and linked; ctest -j4 ran 1669 tests, all passed, including the four guest_ces tests for the library and its module wrapper. python3 tools/check_conventions.py --base upstream/main passes. python3 tools/pr_overlap.py --branch feat/libSceCesCs-pending-exports reports no shared export with any open pull request; it reports that #7884 touches the same technical-debt file, which it does without changing the entries this pull request adds. The patched libSceCesCs.prx was read back after nid_patcher: all 249 new NIDs are in its dynamic export table and no export was lost.

Not tested: a title, a console, the Windows build.

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 (none added)
  • 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 (none)
  • Generic behaviour, not specific to one title
  • Depends on: none
  • Fixes: none
  • Unblocks: none
  • GPUs tested: n/a
  • AI-assisted: yes
<!-- greyfinch-sync:boykopovar/AnyPS5:issue:4931577980 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/8240). Originally posted by [adhimiw](https://github.com/adhimiw) on 2026-10-20T05:46:30Z. --- ### What Declares 249 `libSceCesCs` exports that the console's character-set service has and the project did not provide. AnyPS5 resolves a title's imports by NID, so a title that imports a system function that no AnyPS5 library provides fails to load with an unresolved import. The [PS5 3.20 export inventory](https://github.com/DNNDHH/PS5-3.20_Libs/blob/b2a77c09cd71c01f34c790cfbe98c751a13262ad/libSceCesCs.c) lists 249 such exports for `libSceCesCs`: the UTF-16, UTF-16BE, UTF-16LE and UTF-32 forms of the conversions the library already does to and from UTF-8, the EUC-KR, Big5, UHC and ISO-2022-JP profile builders, the JIS level queries and the remaining profile setters. Every declaration calls `NotImplemented_nid_no_patch` and returns 0, so none of them implements the function and none of them fakes a success. No credible prototype is known for them, so they are declared without parameters, which resolves the import without making an ABI claim. The declarations live in the new `core/libs/prx/libSceCesCs/PendingExports.cpp`, which the shared `CesLibrary.cmake` builds into both `libSceCesCs` and `libSceCesCs-module`. `docs/dev/debt/libSceCesCs.md` records the limitation in the same terms as the other libraries' pending export lists. The names and NIDs come from the export inventory and every one of them recomputes to its NID with `tools/nid_names.py`; the file is generated with `tools/stubgen.py`. ### Tested Linux (Omarchy, kernel 7.2.8), GCC 16.2.1, CMake 4.4.4: `cmake -S . -B build -DCMAKE_BUILD_TYPE=Release -DBUILD_TESTING=ON` configured and the full build compiled and linked; `ctest -j4` ran 1669 tests, all passed, including the four `guest_ces` tests for the library and its module wrapper. `python3 tools/check_conventions.py --base upstream/main` passes. `python3 tools/pr_overlap.py --branch feat/libSceCesCs-pending-exports` reports no shared export with any open pull request; it reports that #7884 touches the same technical-debt file, which it does without changing the entries this pull request adds. The patched `libSceCesCs.prx` was read back after `nid_patcher`: all 249 new NIDs are in its dynamic export table and no export was lost. Not tested: a title, a console, the Windows build. ### 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 (none added) - [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 (none) - [x] Generic behaviour, not specific to one title - [x] Depends on: none - [x] Fixes: none - [x] Unblocks: none - [x] GPUs tested: n/a - [x] AI-assisted: yes
github-actions[bot] commented 2026-10-20 06:38:47 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by github-actions[bot] on 2026-10-20T06:38:47Z.


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 7884 docs/dev/debt/libSceCesCs.md L13
<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6285013198 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/8240#issuecomment-6285013198). Originally posted by [github-actions[bot]](https://github.com/apps/github-actions) on 2026-10-20T06:38:47Z. --- <!-- pr-overlap --> 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 7884](https://www.github.com/boykopovar/AnyPS5/pull/7884) | `docs/dev/debt/libSceCesCs.md` [L13](https://github.com/boykopovar/AnyPS5/blob/02fb1ce5324304f292453b9dd458cea2e3633160/docs/dev/debt/libSceCesCs.md#L13) | | |
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!8240
No description provided.