Skip to content

docs(debt): record recovered evidence for CbMemsetExclusive and font drawup fills - #11012

Merged
adriadam10 merged 3 commits into
boykopovar:mainfrom
akkadbakkad89:docs/agc-font-stub-evidence
Oct 27, 2026
Merged

adriadam10 merged 3 commits into
boykopovar:mainfrom
akkadbakkad89:docs/agc-font-stub-evidence

Conversation

@akkadbakkad89

Copy link
Copy Markdown
Contributor

What

Debt-only change recording the reverse-engineering outcome for three throwing stubs, with the evidence that keeps them throwing.

  • sceAgcCbMemsetExclusive (NID 6nths4DHNrs): absent from the 4.03 libSceAgc.sprx export table along with the rest of the memset family, so it is a post-4.03 export and no body was read. PPSA20397 imports it through libSceJobManager.prx and the title's generated fakelib lists it, but the only code path reaching it is an import thunk no call site invokes - no caller arguments observed.
  • sceFontGraphicsDrawupFillTextureImageObject and sceFontGraphicsDrawupFillTexturePatternObject (NIDs CfkpBe2CqBQ, FL0unhGcFvI): signature (graphicsObject, fillObject, mode, out, x, y, w, h) and semantics recovered from the 4.03 libSceFont.sprx bodies (670/871 bytes) and cross-checked against PPSA20397's libSceFontGsm.prx caller. On valid input they allocate a drawup record in the renderer's pool and enqueue it into the object's record list. Implementing them needs the sceFontGraphics drawup pipeline - the record pool, the dequeueing objects and the ~40 sibling sceFontGraphics* exports - all of which are stubbed, so a standalone producer would report success for work nothing consumes.

Tested

Not tested - documentation only. tools/check_conventions.py --base origin/main passes; tools/pr_overlap.py --branch docs/agc-font-stub-evidence shows only #1060, #5209 and #8250 touching the same debt files, each appending an unrelated entry.

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
  • 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
  • Generic behaviour, not specific to one title
  • Depends on: none
  • Fixes: none
  • Unblocks: none
  • GPUs tested: n/a
  • AI-assisted: yes

@akkadbakkad89
akkadbakkad89 force-pushed the docs/agc-font-stub-evidence branch from ff6b947 to 3d53581 Compare October 25, 2026 14:12

@MarcZX10 MarcZX10 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed the two debt additions. They record the evidence and the implementation dependencies that keep these exports throwing, distinguish what was observed from what remains unknown, and do not add speculative behavior. The PR is documentation-only; conventions and the automated policy checks pass. No runtime test is applicable.

@github-actions

github-actions Bot commented Oct 25, 2026 •

Copy link
Copy Markdown

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.

Pull request Shared files not compared
PR 5209 docs/dev/debt/libSceFont.md
PR 8250 docs/dev/debt/libSceFont.md
PR 8314 docs/dev/debt/libSceAgc.md

@github-actions github-actions Bot added the docs label Oct 25, 2026
@BunnyFl

BunnyFl commented Oct 25, 2026 •

Copy link
Copy Markdown
Contributor

A data point for the sceAgcCbMemsetExclusive entry: firmware 13.42's libSceAgc.sprx exports it (6nths4DHNrs), as a 1121-byte body, so a newer body is available to read. Its direct calls are sceAgcCbSetShRegistersDirect, memcpy and __stack_chk_fail, plus six indirect calls through the function pointer at +0x20 of its first argument (the command buffer). Of the memset family listed in the entry, it is the only one 13.42 exports.

13.42's libSceFont.sprx still exports both drawup calls: sceFontGraphicsDrawupFillTextureImageObject (CfkpBe2CqBQ, 706 bytes) and sceFontGraphicsDrawupFillTexturePatternObject (FL0unhGcFvI, 824 bytes).

@MarcZX10

Copy link
Copy Markdown
Contributor

Follow-up on the firmware 13.42 evidence in @BunnyFl’s comment: it reports that libSceAgc.sprx exports this NID with a 1,121-byte body and gives its call pattern. I could not independently verify that binary from the linked material or a local copy. Could you add the firmware/build identifier and a checkable source reference (or clarify that the current “no body was read” statement is limited to the 4.03 image you inspected)? If the 13.42 finding is confirmed, the debt entry should distinguish the 4.03 result from the later body that is available to read.

