fix(agc): accept indirect register placeholders without an address #899

Merged
alfalfa-star merged 1 commit from upstream-pr/899 into main 2026-10-07 02:27:03 +00:00
alfalfa-star commented 2026-10-06 14:20:32 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by alfalfa-star on 2026-10-06T14:20:32Z.


What

Accept SET_*_REG_INDIRECT placeholders without an address.

PPSA14632 (LEGO Horizon Adventures, Unreal Engine) reserves sceAgcDcbSet{Cx,Sh,Uc}RegistersIndirect packets with a null register list and 0 registers, and fills them in later with the sceAgcSet*RegIndirectPatchSetAddress/SetNumRegisters setters. On main the writers throw null or misaligned address 0x0 (seen as sceAgcDcbSetCxRegistersIndirect: null or misaligned address 0x0). A null list is now accepted when it holds no registers, which reads nothing; a null list with registers still throws.

Tested

  • Arch Linux, GCC 16.2, Release. New case in RegisterCommands: each of the three writers emits the placeholder packet, rejects a null list with a count without touching the buffer, and the patch setters then fill in the address and count. Full ctest: 359/359.
  • PPSA14632: the placeholder writes no longer throw, and the title runs on to later startup stops.
  • Windows not built or tested.

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 in TechnicalDebt
  • 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
  • AI-assisted: yes

🤖 Generated with Claude Code

<!-- greyfinch-sync:boykopovar/AnyPS5:issue:4760090738 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/899). Originally posted by [alfalfa-star](https://github.com/alfalfa-star) on 2026-10-06T14:20:32Z. --- ### What Accept `SET_*_REG_INDIRECT` placeholders without an address. PPSA14632 (LEGO Horizon Adventures, Unreal Engine) reserves `sceAgcDcbSet{Cx,Sh,Uc}RegistersIndirect` packets with a null register list and 0 registers, and fills them in later with the `sceAgcSet*RegIndirectPatchSetAddress`/`SetNumRegisters` setters. On `main` the writers throw `null or misaligned address 0x0` (seen as `sceAgcDcbSetCxRegistersIndirect: null or misaligned address 0x0`). A null list is now accepted when it holds no registers, which reads nothing; a null list with registers still throws. ### Tested <!-- OS, title or homebrew, what was checked. "Not tested" is a valid answer. --> - Arch Linux, GCC 16.2, Release. New case in `RegisterCommands`: each of the three writers emits the placeholder packet, rejects a null list with a count without touching the buffer, and the patch setters then fill in the address and count. Full ctest: 359/359. - PPSA14632: the placeholder writes no longer throw, and the title runs on to later startup stops. - Windows not built or tested. ### 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 in [TechnicalDebt](https://github.com/boykopovar/AnyPS5/blob/main/docs/dev/TechnicalDebt.md#silent-stubs) - [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: none - [x] AI-assisted: yes 🤖 Generated with [Claude Code](https://claude.com/claude-code)
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!899
No description provided.