fix(libSceAgcDriver): return 0 from sceAgcDriverRegisterDefaultOwner #5834
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/5834"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Imported from boykopovar/AnyPS5. Originally posted by xXPBSXx on 2026-10-14T12:56:05Z.
What
Broken Sword - Shadow of the Templars: Reforged (PPSA21480) stops at start-up on the code that
sceAgcDriverRegisterDefaultOwnerreturned:(
PPSA21480_rH/run_090451.errlines 2, 3 and 6; the last AGC call in the call trace ofPPSA21480_rT3/run_120116.errissceAgcDriverRegisterDefaultOwner, fromapp.exe+0x8f424, and the title's own report names that code.) The function now takes theuint32_t ownerby value, as OpenAGC and SharpEmu declare it, and returns 0.With this change the title goes past that call and ends later, on
AJM: decoding codec 23 is not implemented(PPSA21480_rT5/run_131226.errline 8), a different gap that this pull request does not touch.int32_t sceAgcDriverRegisterDefaultOwner(uint32_t owner)); https://github.com/sharpemu/sharpemu/blob/HEAD/src/SharpEmu.Libs/Agc/AgcExports.DriverResources.cs (lines 165-180: owner read from RDI asuint32, stored, returns OK).src/game_compat.c(lines 343-349) says that on firmware 5.50 this export is a six-byte stub that returns0x8A6C9018; SharpEmu returns 0. The two do not agree, and neither is a console measurement. This pull request follows what the title needs (0), recorded indocs/dev/debt/libSceAgcDriver.md.0x8A6C9018from the neighbouring registration calls (sceAgcDriverRegisterOwner,RegisterResource, ...); those still return it. Tolerating is not needing: whether a title that called this function and ignored the code behaves differently with 0 (for example by entering an owner or validation path) is not known; I have no run of such a title.Tested
Windows 10 (19045), MinGW-w64 GCC 15.2.0, Release. Branch
fix/agc-register-default-owner-v2, commit5a7f183a3onmain344afad05(one commit;git merge-treeagainstmain1b55ee4abis clean):guest_agc_driver_resources(changed:sceAgcDriverRegisterDefaultOwner(0)and(owner)return 0), measured onmain344afad05+ this commit: passes with the change; withUnimplemented.cpptaken frommain(test kept) it aborts, exit code0xc0000409.python tools/check_conventions.py --base upstream/mainwith this title and body passes.main067f4f614+ this commit (applied as cherry-pick,HEAD9c448d571):ninja -C build -j4 relinkerplus all 126core/libs/libs/*.prx, finished 14:32:29 local time (libSceAgcDriver.prx14:31:18); relinkrelink_title_trace.ps1=relinker.exe --windows --registry --trace-imports,app.exe14:32:31;run_title.ps1 -Seconds 120. Result (PPSA21480_rT6/run_143233.err, 342 lines): no8a6c9018and nosceCoredumpWriteUserStringline; the run ends at line 8 withAJM: decoding codec 23 is not implemented. Without the change (PPSA21480_rH/run_090451.err, libraries ofmaine46c69505): the stop described above.Checklist
main; no other open PR implements the same functionsNotImplemented_nid_no_patch); silent stubs are listed in TechnicalDebt (docs/dev/debt/libSceAgcDriver.md).mdfiles or images added to the repositorysceAgcDriverRegisterDefaultOwner; no bring-up discussion known to meAI-assisted (Claude Code).
🤖 Generated with Claude Code
Imported from boykopovar/AnyPS5. Originally posted by github-actions[bot] on 2026-10-15T12:10:09Z.
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.
docs/dev/debt/libSceAgcDriver.mddocs/dev/debt/libSceAgcDriver.mddocs/dev/debt/libSceAgcDriver.mddocs/dev/debt/libSceAgcDriver.mddocs/dev/debt/libSceAgcDriver.mddocs/dev/debt/libSceAgcDriver.mddocs/dev/debt/libSceAgcDriver.mddocs/dev/debt/libSceAgcDriver.mdcore/libs/tests/GuestAgcDriverResources.cppdocs/dev/debt/libSceAgcDriver.mdImported from boykopovar/AnyPS5. Originally posted by adriadam10 on 2026-10-15T13:26:08Z.
Checked the signature change against the cited sources,
guest_agc_driver_resources(passes with the change, fails without it) and the build/ctest of the touched libraries on Linux; the technical-debt line records that the console value is unverified. Merging once the full Build is green.Imported from boykopovar/AnyPS5. Originally posted by xXPBSXx on 2026-10-15T17:14:14Z.
@adriadam10 a short request on this PR: your Linux review above ends with "Merging once the full Build is green". The full Build only runs when a collaborator starts it for a pull request from a fork, so I cannot trigger it from my side. Head
5a7f183a3isMERGEABLE, the Conventions, Eligibility and Intake checks are green, and the description names the title (Broken Sword - Shadow of the Templars: Reforged, PPSA21480), the log line and the test that fails without the change. If there is anything else you need from me to run it, tell me and I will do it.AI-assisted (Claude Code).