Repository navigation
feat(libSceFont): build the graphics region and fill descriptors as the console does - #9722
Conversation
…he console does Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01RbLgECLQ2bpDM7oe2urGZK
Progress report (f26434a → 9539761)📈 System libraries: 48.89% (+0.09%, +12 implemented functions) ✅ 12 implemented
Changed libraries (implemented exports)
|
|
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.
|
There was a problem hiding this comment.
The firmware-based descriptor behavior and boundary tests are well documented. This branch is also 13 commits behind current main; the tested base is cc0078595. If accepted later, update the branch and rerun the focused Font tests and overlap check. Keep the guest_font_graphics registration in the form required by #6044 if that PR lands first. Product Linux/Windows jobs are skipped on this head.
I’ve noticed that holding this PR because of #5239 isn’t necessary. It’s fine for PRs to keep coming in; they’ll be handled in due course. Please disregard my earlier request to hold or defer it.
|
@MarcZX10 understood. I'll leave this on hold under #5239 until the queue is below the threshold or a maintainer makes an exception. When it resumes, I'll merge current |
|
Supplemental review of head |
|
I’ve noticed that asking you to hold this PR was unnecessary. It’s fine to keep submitting PRs; maintainers will handle them in due course. |
|
@MarcZX10 thanks for the sanitizer run, and for saying the hold wasn't needed.
🤖 Generated with Claude Code |
…odules The firmware version comes from the SDK 0x13600007 recorded in each module's module-param segment. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_013XFS3FUfBtqCVfwmBrRQ6q
|
Correction: I mislabelled the firmware. The decrypted modules I read are firmware 13.60, not 12.00 (each module's module-param segment records SDK 13.60). The behaviour described is unchanged; only the version label was wrong. I've updated the description and the debt entries in e48a2f3. Assisted With AI: Yes But all test done locally on actual hardware |
…fill-descriptors Kept main's Api.hpp struct definitions and dropped the duplicates from FontGraphics.hpp. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…library header Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Dismissing a stale review: the requested changes were addressed after it (new head) and the merge queue blocks on it. Please request changes again if anything is still open.
|
Checked the argument validation order, error codes, tags and written bytes against the description, the |
What
libSceFont's graphics fill descriptors threw: the region, fill-method, fill-plot and fill-rates initialisers and setters. They only check their arguments and fill a structure the caller owns, so they don't need the graphics device or service.sceFontSetGraphicsErrorCallback(Vj-F8HBqi00), which every one of them reports through, was missing.This PR implements the 11 calls and the setter in a new
src/Graphics.cpp. Their exported entry points stay where the stubs were, in the existing export block ofUnimplemented.cpp, and call into it, so no new visibility pragma is needed. They follow the decrypted PS5 13.60libSceFont.sprx(0x1fe80 to 0x20523, read from disassembly, not measured on a console):RegionInit,RegionInitCircular,RegionInitRoundishFillMethodInitFillPlotInit{x, y, x + width, y + height}. Null and-1are accepted without a region. A rejected region clears only the plot's tag, before returning0x80460087.FillPlotSetLayout,FillRatesSetLayoutFillRatesInitFillRatesInit,FillRatesSetFillEffectFillPlotSetMapping,FillRatesSetMappingEvery failure calls the error callback, if one is set, with the code it returns:
0x80460002for parameters, which is the existingSCE_FONT_ERROR_INVALID_PARAMETER;0x80460086for a fill;0x80460087for a region;0x80460088for a fill plot;0x80460089for fill rates.The last four have no public names, so the source names them after what they reject. Comparisons keep the console's NaN results: a NaN size passes the region calls, but a NaN radius is rejected by
FillPlotInit.The four structures move unchanged from
Unimplemented.cppintoinclude/FontGraphics.hppso that both files can use them. The debt entry now says that these calls follow the firmware. What the layout selectors, mappings, corner flags and effects mean is still unknown, because theSetup*andUpdate*calls that read these descriptors still throw.Not included: the
Structure*calls. They need a graphics device, its pool and mutex.The code is written from the observed behaviour; nothing from the module is copied.
Tested
New
guest_font_graphicstest. It checks:On
mainthe setter does not exist and the other 11 calls throw.guest_font_graphics,guest_fontandguest_font_writing_linepass.guest_font_graphicspasses.maina701f9f (2db8ab2):guest_font_graphicspasses on Linux and on Windows (WinLibs GCC 15.2.0, Release, under Wine), with the NID-patchedlibSceFont.prxbuilt on both.tools/check_conventions.pyis clean.tools/pr_overlap.pycould not compare two PRs that already conflict withmain. #5209 adds a debt line three lines above the one this PR edits. #6044 moves the Font tests tocore/libs/tests/media/and registers them withadd_library_test(media ...). Either landing order works. If #6044 lands first, I mergemain, moveGuestFontGraphics.cpptotests/media/and register it asadd_library_test(media NAME guest_font_graphics COMMAND guest_font_graphics_tests). If this PR lands first, #6044 needs that one registration converted. I noted this on #6044. The other open libSceFont PRs touch other files.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)guest_font_graphicsregistration, see Overlap)sceFontGraphics*calls, not these🤖 Generated with Claude Code
https://claude.ai/code/session_01RbLgECLQ2bpDM7oe2urGZK