From 15cb005a6006499a7e509f54a807d79e619c47e6 Mon Sep 17 00:00:00 2001 From: "Unknown W. Brackets" Date: Wed, 3 Apr 2013 08:15:49 -0700 Subject: [PATCH] Always trigger FINISH and SIGNAL from END. --- Core/HLE/sceGe.cpp | 2 +- GPU/GPUCommon.cpp | 11 ++++------- 2 files changed, 5 insertions(+), 8 deletions(-) diff --git a/Core/HLE/sceGe.cpp b/Core/HLE/sceGe.cpp index c4f46fd3c..8af4347af 100644 --- a/Core/HLE/sceGe.cpp +++ b/Core/HLE/sceGe.cpp @@ -58,7 +58,7 @@ public: gpu->InterruptStart(); - u32 cmd = Memory::ReadUnchecked_U32(intrdata.pc) >> 24; + u32 cmd = Memory::ReadUnchecked_U32(intrdata.pc - 4) >> 24; int subintr = intrdata.subIntrBase | (cmd == GE_CMD_FINISH ? PSP_GE_SUBINTR_FINISH : PSP_GE_SUBINTR_SIGNAL); SubIntrHandler* handler = get(subintr); diff --git a/GPU/GPUCommon.cpp b/GPU/GPUCommon.cpp index 88e98901f..b137e107f 100644 --- a/GPU/GPUCommon.cpp +++ b/GPU/GPUCommon.cpp @@ -267,14 +267,8 @@ void GPUCommon::ExecuteOp(u32 op, u32 diff) { break; case GE_CMD_SIGNAL: - // Processed in GE_END. - break; - case GE_CMD_FINISH: - currentList->subIntrToken = data & 0xFFFF; - UpdateCycles(currentList->pc); - if (interruptsEnabled_) - __GeTriggerInterrupt(currentList->id, currentList->pc, currentList->subIntrBase, currentList->subIntrToken); + // Processed in GE_END. break; case GE_CMD_END: @@ -322,6 +316,9 @@ void GPUCommon::ExecuteOp(u32 op, u32 diff) { case GE_CMD_FINISH: currentList->status = PSP_GE_LIST_DONE; finished = true; + currentList->subIntrToken = prev & 0xFFFF; + if (interruptsEnabled_) + __GeTriggerInterrupt(currentList->id, currentList->pc, currentList->subIntrBase, currentList->subIntrToken); break; default: DEBUG_LOG(G3D,"Ah, not finished: %06x", prev & 0xFFFFFF);