From a5eab9da8661b21e044a14efc90cf8b02bd37ffe Mon Sep 17 00:00:00 2001 From: refraction Date: Mon, 23 Feb 2009 19:59:22 +0000 Subject: [PATCH] Implemented a fix for Art of Fighting, MFIFO was clearing our counted size when it shouldn't have been. git-svn-id: http://pcsx2.googlecode.com/svn/trunk@580 96395faa-99c1-11dd-bbfe-3dabce05a288 --- pcsx2/Vif.cpp | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/pcsx2/Vif.cpp b/pcsx2/Vif.cpp index 5fd589aa03..ec1871f27e 100644 --- a/pcsx2/Vif.cpp +++ b/pcsx2/Vif.cpp @@ -486,12 +486,16 @@ static __forceinline int mfifoVIF1chain() { #define spr0 ((DMACh*)&PS2MEM_HW[0xD000]) +u32 mfifodmairq = 0; + void mfifoVIF1transfer(int qwc) { u32 *ptag; int id; int ret, temp; g_vifCycles = 0; + + mfifodmairq = 0; //Clear any previous TIE interrupt if(qwc > 0){ vifqwc += qwc; @@ -563,6 +567,7 @@ void mfifoVIF1transfer(int qwc) { if ((vif1ch->chcr & 0x80) && (ptag[0] >> 31)) { VIF_LOG("dmaIrq Set\n"); vif1.done = 2; + mfifodmairq = 1; //Let the handler know we have prematurely ended MFIFO } } ret = mfifoVIF1chain(); @@ -607,7 +612,11 @@ void vifMFIFOInterrupt() return; } - vifqwc = 0; + //On a TIE break we do not clear the MFIFO (Art of Fighting) + //If we dont clear it on MFIFO end, Tekken Tag breaks, understandably (Refraction) + if(mfifodmairq == 0) + vifqwc = 0; + vif1.done = 1; vif1ch->chcr &= ~0x100; hwDmacIrq(DMAC_VIF1);