From 132686513d546816cef6e62005241f84cce2dc22 Mon Sep 17 00:00:00 2001 From: "Unknown W. Brackets" Date: Sun, 14 Aug 2022 16:14:23 -0700 Subject: [PATCH 1/2] GE Debugger: Correct base accounting in playback. On a jump, was forgetting the base value which caused corruption. --- GPU/Debugger/Playback.cpp | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/GPU/Debugger/Playback.cpp b/GPU/Debugger/Playback.cpp index 8fa93e7d7c..aa34ce3ccf 100644 --- a/GPU/Debugger/Playback.cpp +++ b/GPU/Debugger/Playback.cpp @@ -367,6 +367,7 @@ bool DumpExecute::SubmitCmds(const void *p, u32 sz) { Memory::Write_U32((GE_CMD_JUMP << 24) | (execListBuf & 0x00FFFFFF), execListPos + 4); execListPos = execListBuf; + lastBase_ = execListBuf & 0xFF000000; // Don't continue until we've stalled. SyncStall(); @@ -450,9 +451,9 @@ void DumpExecute::Vertices(u32 ptr, u32 sz) { return; } - if (lastBase_ != (psp & 0x0FF000000)) { + if (lastBase_ != (psp & 0xFF000000)) { execListQueue.push_back((GE_CMD_BASE << 24) | ((psp >> 8) & 0x00FF0000)); - lastBase_ = psp & 0x0FF000000; + lastBase_ = psp & 0xFF000000; } execListQueue.push_back((GE_CMD_VADDR << 24) | (psp & 0x00FFFFFF)); } @@ -464,9 +465,9 @@ void DumpExecute::Indices(u32 ptr, u32 sz) { return; } - if (lastBase_ != (psp & 0x0FF000000)) { + if (lastBase_ != (psp & 0xFF000000)) { execListQueue.push_back((GE_CMD_BASE << 24) | ((psp >> 8) & 0x00FF0000)); - lastBase_ = psp & 0x0FF000000; + lastBase_ = psp & 0xFF000000; } execListQueue.push_back((GE_CMD_IADDR << 24) | (psp & 0x00FFFFFF)); } From daaf448d2231f643b02ffe504bcfae29bacac0b9 Mon Sep 17 00:00:00 2001 From: "Unknown W. Brackets" Date: Sun, 14 Aug 2022 16:17:04 -0700 Subject: [PATCH 2/2] GE Debugger: Fix crash on 0 count prim. --- GPU/Common/DrawEngineCommon.cpp | 2 +- GPU/Software/TransformUnit.cpp | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/GPU/Common/DrawEngineCommon.cpp b/GPU/Common/DrawEngineCommon.cpp index 0755988029..34e0f7ff90 100644 --- a/GPU/Common/DrawEngineCommon.cpp +++ b/GPU/Common/DrawEngineCommon.cpp @@ -266,7 +266,7 @@ bool DrawEngineCommon::GetCurrentSimpleVertices(int count, std::vector 0 && (gstate.vertType & GE_VTYPE_IDX_MASK) != GE_VTYPE_IDX_NONE) { const u8 *inds = Memory::GetPointer(gstate_c.indexAddr); const u16_le *inds16 = (const u16_le *)inds;