mirror of https://github.com/PCSX2/pcsx2.git
Gif: Fix MFIFO logic so it doesn't get caught in a loop (Tekken Tag)
This commit is contained in:
parent
955a69b16e
commit
59be0818e2
|
@ -708,56 +708,57 @@ void gifMFIFOInterrupt()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (dmacRegs.ctrl.MFD != MFD_GIF) {
|
if (!gifch.chcr.STR) {
|
||||||
DevCon.Warning("Not in GIF MFIFO mode! Stopping GIF MFIFO");
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (gifUnit.gsSIGNAL.queued) {
|
|
||||||
//DevCon.WriteLn("Path 3 Paused");
|
|
||||||
GifDMAInt(128);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
if((gifstate & GIF_STATE_EMPTY)) {
|
|
||||||
FireMFIFOEmpty();
|
|
||||||
if (CHECK_GIFFIFOHACK)
|
|
||||||
GifDMAInt(128);
|
|
||||||
if(!(gifstate & GIF_STATE_STALL)) return;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!CheckPaths()) return;
|
|
||||||
|
|
||||||
if(!gifch.chcr.STR) {
|
|
||||||
Console.WriteLn("WTF GIFMFIFO");
|
Console.WriteLn("WTF GIFMFIFO");
|
||||||
cpuRegs.interrupt &= ~(1 << 11);
|
cpuRegs.interrupt &= ~(1 << 11);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!(gifstate & GIF_STATE_STALL)) {
|
if (gifch.qwc > 0 || !gspath3done) {
|
||||||
|
if (dmacRegs.ctrl.MFD != MFD_GIF) {
|
||||||
if (QWCinGIFMFIFO(gifch.tadr) == 0) {
|
DevCon.Warning("Not in GIF MFIFO mode! Stopping GIF MFIFO");
|
||||||
gifstate |= GIF_STATE_EMPTY;
|
|
||||||
GifDMAInt(4);
|
|
||||||
if (CHECK_GIFFIFOHACK)
|
|
||||||
GifDMAInt(128);
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
mfifoGIFtransfer(0);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
if ((gifstate == GIF_STATE_READY) || (gifch.qwc > 0)) {
|
if (gifUnit.gsSIGNAL.queued) {
|
||||||
DevCon.Error("gifMFIFO Panic > Shouldn't go here!");
|
//DevCon.WriteLn("Path 3 Paused");
|
||||||
return;
|
GifDMAInt(128);
|
||||||
}
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
if (gifRegs.stat.FQC > 0) {
|
if ((gifstate & GIF_STATE_EMPTY)) {
|
||||||
//DevCon.Warning("GIF Ending with stuff still in it?");
|
FireMFIFOEmpty();
|
||||||
GifDMAInt(16);
|
if (CHECK_GIFFIFOHACK)
|
||||||
return;
|
GifDMAInt(128);
|
||||||
}
|
if (!(gifstate & GIF_STATE_STALL)) return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!CheckPaths()) return;
|
||||||
|
|
||||||
|
if (!(gifstate & GIF_STATE_STALL)) {
|
||||||
|
|
||||||
|
if (QWCinGIFMFIFO(gifch.tadr) == 0) {
|
||||||
|
gifstate |= GIF_STATE_EMPTY;
|
||||||
|
GifDMAInt(4);
|
||||||
|
if (CHECK_GIFFIFOHACK)
|
||||||
|
GifDMAInt(128);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
mfifoGIFtransfer(0);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if ((gifstate == GIF_STATE_READY) || (gifch.qwc > 0)) {
|
||||||
|
DevCon.Error("gifMFIFO Panic > Shouldn't go here!");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (gifRegs.stat.FQC > 0) {
|
||||||
|
//DevCon.Warning("GIF Ending with stuff still in it?");
|
||||||
|
GifDMAInt(16);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
//if(gifqwc > 0) Console.WriteLn("GIF MFIFO ending with stuff in it %x", gifqwc);
|
//if(gifqwc > 0) Console.WriteLn("GIF MFIFO ending with stuff in it %x", gifqwc);
|
||||||
if (!gifmfifoirq) gifqwc = 0;
|
if (!gifmfifoirq) gifqwc = 0;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue