From eb59b00a37bc748b89b987cf8f77cb2848ed7a0e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Henrik=20Rydg=C3=A5rd?= Date: Tue, 6 Oct 2026 13:06:08 -0600 Subject: [PATCH] GE dump playback: Ignore a second INIT in a dump Before 71210f3fa2, a second dump request during a recording started it again, writing another INIT (and initial CLUT) into the dump: the GE state of that moment, which already includes the register writes the dump only has after it. Playback applied it, so the last draws ran with the wrong state: GOD EATER BURST (13950) and GOD EATER 2 (6343) came out black and Street Riders (14746) garbled. The recorder only writes an INIT when it starts, so skip any later one. The 15 such dumps in the GitHub issue set now match the PSP's replay, 10 of them exactly. Co-Authored-By: Claude Opus 5.5 (1M context) --- GPU/Debugger/Playback.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/GPU/Debugger/Playback.cpp b/GPU/Debugger/Playback.cpp index 1668ac9373..1014db3caf 100644 --- a/GPU/Debugger/Playback.cpp +++ b/GPU/Debugger/Playback.cpp @@ -1037,6 +1037,15 @@ ReplayResult DumpExecute::Run() { } const Command &cmd = commands_[i]; + // Only the first INIT is real. Before 71210f3fa2 a second dump request during a recording started + // it again, writing another INIT (and initial CLUT) into the dump: the GE state of that moment, + // which already includes register writes the dump only has after it. Applied, it ran the last + // draws with the wrong state (GOD EATER BURST 13950 came out black, Street Riders 14746 garbled). + if (cmd.type == CommandType::INIT && i != 0) { + if (i + 1 < commands_.size() && commands_[i + 1].type == CommandType::CLUT) + ++i; + continue; + } switch (cmd.type) { case CommandType::INIT: Init(cmd.ptr, cmd.sz);