Skip to content

feat(libSceAgc): implement sceAgcDebugRaiseException - #3448

Merged
adriadam10 merged 1 commit into
boykopovar:mainfrom
Feuris:carry/agc-debug-raise-exception
Oct 11, 2026
Merged

adriadam10 merged 1 commit into
boykopovar:mainfrom
Feuris:carry/agc-debug-raise-exception

Conversation

@Feuris

@Feuris Feuris commented Oct 11, 2026

Copy link
Copy Markdown
Contributor

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

sceAgcDebugRaiseException (NID T6xuVw0KUJo) now logs the exception id
with APS5_LOG_OUT and returns 0, as libkernel's
sceKernelDebugRaiseException does.

Palworld PPSA23126 (boykopovar#2598) and 007 First Light PPSA11386 (boykopovar#2523) import
it; neither is shown calling it.

OpenAGC 3c7e8072 (src/game_compat.c) returns 0 and says the function is
a no-op on retail hardware; the ud2 trap it describes for development
hardware is not reproduced. KytyPS5 6f0cddd4 (src/libs/agc.cpp) takes a
uint32 exception_id, logs it and returns 0. OpenAGC declares no
arguments, but a body that only traps reads none, so the uint32 is kept
and the conflict is recorded in TechnicalDebt. The aerolib name is from
zecoxao/sce_symbols 2883963a; ps5-payload-dev/sdk f5d40f02 has only an
untyped stub.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
@github-actions

Copy link
Copy Markdown

Progress report (9a9bd3f → 9bec190)

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

✅ 1 implemented
Library Name
libSceAgc sceAgcDebugRaiseException

@github-actions

github-actions Bot commented Oct 11, 2026 •

Copy link
Copy Markdown

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

@adriadam10

Copy link
Copy Markdown
Collaborator

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.

@adriadam10
adriadam10 merged commit 077eeb0 into boykopovar:main Oct 11, 2026
15 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

libSceAgc: sceAgcDebugRaiseException is a stub (Palworld, 007 First Light import); fix branch ready

2 participants