docs(debt): add call-site evidence for the arguments of sceAgcDebugRaiseException #10919

Merged
AlexFigas merged 1 commit from upstream-pr/10919 into main 2026-10-27 03:50:53 +00:00
AlexFigas commented 2026-10-25 10:01:16 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by AlexFigas on 2026-10-25T10:01:16Z.


What

The debt entry for sceAgcDebugRaiseException says the logged exception id may be leftover register contents, because OpenAGC declares no arguments. Astro Bot (PPSA21564 01.007.000) settles this: it sets two arguments itself. The entry now records the call and keeps only what is still open, the second argument's type and meaning. No code changes.

The following is read from the disassembly of the unwrapped eboot (virtual addresses), not measured:

0x6f3b6a0: push rbp
           mov  rbp, rsp
           mov  edi, 1
           xor  esi, esi
           call sceAgcDebugRaiseException
           xor  eax, eax
           pop  rbp
           ret

This function is the callback the title's command buffers get when none is given:

  • At 0x6f3b660 and 0x49ff00, the title's command buffer set-ups store their callback argument at +0x20, or this function when the argument is null (lea r9, [rip+0x35] / test rcx, rcx / cmovne r9, rcx). In that case the user data stored at +0x28 is null.
  • At 0x6f43094, a command buffer built on the stack gets this function directly.

Tested

Documentation only.

  • python3 tools/check_conventions.py --base origin/main passes.
  • python3 tools/pr_overlap.py --branch docs/agc-debug-exception-call-site reported #10048, which inserts its sceAgcFuseShaderHalves_0200 entry directly above this entry and does not change this entry. The conflict is textual only.
  • Landing order: #10048 first, then this PR (Depends on: #10048, posted on #10048). Merging #10048's head cb3bfca6dd into main 66e6772ca2 and this PR's head b76e593ef3 on top conflicts only in that hunk; once #10048 merges I'll rebase and keep both entries, #10048's unchanged followed by this one.

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: #10048
  • Fixes: none
  • Unblocks: none
  • GPUs tested: n/a (documentation only)
  • AI-assisted: yes
<!-- greyfinch-sync:boykopovar/AnyPS5:issue:5003724800 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/10919). Originally posted by [AlexFigas](https://github.com/AlexFigas) on 2026-10-25T10:01:16Z. --- ### What The [debt entry](https://github.com/boykopovar/AnyPS5/blob/main/docs/dev/debt/libSceAgc.md) for `sceAgcDebugRaiseException` says the logged exception id may be leftover register contents, because OpenAGC declares no arguments. Astro Bot (PPSA21564 01.007.000) settles this: it sets two arguments itself. The entry now records the call and keeps only what is still open, the second argument's type and meaning. No code changes. The following is read from the disassembly of the unwrapped eboot (virtual addresses), not measured: ``` 0x6f3b6a0: push rbp mov rbp, rsp mov edi, 1 xor esi, esi call sceAgcDebugRaiseException xor eax, eax pop rbp ret ``` This function is the callback the title's command buffers get when none is given: - At 0x6f3b660 and 0x49ff00, the title's command buffer set-ups store their callback argument at `+0x20`, or this function when the argument is null (`lea r9, [rip+0x35]` / `test rcx, rcx` / `cmovne r9, rcx`). In that case the user data stored at `+0x28` is null. - At 0x6f43094, a command buffer built on the stack gets this function directly. ### Tested <!-- OS, title or homebrew, what was checked. "Not tested" is a valid answer. A performance change: the summary lines of main and of this PR from the same machine and scene, with the traces attached, captured as the Performance report issue form describes. --> Documentation only. - `python3 tools/check_conventions.py --base origin/main` passes. - `python3 tools/pr_overlap.py --branch docs/agc-debug-exception-call-site` reported #10048, which inserts its `sceAgcFuseShaderHalves_0200` entry directly above this entry and does not change this entry. The conflict is textual only. - Landing order: #10048 first, then this PR (`Depends on: #10048`, posted on #10048). Merging #10048's head cb3bfca6dd into `main` 66e6772ca2 and this PR's head b76e593ef3 on top conflicts only in that hunk; once #10048 merges I'll rebase and keep both entries, #10048's unchanged followed by this one. ### Checklist <!-- Rules behind each item: https://github.com/boykopovar/AnyPS5/blob/main/CONTRIBUTING.md --> - [x] Based on current `main`; no other open PR implements the same functions - [x] One topic per PR; follow-ups go in a new PR - [x] No comments in code except [technical debt](https://github.com/boykopovar/AnyPS5/blob/main/docs/dev/CONVENTIONS.md) - [x] Unimplemented paths throw (`NotImplemented_nid_no_patch`); silent stubs are listed under Silent stubs in their library's [technical debt](https://github.com/boykopovar/AnyPS5/tree/main/docs/dev/debt) file - [x] No notes, investigation `.md` files or images added to the repository (attach them to this PR) - [x] New third-party code is a submodule built from source - [x] Generic behaviour, not specific to one title - [x] Depends on: #10048 - [x] Fixes: none - [x] Unblocks: none - [x] GPUs tested: n/a (documentation only) - [x] AI-assisted: yes
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!10919
No description provided.