feat(libSceAgc): implement static buffers and qwords #8317

Merged
hypermoist merged 2 commits from upstream-pr/8317 into main 2026-10-21 13:32:20 +00:00
hypermoist commented 2026-10-20 09:53:37 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by hypermoist on 2026-10-20T09:53:37Z.


What

Implements four absent libSceAgc exports. The firmware bodies are from the decrypted libSceAgc.sprx.

  • The table. At module init, libSceAgc takes the driver's reserved DMEM from sceAgcDriverGetReservedDmemForAgc, zeroes its first 0x60 bytes as six 16-byte slots and checks that the pointer equals 0xfe0040000 (init code at 0xdc90..0xdcd6). This is the same page Lifecycle.cpp already maps as FsTableAddress, where the driver fills slot 0 with the fetch shader table.
  • sceAgcSetStaticBuffer (-pjHhph0ZUc) / sceAgcGetStaticBuffer (OXDc0KCnUhs). (uint32 index, void* buffer). An index above 5 returns 0x8a6c000b. Otherwise the call copies 16 bytes to or from table + index * 16 (vmovups xmmword ptr [rcx + rax] after shl rax, 4) and returns 0. Firmware also returns 0x8a6c002f when its init did not get the table. Here the driver maps it on first use or throws, so that path cannot happen.
  • sceAgcSetStaticQword (86rJnbZUpr4) / sceAgcGetStaticQword (NbiQSQ-UL+M). (uint32 index, uint64 value / uint64* value). The call stores or loads at 0xfe0040010 + index * 8 (movabs rcx, 0xfe0040010; mov qword ptr [rcx + rax*8], rsi) and returns 0. Firmware has no bounds check, and neither does this implementation.
  • Debt. The AGC FS table entry in docs/dev/debt/libSceAgcDriver.md no longer says "the other five slots stay zero": slots 1 to 5 are now written by these calls, and staying zero until a title writes them is the console's behaviour.
  • Driver accessor. libSceAgc reaches the table through AgcDriverStaticTable_nid_postfix. It is appended to Execution/src/Driver/Lifecycle.cpp next to the existing address constants, and it constructs the driver so the page is mapped.

Tested

Linux (CachyOS, GCC, Release). The new agc_static_buffer_tests passes:

  • static buffer 0 reads back the driver's fetch shader table descriptor;
  • buffer 5 lands in the sixth slot and reads back;
  • index 6 returns 0x8a6c000b;
  • qwords 0 and 3 land at +0x10 and +0x28, and qword 0 is the first half of static buffer 1;
  • the test is skipped under ASan, like ComputeFsTableCalls.

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 (CPU-side table writes; the test ran on an NVIDIA RTX 3060, driver 615.78.08, Linux)
  • AI-assisted: yes (Claude Code), reviewed by the contributor

🤖 Generated with Claude Code

https://claude.ai/code/session_01RbLgECLQ2bpDM7oe2urGZK

