docs(libSceAgc): document sceAgcCbMemsetExclusive 13.42 firmware dispatch #12475

Merged
Kikoarl merged 2 commits from upstream-pr/12475 into main 2026-11-04 05:34:30 +00:00
Kikoarl commented 2026-10-28 15:34:00 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by Kikoarl on 2026-10-28T15:34:00Z.


What

Documents sceAgcCbMemsetExclusive in docs/dev/debt/libSceAgc.md based on firmware 13.42 libSceAgc.sprx analysis (export at 0x3100, 1121-byte body), analyzed via disassembly and emulator testing by BunnyFl (not measured on console hardware). Clarifies that the module dispatches an internal compute shader (COMPUTE_PGM_LO 0x20c, 256 threads, 16-byte pattern via 9 user-data registers from 0x240, 0x216/0x217, DISPATCH_DIRECT 16x1x1 thread groups whose initiator is 0x41 combined with bits from the shader object and a module global) rather than a CP DMA_DATA packet, keeping the export throwing NotImplemented_nid_no_patch in core/libs/prx/libSceAgc/Unimplemented.cpp as shader microcode and hardware effects remain unresolved. Consolidates documentation into a single technical debt entry under ### Unknown function info, preserving historical facts: absent from 4.03 export table, PPSA20397 import via libSceJobManager.prx without active call site, all 12 retail call sites across 6 titles (PPSA15246, PPSA21480, PPSA23827, PPSA24423, PPSA24779, PPSA35169), and the PPSA24423 0x41768 condition (flag byte 1 and size >= 0x40000).

Tested

  • Linux x86_64: ctest --test-dir /tmp/anyps5_build -R "^agc_commands$" --output-on-failure (100% passed).
  • Test suite: python3 tools/check_conventions.py passed with 0 errors.
  • Header audit: python3 core/libs/tests/test_public_headers.py --audit-only verified 405 libraries and 27,906 exports.

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
<!-- greyfinch-sync:boykopovar/AnyPS5:issue:5053199483 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/12475). Originally posted by [Kikoarl](https://github.com/Kikoarl) on 2026-10-28T15:34:00Z. --- ### What Documents `sceAgcCbMemsetExclusive` in `docs/dev/debt/libSceAgc.md` based on firmware 13.42 `libSceAgc.sprx` analysis (export at `0x3100`, 1121-byte body), analyzed via disassembly and emulator testing by BunnyFl (not measured on console hardware). Clarifies that the module dispatches an internal compute shader (`COMPUTE_PGM_LO` `0x20c`, 256 threads, 16-byte pattern via 9 user-data registers from `0x240`, `0x216`/`0x217`, `DISPATCH_DIRECT` 16x1x1 thread groups whose initiator is `0x41` combined with bits from the shader object and a module global) rather than a CP `DMA_DATA` packet, keeping the export throwing `NotImplemented_nid_no_patch` in `core/libs/prx/libSceAgc/Unimplemented.cpp` as shader microcode and hardware effects remain unresolved. Consolidates documentation into a single technical debt entry under `### Unknown function info`, preserving historical facts: absent from 4.03 export table, PPSA20397 import via `libSceJobManager.prx` without active call site, all 12 retail call sites across 6 titles (PPSA15246, PPSA21480, PPSA23827, PPSA24423, PPSA24779, PPSA35169), and the PPSA24423 0x41768 condition (flag byte 1 and size >= 0x40000). ### Tested - Linux x86_64: `ctest --test-dir /tmp/anyps5_build -R "^agc_commands$" --output-on-failure` (100% passed). - Test suite: `python3 tools/check_conventions.py` passed with 0 errors. - Header audit: `python3 core/libs/tests/test_public_headers.py --audit-only` verified 405 libraries and 27,906 exports. ### Checklist - [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: none - [x] Fixes: none - [x] Unblocks: none - [x] GPUs tested: n/a - [x] AI-assisted: yes
MarcZX10 commented 2026-10-28 15:39:07 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-28T15:39:07Z.

Review: CHANGES_REQUESTED


I reviewed the exact head 95254de7339e. The implementation is not yet supported by evidence for the behavior it now returns: the new debt entry explicitly says the packet layout and engine blocking are unverified against retail traces, while sceAgcCbMemsetExclusive now emits a specific DMA_DATA packet with fixed engine/source/cache/wait/confirm/block fields and returns it as success. The new command test asserts those same chosen words, so it checks the encoder but does not independently establish that these are the console's semantics. The repository rule in AGENTS.md says to throw and record debt when general behavior is unknown. Please provide an authoritative hardware trace/firmware implementation or other exact source for this packet and its flags; absent that, keep the export throwing until the behavior is known.

Also, this changes libSceAgc command behavior, but the PR reports only the command unit test on Linux, marks GPUs n/a, and the hosted Windows build is still running. The project instructions require matching focused AGC validation on main and this head with the validation layer, no shader cache, and Vulkan required, plus the tested GPU/OS. Please run and report that required comparison if this implementation remains, and state any unavailable platform coverage accurately. I did not independently run the new test or hardware validation in this review.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:5685396942 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/12475#pullrequestreview-5685396942). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-10-28T15:39:07Z. **Review:** CHANGES_REQUESTED --- I reviewed the exact head `95254de7339e`. The implementation is not yet supported by evidence for the behavior it now returns: the new debt entry explicitly says the packet layout and engine blocking are unverified against retail traces, while `sceAgcCbMemsetExclusive` now emits a specific `DMA_DATA` packet with fixed engine/source/cache/wait/confirm/block fields and returns it as success. The new command test asserts those same chosen words, so it checks the encoder but does not independently establish that these are the console's semantics. The repository rule in `AGENTS.md` says to throw and record debt when general behavior is unknown. Please provide an authoritative hardware trace/firmware implementation or other exact source for this packet and its flags; absent that, keep the export throwing until the behavior is known. Also, this changes `libSceAgc` command behavior, but the PR reports only the command unit test on Linux, marks GPUs `n/a`, and the hosted Windows build is still running. The project instructions require matching focused AGC validation on `main` and this head with the validation layer, no shader cache, and Vulkan required, plus the tested GPU/OS. Please run and report that required comparison if this implementation remains, and state any unavailable platform coverage accurately. I did not independently run the new test or hardware validation in this review.
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!12475
No description provided.