feat(libSceAgc): build versioned ACB atomic GDS commands #3756

Merged
Lorkydey merged 2 commits from upstream-pr/3756 into main 2026-10-11 22:28:46 +00:00
Lorkydey commented 2026-10-11 16:30:35 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by Lorkydey on 2026-10-11T16:30:35Z.


What

Implement sceAgcAcbAtomicGds_0900 (gQkqkLttcpw), which currently throws, as an eleven-dword ATOMIC_GDS command builder. Preserve the control/mode bit mapping, field masks, 16-bit offset/index and both 64-bit payloads. Use the existing command-buffer allocator for reservation, guest callbacks and allocation errors.

Road of Death (PPSA07286) imports this throwing export in the audit posted in #2591:

gQkqkLttcpw  sceAgcAcbAtomicGds_0900

That is import evidence, not a runtime trace showing the title reaches this call. No title was run for this PR. This change implements packet construction only; it does not implement ATOMIC_GDS execution in the driver or claim that Road of Death advances further.

The signature and packet layout follow OpenAGC game_compat.c at 3c7e8072, lines 1672-1703. The older unversioned size helper is unchanged: this export has the distinct _0900 cursor ABI.

Tested

Windows, MinGW-w64 GCC 15.2.0, Release, BUILD_TESTING=ON, based on current main a11c8f7f.

  • Added the regression to agc_commands first: with the production code on main it fails with sceAgcAcbAtomicGds_0900 not implemented; with this change it passes.
  • Tests check a complete fixed packet including stack-passed guest ABI arguments, control/mode combinations, discarded bits, high/low 64-bit halves, cursor/return address and guard words. Allocation cases cover an exact fit with reserved words, exhaustion, null buffers, no down cursor, callback growth, callback refusal and insufficient callback space.
  • Full cmake --build build --parallel 8: passed.
  • ctest --test-dir build -R '^agc_(initialization|commands|platform_tests|packet_info_tests|register_command_tests|shader|interpolant|prim|gs_)' --output-on-failure --parallel 4: 18/18 passed.
  • python tools/check_test_registration.py build, python tools/check_conventions.py --base origin/main and git diff --check: passed.
  • The repository overlap checker found no overlap with 286 open PRs. Searches for the export name and NID across issues/PRs/comments found no competing implementation.
  • tools/progress.py: library implementations 2903/3383 -> 2904/3383 (85.81% -> 85.84%). This measures source implementation coverage, not game compatibility.
  • Not tested on Linux or PS5 hardware.

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 (Codex)
<!-- greyfinch-sync:boykopovar/AnyPS5:issue:4820567771 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/3756). Originally posted by [Lorkydey](https://github.com/Lorkydey) on 2026-10-11T16:30:35Z. --- ### What Implement `sceAgcAcbAtomicGds_0900` (`gQkqkLttcpw`), which currently throws, as an eleven-dword `ATOMIC_GDS` command builder. Preserve the control/mode bit mapping, field masks, 16-bit offset/index and both 64-bit payloads. Use the existing command-buffer allocator for reservation, guest callbacks and allocation errors. Road of Death (PPSA07286) imports this throwing export in the audit posted in #2591: ```text gQkqkLttcpw sceAgcAcbAtomicGds_0900 ``` That is import evidence, not a runtime trace showing the title reaches this call. No title was run for this PR. This change implements packet construction only; it does not implement `ATOMIC_GDS` execution in the driver or claim that Road of Death advances further. The signature and packet layout follow [OpenAGC `game_compat.c` at 3c7e8072, lines 1672-1703](https://github.com/OpenAGC/OpenAGC/blob/3c7e8072f0d7684e930454794fd5c02056946d73/src/game_compat.c#L1672-L1703). The older unversioned size helper is unchanged: this export has the distinct `_0900` cursor ABI. ### Tested Windows, MinGW-w64 GCC 15.2.0, Release, `BUILD_TESTING=ON`, based on current main `a11c8f7f`. - Added the regression to `agc_commands` first: with the production code on main it fails with `sceAgcAcbAtomicGds_0900 not implemented`; with this change it passes. - Tests check a complete fixed packet including stack-passed guest ABI arguments, control/mode combinations, discarded bits, high/low 64-bit halves, cursor/return address and guard words. Allocation cases cover an exact fit with reserved words, exhaustion, null buffers, no down cursor, callback growth, callback refusal and insufficient callback space. - Full `cmake --build build --parallel 8`: passed. - `ctest --test-dir build -R '^agc_(initialization|commands|platform_tests|packet_info_tests|register_command_tests|shader|interpolant|prim|gs_)' --output-on-failure --parallel 4`: 18/18 passed. - `python tools/check_test_registration.py build`, `python tools/check_conventions.py --base origin/main` and `git diff --check`: passed. - The repository overlap checker found no overlap with 286 open PRs. Searches for the export name and NID across issues/PRs/comments found no competing implementation. - `tools/progress.py`: library implementations 2903/3383 -> 2904/3383 (85.81% -> 85.84%). This measures source implementation coverage, not game compatibility. - Not tested on Linux or PS5 hardware. ### 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 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 (Codex)
github-actions[bot] commented 2026-10-11 16:30:56 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by github-actions[bot] on 2026-10-11T16:30:56Z.


Progress report (c7b9719 → 38cb3b1)

📈 System libraries: 86.02% (+0.03%, +1 implemented functions)

✅ 1 implemented
Library Name
libSceAgc sceAgcAcbAtomicGds_0900
<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6111177530 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/3756#issuecomment-6111177530). Originally posted by [github-actions[bot]](https://github.com/apps/github-actions) on 2026-10-11T16:30:56Z. --- <!-- progress-report --> ### Progress report (c7b9719 → 38cb3b1) 📈 **System libraries**: 86.02% (+0.03%, +1 implemented functions) <details> <summary>✅ 1 implemented</summary> | Library | Name | | - | - | | libSceAgc | `sceAgcAcbAtomicGds_0900` | </details>
adriadam10 commented 2026-10-11 21:58:23 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by adriadam10 on 2026-10-11T21:58:23Z.


Checked against OpenAGC game_compat.c (3c7e807): signature, control/mode mapping, masks and the 11-dword layout match; build and the libSceAgc ctest set pass on Linux, and agc_commands fails without the change.

Added one commit on your branch: a TechnicalDebt "Unknown function info" line, since OpenAGC is the only source for this layout (no KytyPS5/shadPS4 body) and nothing was run on a title. Note the cited line range in the PR body is off; the function is around line 1825 at that commit.

Merging once CI is green.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6114259849 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/3756#issuecomment-6114259849). Originally posted by [adriadam10](https://github.com/adriadam10) on 2026-10-11T21:58:23Z. --- Checked against OpenAGC `game_compat.c` (3c7e807): signature, control/mode mapping, masks and the 11-dword layout match; build and the libSceAgc ctest set pass on Linux, and `agc_commands` fails without the change. Added one commit on your branch: a TechnicalDebt "Unknown function info" line, since OpenAGC is the only source for this layout (no KytyPS5/shadPS4 body) and nothing was run on a title. Note the cited line range in the PR body is off; the function is around line 1825 at that commit. Merging once CI is green.
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!3756
No description provided.