docs(debt): record libSceFont, libSceFontFt and libSceFontGs contracts from the PS4 modules #14879
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/14879"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Imported from boykopovar/AnyPS5. Originally posted by ntamas94 on 2026-11-01T22:08:28Z.
What
Documentation only. Records in the libSceFont, libSceFontFt and libSceFontGs debt files what the PS4 modules settle for functions that upstream lists as having unknown signatures and behaviour.
sceFontOutlineVertexesInterfaceInit,sceFontSupportSystemUpdationandsceFontGetCharVariationGlyphCodeleave the "unknown signatures and behavior" lists, and the four libSceFontGs NIDs that the export inventories leave unnamed get their names. Every function still throws, so no code changes.Source, per reading titles and libraries: the PS4
libSceFont.sprx,libSceFontFt.sprxandlibSceFontGs.sprxof firmware 10.71, read from their disassembly. BunnyFl independently cross-checkedsceFontOutlineVertexesInterfaceInitandsceFontSupportSystemUpdationagainst PS5 firmware 13.42. The libSceFontGs names and the two sequence queries were also checked on a PS4 10.71 console (comments below); everything else is disassembly only. No binary is attached.What the modules show:
sceKernelDlsymresolved these on PS4 10.71 at the four NIDs' module offsets, and each name hashes to its NID:UsBLoyXsQZssceFontGraphicsGnmDrawupFillTextureImage,uksHKVEsxu4sceFontGraphicsGnmDrawupFillTexturePattern,DI4LrTUrD04sceFontGraphicsSequenceGetGnmCommandsForSubmit,NtbMKwRg6qgsceFontGraphicsSequenceGetGnmCommandsForChain.test rdi,rdi; jereturns0x80460002. Withrsinon-null andrcxfrom 1 to 3,mov WORD PTR [rdi],0xf08and stores ofrsi,rdx,rcxat 0x08, 0x10 and 0x18. Otherwise it zeroes 0x08 to 0x1f.lock cmpxchgon dword 4,cmp r15d,0x20230801; jnedecides betweenor BYTE PTR [rbx+0x3],0x2with 0 and0x80460002.cmp eax,0xf02on the handle and0x80460005otherwise. Any non-zero result from the inner call writes 0 through the saved fourth argument.cmp ecx,0xf1fat 0 andcmp ecx,0xf03at 4, then two global slots under a global lock. Both "already registered" branches,cmp rcx,rbx; je, jump to the epilogue past the store that releases the lock.test edi,edi; cmove rax,rcxreturns a static table for 0 and null otherwise. The FontFt table starts with1f 0fat 0 and03 0fat 4.mov rsi,[rip+...]loads the same GOT slot assceFontFtSupportOpenType, bound toFTA_Support_Format_OpenType, and both jump to the same routine.test al,mask; cmovneover the inverted format word builds the mask passed toFTA_Support_Modules. Thencmp eax,0x40; setne clandlea r12d,[rcx+rcx*8-0x7fb9fff0]give0x80460010or0x80460019.cmp BYTE PTR [rsi+0xd],0x48,cmp DWORD PTR [rsi+0x38],0x1andcmp DWORD PTR [rsi+0x1c],0x0lead into calls tosceFontGraphicsDrawupFillTextureImageObjectand...TexturePatternObject. The image form's coordinate bound is the float 16834.0 at[rip+...], probably a typo for 16384, kept as stored.cmp eax,0xf80on the sequence (0x8046009aotherwise),test BYTE PTR [rdi+0x1b],0x1(0x804600b8), a null inner pointer at 0x28 (0x80460001), and every error goes tosceFontGraphicsReportError. ForSubmit returns the inner qword 0x28 and dword 0x30; ForChain returns 0x28, 0x30 shifted right by 2, 0x38 and 0x34, as the console runs below show.The libSceFontGs entries come from a Gnm build; the PS5 exports with the same NIDs may take AGC descriptors, which the entry says.
Tested
Not tested with a title; documentation only.
python3 tools/check_conventions.py --base upstream/mainpasses with no findings.tools/pr_overlap.pyneeds GitHub GraphQL, which was unavailable where this was prepared; a REST search found no open pull request naming any of these functions.Refresh — 2026-11-03 (Codex, AI-assisted): Merged main
086c068, preserving main's sceFontGetLibrary entry and these PS4 findings. Recorded BunnyFl's independent PS5 13.42 cross-check of OutlineVertexesInterfaceInit and SupportSystemUpdation. Documentation only; conventions and whitespace checks pass. No new console or runtime tests.Refresh — 2026-11-04 (AI-assisted): Merged main
b11c7bfand restored two existing libSceFont lines whose em dash the previous merge had mis-encoded. Named the four libSceFontGs exports, recorded the two sequence queries' contract, and brought the first libSceFont entry under the 1000-character limit. Documentation only; conventions pass with no findings.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)Imported from boykopovar/AnyPS5. Originally posted by BunnyFl on 2026-11-02T12:03:55Z.
Review: APPROVED
I cross-checked two of the libSceFont readings against the PS5 module, firmware 13.42
system/common/lib/libSceFont.sprx(sha256b96390d9b766c05f5db4f7710fe98117a5da31a1f394bd5e09b1d6ad0be6f6c4). Disassembly only, read to the returns. Both match your PS4 10.71 description exactly:So for these two, at least, the PS5 module behaves like the PS4 one, and the entry's "not from a PS5 module" caveat could say they match on 13.42. Both are self-contained, so they could be implemented exactly in a follow-up rather than left throwing. I didn't check the libSceFontFt/libSceFontGs readings against the PS5 modules. Conventions pass on this head.