From 3d448e49c6b2cb51121e85046ee4b96c18b12e01 Mon Sep 17 00:00:00 2001 From: skidau Date: Fri, 14 Nov 2014 17:07:11 +1100 Subject: Update CPStatus before processing the FIFO events and force an exception check on interrupts. Added more information into the FIFO unknown opcode error message. --- Source/Core/VideoCommon/CommandProcessor.cpp | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'Source/Core/VideoCommon/CommandProcessor.cpp') diff --git a/Source/Core/VideoCommon/CommandProcessor.cpp b/Source/Core/VideoCommon/CommandProcessor.cpp index 155e4b18ec..899438b9e4 100644 --- a/Source/Core/VideoCommon/CommandProcessor.cpp +++ b/Source/Core/VideoCommon/CommandProcessor.cpp @@ -304,6 +304,9 @@ void RegisterMMIO(MMIO::Mapping* mmio, u32 base) void GatherPipeBursted() { + if (IsOnThread()) + SetCPStatusFromCPU(); + ProcessFifoEvents(); // if we aren't linked, we don't care about gather pipe data if (!m_CPCtrlReg.GPLinkEnable) @@ -326,9 +329,6 @@ void GatherPipeBursted() return; } - if (IsOnThread()) - SetCPStatusFromCPU(); - // update the fifo pointer if (fifo.CPWritePointer >= fifo.CPEnd) fifo.CPWritePointer = fifo.CPBase; @@ -369,6 +369,7 @@ void UpdateInterrupts(u64 userdata) INFO_LOG(COMMANDPROCESSOR,"Interrupt cleared"); ProcessorInterface::SetInterrupt(INT_CAUSE_CP, false); } + CoreTiming::ForceExceptionCheck(0); interruptWaiting = false; } @@ -404,6 +405,7 @@ void SetCPStatusFromGPU() INFO_LOG(COMMANDPROCESSOR, "Cleared breakpoint at %i", fifo.CPReadPointer); fifo.bFF_Breakpoint = false; } + // overflow & underflow check fifo.bFF_HiWatermark = (fifo.CPReadWriteDistance > fifo.CPHiWatermark); fifo.bFF_LoWatermark = (fifo.CPReadWriteDistance < fifo.CPLoWatermark); @@ -447,7 +449,7 @@ void SetCPStatusFromCPU() if (interrupt != interruptSet && !interruptWaiting) { - u64 userdata = interrupt?1:0; + u64 userdata = interrupt ? 1 : 0; if (IsOnThread()) { if (!interrupt || bpInt || undfInt || ovfInt) -- cgit v1.2.3