<!-- greyfinch-sync:boykopovar/AnyPS5:issue:4934060581 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/8317). Originally posted by [hypermoist](https://github.com/hypermoist) on 2026-10-20T09:53:37Z. --- ### What Implements four absent `libSceAgc` exports. The firmware bodies are from the decrypted `libSceAgc.sprx`. - **The table.** At module init, libSceAgc takes the driver's reserved DMEM from `sceAgcDriverGetReservedDmemForAgc`, zeroes its first `0x60` bytes as six 16-byte slots and checks that the pointer equals `0xfe0040000` (init code at `0xdc90..0xdcd6`). This is the same page `Lifecycle.cpp` already maps as `FsTableAddress`, where the driver fills slot 0 with the fetch shader table. - **`sceAgcSetStaticBuffer` (`-pjHhph0ZUc`) / `sceAgcGetStaticBuffer` (`OXDc0KCnUhs`).** `(uint32 index, void* buffer)`. An index above 5 returns `0x8a6c000b`. Otherwise the call copies 16 bytes to or from `table + index * 16` (`vmovups xmmword ptr [rcx + rax]` after `shl rax, 4`) and returns 0. Firmware also returns `0x8a6c002f` when its init did not get the table. Here the driver maps it on first use or throws, so that path cannot happen. - **`sceAgcSetStaticQword` (`86rJnbZUpr4`) / `sceAgcGetStaticQword` (`NbiQSQ-UL+M`).** `(uint32 index, uint64 value / uint64* value)`. The call stores or loads at `0xfe0040010 + index * 8` (`movabs rcx, 0xfe0040010; mov qword ptr [rcx + rax*8], rsi`) and returns 0. Firmware has no bounds check, and neither does this implementation. - **Debt.** The AGC FS table entry in `docs/dev/debt/libSceAgcDriver.md` no longer says "the other five slots stay zero": slots 1 to 5 are now written by these calls, and staying zero until a title writes them is the console's behaviour. - **Driver accessor.** libSceAgc reaches the table through `AgcDriverStaticTable_nid_postfix`. It is appended to `Execution/src/Driver/Lifecycle.cpp` next to the existing address constants, and it constructs the driver so the page is mapped. ### Tested Linux (CachyOS, GCC, Release). The new `agc_static_buffer_tests` passes: - static buffer 0 reads back the driver's fetch shader table descriptor; - buffer 5 lands in the sixth slot and reads back; - index 6 returns `0x8a6c000b`; - qwords 0 and 3 land at `+0x10` and `+0x28`, and qword 0 is the first half of static buffer 1; - the test is skipped under ASan, like `ComputeFsTableCalls`. ### 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 (CPU-side table writes; the test ran on an NVIDIA RTX 3060, driver 615.78.08, Linux) - [x] AI-assisted: yes (Claude Code), reviewed by the contributor 🤖 Generated with [Claude Code](https://claude.com/claude-code) https://claude.ai/code/session_01RbLgECLQ2bpDM7oe2urGZK
github-actions[bot] commented 2026-10-20 09:54:21 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by github-actions[bot] on 2026-10-20T09:54:21Z.


Progress report (eea640a → 07ed40b)

📈 System libraries: 62.86% (+0.02%, +4 implemented functions)

✅ 4 implemented
Library Name
libSceAgc sceAgcGetStaticBuffer
libSceAgc sceAgcGetStaticQword
libSceAgc sceAgcSetStaticBuffer
libSceAgc sceAgcSetStaticQword
<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6288291689 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/8317#issuecomment-6288291689). Originally posted by [github-actions[bot]](https://github.com/apps/github-actions) on 2026-10-20T09:54:21Z. --- <!-- progress-report --> ### Progress report (eea640a → 07ed40b) 📈 **System libraries**: 62.86% (+0.02%, +4 implemented functions) <details> <summary>✅ 4 implemented</summary> | Library | Name | | - | - | | libSceAgc | `sceAgcGetStaticBuffer` | | libSceAgc | `sceAgcGetStaticQword` | | libSceAgc | `sceAgcSetStaticBuffer` | | libSceAgc | `sceAgcSetStaticQword` | </details>
github-actions[bot] commented 2026-10-20 10:20:43 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by github-actions[bot] on 2026-10-20T10:20:43Z.


Other open pull requests touch the same code. Merging one will break the other, or both implement the same thing. If this one builds on them, list them in Depends on.

Pull request Conflicting files (lines on main) Same exports Same new files
PR 8070 docs/dev/debt/libSceAgcDriver.md L202-203
PR 9068 docs/dev/debt/libSceAgcDriver.md L202-203

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 2434 docs/dev/debt/libSceAgcDriver.md
PR 4448 docs/dev/debt/libSceAgcDriver.md
PR 4449 docs/dev/debt/libSceAgcDriver.md
PR 5021 core/libs/prx/libSceAgc/CMakeLists.txt
core/libs/prx/libSceAgcDriver/Execution/src/Driver/Lifecycle.cpp
PR 5058 docs/dev/debt/libSceAgcDriver.md
PR 5372 docs/dev/debt/libSceAgcDriver.md
PR 5499 docs/dev/debt/libSceAgcDriver.md
PR 5925 core/libs/prx/libSceAgcDriver/Execution/src/Driver/Lifecycle.cpp
docs/dev/debt/libSceAgcDriver.md
PR 6044 core/libs/prx/libSceAgc/CMakeLists.txt
PR 6188 core/libs/prx/libSceAgcDriver/Execution/src/Driver/Lifecycle.cpp
PR 6194 docs/dev/debt/libSceAgcDriver.md
PR 6223 docs/dev/debt/libSceAgcDriver.md
PR 6280 docs/dev/debt/libSceAgcDriver.md
PR 6300 docs/dev/debt/libSceAgcDriver.md
PR 6412 docs/dev/debt/libSceAgcDriver.md
PR 6481 docs/dev/debt/libSceAgcDriver.md
PR 6548 docs/dev/debt/libSceAgcDriver.md
PR 6549 docs/dev/debt/libSceAgcDriver.md
PR 6639 docs/dev/debt/libSceAgcDriver.md
PR 6747 core/libs/prx/libSceAgc/CMakeLists.txt
core/libs/prx/libSceAgcDriver/Execution/include/Driver.hpp
PR 6801 docs/dev/debt/libSceAgcDriver.md
PR 6808 docs/dev/debt/libSceAgcDriver.md
PR 6867 docs/dev/debt/libSceAgcDriver.md
PR 6868 docs/dev/debt/libSceAgcDriver.md
PR 6887 docs/dev/debt/libSceAgcDriver.md
PR 6946 core/libs/prx/libSceAgcDriver/Execution/src/Driver/Lifecycle.cpp
docs/dev/debt/libSceAgcDriver.md
PR 6947 core/libs/prx/libSceAgcDriver/Execution/src/Driver/Lifecycle.cpp
docs/dev/debt/libSceAgcDriver.md
PR 6965 docs/dev/debt/libSceAgcDriver.md
PR 6973 docs/dev/debt/libSceAgcDriver.md
PR 6977 core/libs/prx/libSceAgcDriver/Execution/include/Driver.hpp
docs/dev/debt/libSceAgcDriver.md
PR 6987 docs/dev/debt/libSceAgcDriver.md
PR 6989 docs/dev/debt/libSceAgcDriver.md
PR 6995 docs/dev/debt/libSceAgcDriver.md
PR 7002 docs/dev/debt/libSceAgcDriver.md
PR 7201 core/libs/prx/libSceAgcDriver/Execution/src/Driver/Lifecycle.cpp
PR 7256 docs/dev/debt/libSceAgcDriver.md
PR 7449 docs/dev/debt/libSceAgcDriver.md
PR 7505 docs/dev/debt/libSceAgcDriver.md
PR 7604 docs/dev/debt/libSceAgcDriver.md
PR 7642 core/libs/prx/libSceAgcDriver/Execution/src/Driver/Lifecycle.cpp
docs/dev/debt/libSceAgcDriver.md
PR 7800 docs/dev/debt/libSceAgcDriver.md
PR 7803 docs/dev/debt/libSceAgcDriver.md
PR 7883 docs/dev/debt/libSceAgcDriver.md
PR 7893 docs/dev/debt/libSceAgcDriver.md
PR 7910 docs/dev/debt/libSceAgcDriver.md
PR 8014 docs/dev/debt/libSceAgcDriver.md
PR 8395 docs/dev/debt/libSceAgcDriver.md
PR 8424 docs/dev/debt/libSceAgcDriver.md
PR 8538 docs/dev/debt/libSceAgcDriver.md
PR 8564 docs/dev/debt/libSceAgcDriver.md
PR 8592 docs/dev/debt/libSceAgcDriver.md
PR 9020 docs/dev/debt/libSceAgcDriver.md
PR 9077 docs/dev/debt/libSceAgcDriver.md
<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6288729154 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/8317#issuecomment-6288729154). Originally posted by [github-actions[bot]](https://github.com/apps/github-actions) on 2026-10-20T10:20:43Z. --- <!-- pr-overlap --> Other open pull requests touch the same code. Merging one will break the other, or both implement the same thing. If this one builds on them, list them in **Depends on**. | Pull request | Conflicting files (lines on `main`) | Same exports | Same new files | |---|---|---|---| | [PR 8070](https://www.github.com/boykopovar/AnyPS5/pull/8070) | `docs/dev/debt/libSceAgcDriver.md` [L202-203](https://github.com/boykopovar/AnyPS5/blob/27bcd6a29e2fd69aba0626610b2350eb8f2847f6/docs/dev/debt/libSceAgcDriver.md#L202-L203) | | | | [PR 9068](https://www.github.com/boykopovar/AnyPS5/pull/9068) | `docs/dev/debt/libSceAgcDriver.md` [L202-203](https://github.com/boykopovar/AnyPS5/blob/27bcd6a29e2fd69aba0626610b2350eb8f2847f6/docs/dev/debt/libSceAgcDriver.md#L202-L203) | | | 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 2434](https://www.github.com/boykopovar/AnyPS5/pull/2434) | `docs/dev/debt/libSceAgcDriver.md` | | [PR 4448](https://www.github.com/boykopovar/AnyPS5/pull/4448) | `docs/dev/debt/libSceAgcDriver.md` | | [PR 4449](https://www.github.com/boykopovar/AnyPS5/pull/4449) | `docs/dev/debt/libSceAgcDriver.md` | | [PR 5021](https://www.github.com/boykopovar/AnyPS5/pull/5021) | `core/libs/prx/libSceAgc/CMakeLists.txt`<br>`core/libs/prx/libSceAgcDriver/Execution/src/Driver/Lifecycle.cpp` | | [PR 5058](https://www.github.com/boykopovar/AnyPS5/pull/5058) | `docs/dev/debt/libSceAgcDriver.md` | | [PR 5372](https://www.github.com/boykopovar/AnyPS5/pull/5372) | `docs/dev/debt/libSceAgcDriver.md` | | [PR 5499](https://www.github.com/boykopovar/AnyPS5/pull/5499) | `docs/dev/debt/libSceAgcDriver.md` | | [PR 5925](https://www.github.com/boykopovar/AnyPS5/pull/5925) | `core/libs/prx/libSceAgcDriver/Execution/src/Driver/Lifecycle.cpp`<br>`docs/dev/debt/libSceAgcDriver.md` | | [PR 6044](https://www.github.com/boykopovar/AnyPS5/pull/6044) | `core/libs/prx/libSceAgc/CMakeLists.txt` | | [PR 6188](https://www.github.com/boykopovar/AnyPS5/pull/6188) | `core/libs/prx/libSceAgcDriver/Execution/src/Driver/Lifecycle.cpp` | | [PR 6194](https://www.github.com/boykopovar/AnyPS5/pull/6194) | `docs/dev/debt/libSceAgcDriver.md` | | [PR 6223](https://www.github.com/boykopovar/AnyPS5/pull/6223) | `docs/dev/debt/libSceAgcDriver.md` | | [PR 6280](https://www.github.com/boykopovar/AnyPS5/pull/6280) | `docs/dev/debt/libSceAgcDriver.md` | | [PR 6300](https://www.github.com/boykopovar/AnyPS5/pull/6300) | `docs/dev/debt/libSceAgcDriver.md` | | [PR 6412](https://www.github.com/boykopovar/AnyPS5/pull/6412) | `docs/dev/debt/libSceAgcDriver.md` | | [PR 6481](https://www.github.com/boykopovar/AnyPS5/pull/6481) | `docs/dev/debt/libSceAgcDriver.md` | | [PR 6548](https://www.github.com/boykopovar/AnyPS5/pull/6548) | `docs/dev/debt/libSceAgcDriver.md` | | [PR 6549](https://www.github.com/boykopovar/AnyPS5/pull/6549) | `docs/dev/debt/libSceAgcDriver.md` | | [PR 6639](https://www.github.com/boykopovar/AnyPS5/pull/6639) | `docs/dev/debt/libSceAgcDriver.md` | | [PR 6747](https://www.github.com/boykopovar/AnyPS5/pull/6747) | `core/libs/prx/libSceAgc/CMakeLists.txt`<br>`core/libs/prx/libSceAgcDriver/Execution/include/Driver.hpp` | | [PR 6801](https://www.github.com/boykopovar/AnyPS5/pull/6801) | `docs/dev/debt/libSceAgcDriver.md` | | [PR 6808](https://www.github.com/boykopovar/AnyPS5/pull/6808) | `docs/dev/debt/libSceAgcDriver.md` | | [PR 6867](https://www.github.com/boykopovar/AnyPS5/pull/6867) | `docs/dev/debt/libSceAgcDriver.md` | | [PR 6868](https://www.github.com/boykopovar/AnyPS5/pull/6868) | `docs/dev/debt/libSceAgcDriver.md` | | [PR 6887](https://www.github.com/boykopovar/AnyPS5/pull/6887) | `docs/dev/debt/libSceAgcDriver.md` | | [PR 6946](https://www.github.com/boykopovar/AnyPS5/pull/6946) | `core/libs/prx/libSceAgcDriver/Execution/src/Driver/Lifecycle.cpp`<br>`docs/dev/debt/libSceAgcDriver.md` | | [PR 6947](https://www.github.com/boykopovar/AnyPS5/pull/6947) | `core/libs/prx/libSceAgcDriver/Execution/src/Driver/Lifecycle.cpp`<br>`docs/dev/debt/libSceAgcDriver.md` | | [PR 6965](https://www.github.com/boykopovar/AnyPS5/pull/6965) | `docs/dev/debt/libSceAgcDriver.md` | | [PR 6973](https://www.github.com/boykopovar/AnyPS5/pull/6973) | `docs/dev/debt/libSceAgcDriver.md` | | [PR 6977](https://www.github.com/boykopovar/AnyPS5/pull/6977) | `core/libs/prx/libSceAgcDriver/Execution/include/Driver.hpp`<br>`docs/dev/debt/libSceAgcDriver.md` | | [PR 6987](https://www.github.com/boykopovar/AnyPS5/pull/6987) | `docs/dev/debt/libSceAgcDriver.md` | | [PR 6989](https://www.github.com/boykopovar/AnyPS5/pull/6989) | `docs/dev/debt/libSceAgcDriver.md` | | [PR 6995](https://www.github.com/boykopovar/AnyPS5/pull/6995) | `docs/dev/debt/libSceAgcDriver.md` | | [PR 7002](https://www.github.com/boykopovar/AnyPS5/pull/7002) | `docs/dev/debt/libSceAgcDriver.md` | | [PR 7201](https://www.github.com/boykopovar/AnyPS5/pull/7201) | `core/libs/prx/libSceAgcDriver/Execution/src/Driver/Lifecycle.cpp` | | [PR 7256](https://www.github.com/boykopovar/AnyPS5/pull/7256) | `docs/dev/debt/libSceAgcDriver.md` | | [PR 7449](https://www.github.com/boykopovar/AnyPS5/pull/7449) | `docs/dev/debt/libSceAgcDriver.md` | | [PR 7505](https://www.github.com/boykopovar/AnyPS5/pull/7505) | `docs/dev/debt/libSceAgcDriver.md` | | [PR 7604](https://www.github.com/boykopovar/AnyPS5/pull/7604) | `docs/dev/debt/libSceAgcDriver.md` | | [PR 7642](https://www.github.com/boykopovar/AnyPS5/pull/7642) | `core/libs/prx/libSceAgcDriver/Execution/src/Driver/Lifecycle.cpp`<br>`docs/dev/debt/libSceAgcDriver.md` | | [PR 7800](https://www.github.com/boykopovar/AnyPS5/pull/7800) | `docs/dev/debt/libSceAgcDriver.md` | | [PR 7803](https://www.github.com/boykopovar/AnyPS5/pull/7803) | `docs/dev/debt/libSceAgcDriver.md` | | [PR 7883](https://www.github.com/boykopovar/AnyPS5/pull/7883) | `docs/dev/debt/libSceAgcDriver.md` | | [PR 7893](https://www.github.com/boykopovar/AnyPS5/pull/7893) | `docs/dev/debt/libSceAgcDriver.md` | | [PR 7910](https://www.github.com/boykopovar/AnyPS5/pull/7910) | `docs/dev/debt/libSceAgcDriver.md` | | [PR 8014](https://www.github.com/boykopovar/AnyPS5/pull/8014) | `docs/dev/debt/libSceAgcDriver.md` | | [PR 8395](https://www.github.com/boykopovar/AnyPS5/pull/8395) | `docs/dev/debt/libSceAgcDriver.md` | | [PR 8424](https://www.github.com/boykopovar/AnyPS5/pull/8424) | `docs/dev/debt/libSceAgcDriver.md` | | [PR 8538](https://www.github.com/boykopovar/AnyPS5/pull/8538) | `docs/dev/debt/libSceAgcDriver.md` | | [PR 8564](https://www.github.com/boykopovar/AnyPS5/pull/8564) | `docs/dev/debt/libSceAgcDriver.md` | | [PR 8592](https://www.github.com/boykopovar/AnyPS5/pull/8592) | `docs/dev/debt/libSceAgcDriver.md` | | [PR 9020](https://www.github.com/boykopovar/AnyPS5/pull/9020) | `docs/dev/debt/libSceAgcDriver.md` | | [PR 9077](https://www.github.com/boykopovar/AnyPS5/pull/9077) | `docs/dev/debt/libSceAgcDriver.md` |
nikowolf123 commented 2026-10-20 22:04:33 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by nikowolf123 on 2026-10-20T22:04:33Z.


The AGC FS table entry at docs/dev/debt/libSceAgcDriver.md#L190 still ends with "and the other five slots stay zero". This PR makes that untrue. For example, sceAgcSetStaticBuffer(5, buf) (StaticBuffer.cpp#L25) copies buf into slot 5 at 0xF_E0040050. sceAgcSetStaticQword(0, v) (StaticBuffer.cpp#L36) fills the first half of slot 1. The new test checks both writes. The PR description says firmware libSceAgc zeroes all six slots at init (0xdc90..0xdcd6) and that these exports write them. So slots that stay zero until the title writes them are now the modeled console behaviour, not a gap.

CONTRIBUTING.md asks a pull request that closes a gap to cut the entry "to what is still open". I'd delete , and the other five slots stay zero so the entry ends with: "Sony's routines, which order work before a title's ds_ordered_count, are not modeled."

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6302783676 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/8317#issuecomment-6302783676). Originally posted by [nikowolf123](https://github.com/nikowolf123) on 2026-10-20T22:04:33Z. --- The AGC FS table entry at [docs/dev/debt/libSceAgcDriver.md#L190](https://github.com/boykopovar/AnyPS5/blob/fec563d92cd91eca2d174972bdd4167dacf29956/docs/dev/debt/libSceAgcDriver.md?plain=1#L190) still ends with "and the other five slots stay zero". This PR makes that untrue. For example, `sceAgcSetStaticBuffer(5, buf)` ([StaticBuffer.cpp#L25](https://github.com/boykopovar/AnyPS5/blob/fec563d92cd91eca2d174972bdd4167dacf29956/core/libs/prx/libSceAgc/Misc/src/StaticBuffer.cpp#L25)) copies `buf` into slot 5 at 0xF_E0040050. `sceAgcSetStaticQword(0, v)` ([StaticBuffer.cpp#L36](https://github.com/boykopovar/AnyPS5/blob/fec563d92cd91eca2d174972bdd4167dacf29956/core/libs/prx/libSceAgc/Misc/src/StaticBuffer.cpp#L36)) fills the first half of slot 1. The new test checks both writes. The PR description says firmware libSceAgc zeroes all six slots at init (`0xdc90..0xdcd6`) and that these exports write them. So slots that stay zero until the title writes them are now the modeled console behaviour, not a gap. [CONTRIBUTING.md](https://github.com/boykopovar/AnyPS5/blob/fec563d92cd91eca2d174972bdd4167dacf29956/CONTRIBUTING.md?plain=1#L73) asks a pull request that closes a gap to cut the entry "to what is still open". I'd delete `, and the other five slots stay zero` so the entry ends with: "Sony's routines, which order work before a title's `ds_ordered_count`, are not modeled."
MarcZX10 commented 2026-10-20 22:05:01 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-20T22:05:01Z.


I checked the debt entry at this PR head (fec563d). It still says “and the other five slots stay zero,” while these new exports write slots 1–5. The suggested edit in the thread is accurate: remove that clause and leave the remaining limitation that Sony’s routines ordering work before ds_ordered_count are not modeled. The focused test here exercises both a slot-5 buffer write and qword writes into slots 1–2.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6302795868 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/8317#issuecomment-6302795868). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-10-20T22:05:01Z. --- I checked the debt entry at this PR head (`fec563d`). It still says “and the other five slots stay zero,” while these new exports write slots 1–5. The suggested edit in the thread is accurate: remove that clause and leave the remaining limitation that Sony’s routines ordering work before `ds_ordered_count` are not modeled. The focused test here exercises both a slot-5 buffer write and qword writes into slots 1–2.
hypermoist commented 2026-10-20 23:12:12 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by hypermoist on 2026-10-20T23:12:12Z.


Thanks @nikowolf123 and @MarcZX10. Removed "and the other five slots stay zero" from the AGC FS table entry in 07ed40b7ce. The entry now records only what is still missing: Sony's routines that order work before ds_ordered_count are not modeled.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6303865270 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/8317#issuecomment-6303865270). Originally posted by [hypermoist](https://github.com/hypermoist) on 2026-10-20T23:12:12Z. --- Thanks @nikowolf123 and @MarcZX10. Removed "and the other five slots stay zero" from the AGC FS table entry in 07ed40b7ce. The entry now records only what is still missing: Sony's routines that order work before `ds_ordered_count` are not modeled.
adriadam10 commented 2026-10-21 13:34:23 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by adriadam10 on 2026-10-21T13:34:23Z.


Checked the four exports against the described firmware bodies (index bound 5 with 0x8a6c000b for buffers, qwords at table + 0x10, no bound as in firmware), the table address against FsTableAddress, the registered agc_static_buffer test, and the debt entry (stale clause removed in 07ed40b); merged.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6317407408 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/8317#issuecomment-6317407408). Originally posted by [adriadam10](https://github.com/adriadam10) on 2026-10-21T13:34:23Z. --- Checked the four exports against the described firmware bodies (index bound 5 with 0x8a6c000b for buffers, qwords at table + 0x10, no bound as in firmware), the table address against `FsTableAddress`, the registered `agc_static_buffer` test, and the debt entry (stale clause removed in 07ed40b); merged.
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!8317
No description provided.