From b21b81df9f9f033c2841a1beedf7ee126aa1e049 Mon Sep 17 00:00:00 2001 From: refraction Date: Mon, 20 Apr 2009 00:31:03 +0000 Subject: [PATCH] Resolved Issue 168 with FFXII crashing with DMA error due to cancelling a scratchpad transfer before it happened, how silly of me :p git-svn-id: http://pcsx2.googlecode.com/svn/trunk@1028 96395faa-99c1-11dd-bbfe-3dabce05a288 --- pcsx2/Gif.cpp | 2 +- pcsx2/Vif.cpp | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/pcsx2/Gif.cpp b/pcsx2/Gif.cpp index fe57bcaed1..e1cf32efae 100644 --- a/pcsx2/Gif.cpp +++ b/pcsx2/Gif.cpp @@ -545,7 +545,7 @@ void gifMFIFOInterrupt() cpuRegs.interrupt &= ~(1 << 11); return ; } - if(spr0->chcr & 0x100) + if((spr0->chcr & 0x100) && spr0->qwc == 0) { spr0->chcr &= ~0x100; hwDmacIrq(8); diff --git a/pcsx2/Vif.cpp b/pcsx2/Vif.cpp index ccc5068b7a..0da6e70175 100644 --- a/pcsx2/Vif.cpp +++ b/pcsx2/Vif.cpp @@ -532,11 +532,13 @@ void mfifoVIF1transfer(int qwc) void vifMFIFOInterrupt() { g_vifCycles = 0; - if(spr0->chcr & 0x100) + + if((spr0->chcr & 0x100) && spr0->qwc == 0) { spr0->chcr &= ~0x100; hwDmacIrq(8); } + if (vif1.inprogress == 1) mfifo_VIF1chain(); if (vif1.irq && vif1.tag.size == 0) @@ -569,6 +571,7 @@ void vifMFIFOInterrupt() else CPU_INT(10, vif1ch->qwc * BIAS); + return; } else if (vifqwc <= 0)