From 229c9442088fc8dc7e84c1448653337e2c3facee Mon Sep 17 00:00:00 2001 From: "Unknown W. Brackets" Date: Sat, 20 Aug 2022 17:35:06 -0700 Subject: [PATCH] GE Debugger: Include extended CLUT in frame dumps. Not available on a real PSP, but used in an enhancement (see #15727.) --- GPU/Debugger/Record.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/GPU/Debugger/Record.cpp b/GPU/Debugger/Record.cpp index 0a15fb8f43..907c7b82c4 100644 --- a/GPU/Debugger/Record.cpp +++ b/GPU/Debugger/Record.cpp @@ -454,7 +454,9 @@ static void EmitTransfer(u32 op) { static void EmitClut(u32 op) { u32 addr = gstate.getClutAddress(); - u32 bytes = (op & 0x3F) * 32; + // Actually should only be 0x3F, but we allow enhanced CLUTs. See #15727. + u32 blocks = (op & 0x7F) == 0x40 ? 0x40 : (op & 0x3F); + u32 bytes = blocks * 32; bytes = Memory::ValidSize(addr, bytes); if (bytes != 0) {