Repository navigation
feat(font): order writing line runs by embedding level and report their spacing - #3260
Conversation
|
Thank you for your interest in the project! We are sorry, but we cannot accept more PRs while we work through the existing backlog. This PR has been automatically closed and labeled "intake paused". This is not a judgment of the quality of your changes. |
adriadam10
left a comment
There was a problem hiding this comment.
Thanks for the work; the ordering model builds and guest_font_writing_line passes here (fails on main, as it should). Things to fix before this can land:
WritingLine.cpp:256-259,321-323,331-337,249: the newSCE_FONT_ERROR_INVALID_PARAMETERreturns (bad attribute, null line/orderer, null metrics) come only from the PS4 module. Unverified error codes/params should keep throwing (exact-or-throw) until a PS5 source confirms them.WritingLine.cpp:257: attribute 0 was accepted onmainand now returns an error. That is a behaviour change on PS4 evidence alone. Keep accepting it (or throw), and list it in TechnicalDebt.WritingLine.cpp:330: the order of the four outputs ofsceFontWritingLineGetOrderingSpaceis swapped against the Orbital IDA types and the SharpProspero bindings, which are the PS5-side references. Please explain why the PS4 order wins for PS5, or keep the documented order until it is measured.GuestFontWritingLine.cpp: the expected values are the model's own outputs; the differential harness is not in the repo, so nobody else can reproduce them. Please attach it (or its generated vectors) to this PR as evidence.- Please say in the description which of the three other changes Astro's Playroom needs are required for this path, so the test on the RTX 5080 can be tied to this PR.
|
Additional platform validation of standalone PR head Windows: passed — Windows 11, WinLibs GCC 15.2.0 UCRT/POSIX/SEH r7; CMake 4.3.1 / Ninja; Release, 1 checks, 0 failures, 0 CTest skips. Built the selected targets and dependencies; this is focused validation, not a full build or full-suite run. Checks: Command after building: No title/gameplay validation. These results cover the standalone head, not a merge with current main. |
… module only and accept attribute 0
|
All five are in 5680c32 and the description. The PS4-only error returns throw now (null line, attribute low byte, level above 126, null orderer, null metrics output), and attribute 0 is accepted again as level 0, with a TechnicalDebt line. I kept the PS4 output order for The harness and its vectors are at https://github.com/fma-rc/AnyPS5/tree/evidence/font-writing-line-oracle. Playroom needs none of the other changes any more: on |
adriadam10
left a comment
There was a problem hiding this comment.
Checked the rework: error returns that only exist in the PS4 module now throw, attribute 0 is still accepted, and TechnicalDebt lists the PS4-order GetOrderingSpace with the PPSA01325 call site as evidence. Built and ran guest_font_writing_line (passes; fails with the library changes reverted); merging.
One thing for you: the PR description still says these paths return SCE_FONT_ERROR_INVALID_PARAMETER and that attribute 0 is rejected. That no longer matches the code after 5680c32; please update it.
What
sceFontWritingLineWritesOrderthrew for every writing attribute except 0. Astro's Playroom (PPSA01325) passes0xFA | level << 8with bits 30 and 31 set on some text runs and stops there withsceFontWritingLineWritesOrder: writing attribute 250 is not modelled.The writing line now follows the PS4 11.00
libSceFont.sprx, read from its disassembly. That module exports the same functions under the same NIDs; the PS5 library was not measured.WritesOrdertakes the attribute as low byte0xFA, embedding level in bits 8-15 (0 to 126), bit 30 / bit 31 for space before / after the run. Runs are linked in visual order by level (odd levels run the other way), and the space at each spaced join is summed for the line. Attribute 0 is still accepted, as level 0 without spacing.RefersRenderStepwalks the visual order from the left (form0x12) or from the right (form0x11, now accepted), reports how much of the line's spacing lies before each step inspacingProgress, and grows the render metrics as steps are consumed.GetOrderingSpacereturns the line advance, leading space, summed inline space and trailing space, in that order.Where the PS4 module returns
SCE_FONT_ERROR_INVALID_PARAMETER(null line, other attribute low byte, level above 126, null orderer, null metrics output) this throws, since no PS5 source confirms the codes. Kept from the old model and not from that module: attribute 0, form0x10(treated as left to right), the0x0FD5detail, throws for unknown handles and forms, host-allocated lines. All listed in TechnicalDebt.Output order of
GetOrderingSpace: Orbital's IDA types and SharpProspero name the outputs head, inline, tail, advance. The PS4 function writes advance, leading, inline, trailing through rsi, rdx, rcx, r8, and the one PS5 caller I have agrees with that: Playroom calls the export once (0x187d380) and computesout1 - out4 - out2 - 0.25 * out3, divided by a scale and compared with a width limit. With the other naming that would be head minus advance. The title subtracts both out2 and out4, so which of the two is leading and which trailing rests on the PS4 module alone.Tested
Linux, GCC 16.2.1, Release.
guest_font_writing_linerewritten: plain and nested levels (including drops of several levels), spacing in both directions, render metrics while stepping, step adjustment, the throws. Onmainit aborts withwriting form 17 is not modelled; with the change it passes, as do the two other font tests.vectors.txtare at https://github.com/fma-rc/AnyPS5/tree/evidence/font-writing-line-oracle (no firmware file in it; the README gives the sha256 of the module used).vectors.txtis the repository test run against the PS4 module in place of this implementation, with the module's output under each assertion; lines markedharness:are the listed departures.maineb15ddc plus this branch and nothing else: the title no longer stops in libSceFont, logsLoadLevelResources: openingand stops onsceAudioInHqOpen not implemented.Checklist
main; no other open PR implements the same functionsNotImplemented_nid_no_patch); silent stubs are listed in TechnicalDebt.mdfiles or images added to the repository (attach them to this PR)