feat(agc): write the measured sceAgcDcbResetQueue packet sequence #1629
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/1629"
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 ahmedhamouda78 on 2026-10-08T15:18:51Z.
What
sceAgcDcbResetQueuewrote only a singlec0001200 <state>CLEAR_STATE packet and ignoredopentirely (the KytyPS5 approximation). This replaces it with the sequence measured on a PS5 (firmware 13.60): an envelope (ffff1000/c0027904 00000342 ce20<op&ffff> <flag>...c0017904 00000342 cea00000) plus one packet group per setopbit, emitted in ascending bit order.Groups are emitted for op bits
0x001, 0x002, 0x004, 0x008, 0x010, 0x020, 0x080, 0x100, 0x800. The three bits whose groups the driver'sPm4::Validatecurrently rejects —0x040(whole-range ACQUIRE_MEM),0x200(EVENT_WRITE event 56),0x400(opcode 0x1E) — throw a clear error instead of being emitted, so this change cannot make a title stop inside the driver. Supporting those bits needs the driver-side acceptance first and belongs in a separate PR.state2 sets the envelope flag dword to0x00000008;state3 sets the0x004/0x800group's payload dword to0x00840f80; the other measuredstatevalues (0, 1, 4, 8, 0xF) produce the state-0 form.Tested
Linux, GCC 16.2.0, C++20. The AGC command test suite (
agc_command_tests—testPackets) was extended with exact-byte assertions for the envelope, single groups, thestate2 andstate3 variants,op=0x800, and that an unsupported bit throws and leaves the buffer unmodified; the suite passes. Every emitted byte was checked against the hardware probe output in #1581. Not run on hardware or against a title.Semantics source: the packet bytes and
op/statebehaviour come from the PS5 firmware 13.60 measurement in issue #1581 (thesceAgcDcbResetQueueprobe loadinglibSceAgc.sprxand dumping the command buffer), not from a cited ISA/driver source.Checklist
main; no other open PR implements the same functionsNotImplemented_nid_no_patch); silent stubs are listed in TechnicalDebt.mdfiles or images added to the repository (attach them to this PR)Fixes #1581
Imported from boykopovar/AnyPS5. Originally posted by klosixgaming-arch on 2026-10-08T15:34:07Z.
Review: APPROVED
LGTM. Excellent implementation that replaces the simplified KytyPS5 approximation with the actual packet sequence measured on PS5 hardware (firmware 13.60). The structure is clean - envelope construction, per-bit group emission in ascending order, proper state handling for special cases (state=2 flag, state=3 payload), and clear error throwing for unsupported bits that need driver-side acceptance first. Test coverage is thorough with exact-byte assertions against hardware probe output, covering base case, single groups, state variations, upper bits, and all three unsupported bit errors. Significant improvement over the previous implementation.
Imported from boykopovar/AnyPS5. Originally posted by popcoder565 on 2026-10-09T19:42:25Z.
Native Windows run, since no Windows results were posted. Setup: Windows 10 (19045), RTX 3060 Laptop (NVIDIA 616.92), MinGW-w64 GCC 15.2.0 (WinLibs r7), Release. Head
73eb8465, merged ontomain8b393b6ein one build with 31 other PRs that had no Windows run.agc_commands.guest_offline_imports, broken by #2359 (reported there).No title was run.
🤖 Addressed by Claude Code
Imported from boykopovar/AnyPS5. Originally posted by adriadam10 on 2026-10-10T05:58:20Z.
Checked the build and
agc_commandson Linux (the test fails without the change), the packet groups against the measurements in #1581, and the unsupported bits (0x040/0x200/0x400) throwing without touching the buffer. Windows run by @popcoder565 passes too. Merging once Linux CI is green (the earlier red was a cancelled lavapipe install step, rerun).