@akkadbakkad89
akkadbakkad89 force-pushed the docs/agc-font-stub-evidence branch from 3d53581 to 81e65aa Compare October 25, 2026 21:17
@akkadbakkad89

Copy link
Copy Markdown
Contributor Author

Updated the sceAgcCbMemsetExclusive entry at 81e65aab60 (rebased onto 5a2744c55e).

What I could verify locally:

  • The 4.03 statement stands — 6nths4DHNrs is absent from our 4.03 libSceAgc.sprx export table (the image in ps5_prx_dump_403), so "no body was read" was always scoped to 4.03; the entry now says that explicitly.
  • @BunnyFl's NIDs are consistent with what I can check: CfkpBe2CqBQ and FL0unhGcFvI are both present in our 4.03 libSceFont.sprx, and 6nths4DHNrs is listed by PPSA20397's generated fakelib — so their NID methodology lines up with the modules I have.
  • The 13.42-specific claims (1121-byte body, sceAgcCbSetShRegistersDirect/memcpy + six indirect calls through the command buffer's +0x20 pointer) could not be re-verified: there is no 13.42 image on this machine, and the decrypted 12.70 PUP here keeps its modules inside compressed inner packages (a raw scan finds no NID strings). The entry records it as an attributed report: "A firmware 13.42 libSceAgc.sprx report (unverified here) has it as a 1121-byte body calling sceAgcCbSetShRegistersDirect, memcpy and six indirect calls through the command buffer's +0x20 function pointer."

If a checkable 13.42 dump reference gets posted I can re-verify the body directly. The font entry is unchanged — @BunnyFl's 13.42 datapoint there corroborates rather than corrects the 4.03 measurement, and the entry already documents bodies on both exports.

AI-assisted: yes.

@BunnyFl

BunnyFl commented Oct 25, 2026

Copy link
Copy Markdown
Contributor

@MarcZX10 identifiers for the 13.42 report, so it can be checked against any copy of that firmware:

  • Firmware 13.42, dumped from my own console with the modules decrypted on the console. The module param version field of both modules below reads 0x1342000013590001 (13.42, SDK 0x13590001).
  • system/common/lib/libSceAgc.sprx: 383,048 bytes, SHA-256 6bae17e07ce4661d306009cc3d83e8524e86a7e8123864340874d5acb2420601. sceAgcCbMemsetExclusive (6nths4DHNrs) is the export at 0x3100, with symbol size 1121. It keeps its first argument (the command buffer) in one register for the whole body, and the six indirect calls go through +0x20 of it. Its direct calls are sceAgcCbSetShRegistersDirect, memcpy and __stack_chk_fail. Of the memset family in the entry, it is the only one 13.42 exports: no 13.42 module exports sceAgcCbMemset, sceAgcDcbMemset, sceAgcDcbMemsetExclusive, sceAgcCbFill or sceAgcDcbFill under their name-derived NIDs (libSceAgcVsh.sprx also exports sceAgcCbMemsetExclusive).
  • system/common/lib/libSceFont.sprx: SHA-256 b96390d9b766c05f5db4f7710fe98117a5da31a1f394bd5e09b1d6ad0be6f6c4. CfkpBe2CqBQ (sceFontGraphicsDrawupFillTextureImageObject) is at 0x22260 with 706 bytes, and FL0unhGcFvI (sceFontGraphicsDrawupFillTexturePatternObject) at 0x22530 with 824 bytes.

I can't share the module files themselves. The current entry at 81e65aab60 already keeps the 4.03 result separate from this report.

@adriadam10 adriadam10 self-assigned this Oct 26, 2026
@adriadam10
adriadam10 force-pushed the docs/agc-font-stub-evidence branch from 81e65aa to cfc7000 Compare October 26, 2026 23:57
@adriadam10
adriadam10 merged commit 0754512 into boykopovar:main Oct 27, 2026
9 checks passed
@adriadam10

Copy link
Copy Markdown
Collaborator

Checked the two debt entries against the diff: the linked Unimplemented.cpp stubs exist, the 4.03 findings are kept separate from the attributed 13.42 report, and nothing speculative is implemented. Added two mechanical fixes: restored the missing full stop before "A firmware 13.42 ..." in the sceAgcCbMemsetExclusive entry, and moved the sceFontGraphicsDrawupFill* entry off the end of its section to avoid append conflicts; merged.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants