feat(libSceFreeTypeOt): implement disabled trace queries #12814

Merged
xdCloudy merged 7 commits from upstream-pr/12814 into main 2026-11-05 16:21:32 +00:00
xdCloudy commented 2026-10-29 10:58:02 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by xdCloudy on 2026-10-29T10:58:02Z.


What

Implement two identified libSceFreeTypeOt trace-query exports, preserving the behaviour observed in PS5 firmware 13.60.

NID Export Behaviour
08-mhD-AAds FT_Trace_Get_Count Returns 0
64XMq6sDxUo FT_Trace_Get_Name Returns nullptr for any integer index

Both use typed APS5_VABI declarations. They do not forward to host FreeType, so host tracing configuration cannot change their results.

Evidence

  • Firmware: PS5 13.60
  • Module: libSceFreeTypeOt.sprx
  • SHA-256: 8449800A6FC4AA8A71576A84C98BC171F9D9C643220C3269206EEA5E9B578207
  • Analysis: Ghidra 12.1.4 and instruction inspection
  • Entries: 0x10410 and 0x10420, both xor eax,eax; ret

The PS5 3.20 export inventory provides the function identities. FreeType declarations establish the parameter and return types.

The firmware instructions establish the observed constant return values, not independently the complete function prototypes. Neither body reads arguments, so the parameter counts and widths follow the public FreeType API and remain unverified as console source-language prototypes. Console-runtime and cross-firmware equivalence remain unverified.

No firmware binaries or disassembly artifacts are committed.

Implementation

  • Replace the two throwing unknown-export placeholders with typed implementations.
  • Preserve both original export NIDs.
  • Expose the declarations through libSceFreeTypeOt.hpp.
  • Add the guest_freetype_ot_constants regression test.
  • Test the count result and negative, zero and positive name indices.
  • Update the technical-debt provenance and unknown-export inventory.

Upstream reconciliation

Merge commit: 68c7406

Reconciled against upstream main at 18f5949 on 31 October 2026.

  • Preserved upstream FreeType memory APIs, tests and header changes.
  • Preserved existing Stream, Calc and other FreeType functionality.
  • Retained the five-file scope of this PR.
  • Recalculated the unknown-export inventory against the updated source: 73 before this change; 71 remaining after implementing these two exports.
  • Confirmed the branch is 0 commits behind that upstream snapshot and GitHub reports it as mergeable.

No competing implementation of these two target NIDs was identified in the previously reviewed overlapping PRs. Shared files may still require reconciliation if further upstream changes land.

Tested

Windows x86_64, WinLibs GCC, Release, BUILD_TESTING=ON:

  • Built guest_freetype_ot_constants_tests and guest_freetype_corner_tests.
  • Focused CTest: 2/2 passed.
  • public_headers and all public_headers_compile_*: 65/65 passed.
  • Conventions against current upstream main and diff whitespace checks: passed.
  • Recomputed throwing unknown-export count from source: 71.

These local checks cover the revised debt caveat. No console runtime validation or local Linux build was performed. New-head hosted checks are pending.

Checklist

  • Two identified exports, one library and one topic
  • Original NIDs and typed guest ABI declarations retained
  • Existing upstream functionality preserved
  • Focused regression coverage included
  • Technical-debt inventory updated
  • No new third-party dependencies or proprietary binaries
  • Unsupported behaviour remains explicitly documented
  • Depends on: none
  • Fixes: none
  • GPUs tested: n/a
  • AI-assisted: yes
<!-- greyfinch-sync:boykopovar/AnyPS5:issue:5066751558 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/12814). Originally posted by [xdCloudy](https://github.com/xdCloudy) on 2026-10-29T10:58:02Z. --- ### What Implement two identified `libSceFreeTypeOt` trace-query exports, preserving the behaviour observed in PS5 firmware 13.60. | NID | Export | Behaviour | |---|---|---| | `08-mhD-AAds` | `FT_Trace_Get_Count` | Returns `0` | | `64XMq6sDxUo` | `FT_Trace_Get_Name` | Returns `nullptr` for any integer index | Both use typed `APS5_VABI` declarations. They do not forward to host FreeType, so host tracing configuration cannot change their results. ### Evidence - Firmware: PS5 13.60 - Module: `libSceFreeTypeOt.sprx` - SHA-256: `8449800A6FC4AA8A71576A84C98BC171F9D9C643220C3269206EEA5E9B578207` - Analysis: Ghidra 12.1.4 and instruction inspection - Entries: `0x10410` and `0x10420`, both `xor eax,eax; ret` The [PS5 3.20 export inventory](https://github.com/DNNDHH/PS5-3.20_Libs/blob/b2a77c09cd71c01f34c790cfbe98c751a13262ad/libSceFreeTypeOt.c#L2708) provides the function identities. FreeType declarations establish the parameter and return types. The firmware instructions establish the observed constant return values, not independently the complete function prototypes. Neither body reads arguments, so the parameter counts and widths follow the public FreeType API and remain unverified as console source-language prototypes. Console-runtime and cross-firmware equivalence remain unverified. No firmware binaries or disassembly artifacts are committed. ### Implementation - Replace the two throwing unknown-export placeholders with typed implementations. - Preserve both original export NIDs. - Expose the declarations through `libSceFreeTypeOt.hpp`. - Add the `guest_freetype_ot_constants` regression test. - Test the count result and negative, zero and positive name indices. - Update the technical-debt provenance and unknown-export inventory. ### Upstream reconciliation Merge commit: `68c7406` Reconciled against upstream `main` at `18f5949` on 31 October 2026. - Preserved upstream FreeType memory APIs, tests and header changes. - Preserved existing Stream, Calc and other FreeType functionality. - Retained the five-file scope of this PR. - Recalculated the unknown-export inventory against the updated source: **73 before this change; 71 remaining after implementing these two exports**. - Confirmed the branch is 0 commits behind that upstream snapshot and GitHub reports it as mergeable. No competing implementation of these two target NIDs was identified in the previously reviewed overlapping PRs. Shared files may still require reconciliation if further upstream changes land. ### Tested Windows x86_64, WinLibs GCC, Release, BUILD_TESTING=ON: - Built `guest_freetype_ot_constants_tests` and `guest_freetype_corner_tests`. - Focused CTest: 2/2 passed. - `public_headers` and all `public_headers_compile_*`: 65/65 passed. - Conventions against current upstream main and diff whitespace checks: passed. - Recomputed throwing unknown-export count from source: 71. These local checks cover the revised debt caveat. No console runtime validation or local Linux build was performed. New-head hosted checks are pending. ### Checklist - [x] Two identified exports, one library and one topic - [x] Original NIDs and typed guest ABI declarations retained - [x] Existing upstream functionality preserved - [x] Focused regression coverage included - [x] Technical-debt inventory updated - [x] No new third-party dependencies or proprietary binaries - [x] Unsupported behaviour remains explicitly documented - [x] Depends on: none - [x] Fixes: none - [x] GPUs tested: n/a - [x] AI-assisted: yes
CnRJay commented 2026-11-01 19:54:03 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by CnRJay on 2026-11-01T19:54:03Z.

Review: COMMENTED


You're right on both points, and I'm withdrawing the review.

  • It said "five exports". The PR implements two (FT_Trace_Get_Count and FT_Trace_Get_Name), and the 13.60 firmware disassembly is cited in the description.
  • CONTRIBUTING does not require a title ID or a throw log for an export PR: it allows Unblocks: none, and that line only decides which pull requests reviewers read first. I presented a review-queue practice as a requirement, and that was wrong.

The open items are the ones oneandonlydean listed: the parameter-count caveat for FT_Trace_Get_Count, the include of the owning header in Export.cpp, and the recomputed unknown-export count.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:5729937126 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/12814#pullrequestreview-5729937126). Originally posted by [CnRJay](https://github.com/CnRJay) on 2026-11-01T19:54:03Z. **Review:** COMMENTED --- You're right on both points, and I'm withdrawing the review. - It said "five exports". The PR implements two (`FT_Trace_Get_Count` and `FT_Trace_Get_Name`), and the 13.60 firmware disassembly is cited in the description. - CONTRIBUTING does not require a title ID or a throw log for an export PR: it allows `Unblocks: none`, and that line only decides which pull requests reviewers read first. I presented a review-queue practice as a requirement, and that was wrong. The open items are the ones oneandonlydean listed: the parameter-count caveat for `FT_Trace_Get_Count`, the include of the owning header in `Export.cpp`, and the recomputed unknown-export count.
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!12814
No description provided.