From 9979fe30e30e22c2eb94bc4ac6be3e464f458f67 Mon Sep 17 00:00:00 2001 From: refraction Date: Fri, 19 Nov 2010 19:47:06 +0000 Subject: [PATCH] Fixed monumental cockup from my big commit, it shows, product placement really does work!! FFXII now works again, at normal speed. git-svn-id: http://pcsx2.googlecode.com/svn/trunk@4037 96395faa-99c1-11dd-bbfe-3dabce05a288 --- pcsx2/Gif.cpp | 12 ++++++------ pcsx2/Vif1_Dma.cpp | 1 + pcsx2/Vif1_MFIFO.cpp | 11 ++++++----- 3 files changed, 13 insertions(+), 11 deletions(-) diff --git a/pcsx2/Gif.cpp b/pcsx2/Gif.cpp index f92e931eb..769bddc39 100644 --- a/pcsx2/Gif.cpp +++ b/pcsx2/Gif.cpp @@ -629,12 +629,6 @@ void gifMFIFOInterrupt() GIF_LOG("gifMFIFOInterrupt"); mfifocycles = 0; - if((gifstate & GIF_STATE_EMPTY)) - { - FireMFIFOEmpty(); - if(!(gifstate & GIF_STATE_STALL)) return; - } - if (dmacRegs.ctrl.MFD != MFD_GIF) { DevCon.Warning("Not in GIF MFIFO mode! Stopping GIF MFIFO"); @@ -656,6 +650,12 @@ void gifMFIFOInterrupt() if(gifRegs.stat.P1Q) gsPath1Interrupt(); } + if((gifstate & GIF_STATE_EMPTY)) + { + FireMFIFOEmpty(); + if(!(gifstate & GIF_STATE_STALL)) return; + } + if(CheckPaths(11) == false) return; if (!(gifch.chcr.STR)) diff --git a/pcsx2/Vif1_Dma.cpp b/pcsx2/Vif1_Dma.cpp index caebc4c47..306ec29c0 100644 --- a/pcsx2/Vif1_Dma.cpp +++ b/pcsx2/Vif1_Dma.cpp @@ -502,6 +502,7 @@ void dmaVIF1() { vif1.dmamode = VIF_CHAIN_MODE; vif1.done = false; + vif1.inprogress = 0; } if (vif1ch.chcr.DIR) vif1Regs.stat.FQC = min((u16)0x10, vif1ch.qwc); diff --git a/pcsx2/Vif1_MFIFO.cpp b/pcsx2/Vif1_MFIFO.cpp index 19f6fe0de..e7a26ccba 100644 --- a/pcsx2/Vif1_MFIFO.cpp +++ b/pcsx2/Vif1_MFIFO.cpp @@ -248,11 +248,7 @@ void vifMFIFOInterrupt() g_vifCycles = 0; VIF_LOG("vif mfifo interrupt"); - if(vif1.inprogress & 0x10) - { - FireMFIFOEmpty(); - if(!(vif1.done && vif1ch.qwc == 0))return; - } + if (dmacRegs.ctrl.MFD != MFD_VIF1) { DevCon.Warning("Not in VIF MFIFO mode! Stopping VIF MFIFO"); @@ -289,6 +285,11 @@ void vifMFIFOInterrupt() vif1Regs.stat.VPS = VPS_IDLE; } + if(vif1.inprogress & 0x10) + { + FireMFIFOEmpty(); + if(!(vif1.done && vif1ch.qwc == 0) || !(vif1.irq && vif1.tag.size == 0))return; + } if (vif1.irq && vif1.tag.size == 0) { SPR_LOG("VIF MFIFO Code Interrupt detected");