feat(libSceAgc): implement sceAgcDebugRaiseException #3448

Merged
Feuris merged 1 commit from upstream-pr/3448 into main 2026-10-11 11:43:54 +00:00
Feuris commented 2026-10-11 10:50:40 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by Feuris on 2026-10-11T10:50:40Z.


What

Carries @screamm's #3360 (the author is under the intake threshold). The commit is theirs, unchanged (9bec1907).

sceAgcDebugRaiseException (libSceAgc, NID T6xuVw0KUJo) is a NotImplemented_nid_no_patch stub. Palworld (PPSA23126, #2598) and 007 First Light (PPSA11386, #2523) import it.

  • New Misc/src/Debug.cpp: int sceAgcDebugRaiseException(std::uint32_t exceptionId) logs the exception id with APS5_LOG_OUT and returns 0, the behaviour of retail hardware per OpenAGC game_compat.c (dev kits trap with ud2, which is not reproduced), matching the model sceKernelDebugRaiseException in libkernel already follows.
  • The uint32_t argument follows KytyPS5's signature. The design decisions and sources are recorded in TechnicalDebt.
  • Unimplemented.cpp: the old stub is removed.
  • agc_commands (Commands.cpp): gains testDebugRaiseException testing that sceAgcDebugRaiseException(0x1234abcdu) returns 0 and does not throw.

Closes #3360.

Tested

  • Windows 11, MinGW-w64 GCC 15.2.0: syntax and compilation verified; tools/check_conventions.py --base origin/main and git diff --check pass cleanly.
  • Windows 11 Pro, WinLibs MinGW-w64 GCC 15.2.0 r7 (by original author): agc_initialization and agc_commands 3/3; ctest -j8 -E "^agc_driver_|^video_out_flip" 513/513 pass. With main's Unimplemented.cpp the new test fails.

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
<!-- greyfinch-sync:boykopovar/AnyPS5:issue:4818512190 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/3448). Originally posted by [Feuris](https://github.com/Feuris) on 2026-10-11T10:50:40Z. --- ### What Carries @screamm's #3360 (the author is under the intake threshold). The commit is theirs, unchanged (`9bec1907`). `sceAgcDebugRaiseException` (libSceAgc, NID `T6xuVw0KUJo`) is a `NotImplemented_nid_no_patch` stub. Palworld (PPSA23126, #2598) and 007 First Light (PPSA11386, #2523) import it. - New `Misc/src/Debug.cpp`: `int sceAgcDebugRaiseException(std::uint32_t exceptionId)` logs the exception id with `APS5_LOG_OUT` and returns 0, the behaviour of retail hardware per OpenAGC `game_compat.c` (dev kits trap with `ud2`, which is not reproduced), matching the model `sceKernelDebugRaiseException` in libkernel already follows. - The `uint32_t` argument follows KytyPS5's signature. The design decisions and sources are recorded in TechnicalDebt. - `Unimplemented.cpp`: the old stub is removed. - `agc_commands` (`Commands.cpp`): gains `testDebugRaiseException` testing that `sceAgcDebugRaiseException(0x1234abcdu)` returns 0 and does not throw. Closes #3360. ### Tested - Windows 11, MinGW-w64 GCC 15.2.0: syntax and compilation verified; `tools/check_conventions.py --base origin/main` and `git diff --check` pass cleanly. - Windows 11 Pro, WinLibs MinGW-w64 GCC 15.2.0 r7 (by original author): `agc_initialization` and `agc_commands` 3/3; `ctest -j8 -E "^agc_driver_|^video_out_flip"` 513/513 pass. With `main`'s `Unimplemented.cpp` the new test fails. ### 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
github-actions[bot] commented 2026-10-11 10:51:07 +00:00 (Migrated from github.com)

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


Progress report (9a9bd3f → 9bec190)

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

✅ 1 implemented
Library Name
libSceAgc sceAgcDebugRaiseException
<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6108249679 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/3448#issuecomment-6108249679). Originally posted by [github-actions[bot]](https://github.com/apps/github-actions) on 2026-10-11T10:51:07Z. --- <!-- progress-report --> ### Progress report (9a9bd3f → 9bec190) 📈 **System libraries**: 85.77% (+0.03%, +1 implemented functions) <details> <summary>✅ 1 implemented</summary> | Library | Name | | - | - | | libSceAgc | `sceAgcDebugRaiseException` | </details>
github-actions[bot] commented 2026-10-11 11:00:40 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by github-actions[bot] on 2026-10-11T11:00:40Z.


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
#1060 core/libs/prx/libSceAgc/tests/Commands.cpp L38
#2848 core/libs/prx/libSceAgc/tests/Commands.cpp L38
<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6108323433 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/3448#issuecomment-6108323433). Originally posted by [github-actions[bot]](https://github.com/apps/github-actions) on 2026-10-11T11:00:40Z. --- <!-- 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 | |---|---|---|---| | #1060 | `core/libs/prx/libSceAgc/tests/Commands.cpp` [L38](https://github.com/boykopovar/AnyPS5/blob/ea31cff19ced8f4444969fe07c96548752c95207/core/libs/prx/libSceAgc/tests/Commands.cpp#L38) | | | | #2848 | `core/libs/prx/libSceAgc/tests/Commands.cpp` [L38](https://github.com/boykopovar/AnyPS5/blob/ea31cff19ced8f4444969fe07c96548752c95207/core/libs/prx/libSceAgc/tests/Commands.cpp#L38) | | |
adriadam10 commented 2026-10-11 11:43:51 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by adriadam10 on 2026-10-11T11:43:51Z.


Checked the build and ctest of libSceAgc (20/20, agc_commands passes), conventions, and the TechnicalDebt entry against OpenAGC/KytyPS5; the new test cannot build without the change. Merging.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6108663813 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/3448#issuecomment-6108663813). Originally posted by [adriadam10](https://github.com/adriadam10) on 2026-10-11T11:43:51Z. --- Checked the build and ctest of libSceAgc (20/20, `agc_commands` passes), conventions, and the TechnicalDebt entry against OpenAGC/KytyPS5; the new test cannot build without the change. Merging.
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!3448
No description provided.