Slight modification to the MFIFO's to prevent potential situations which could cause bad data to be copied.

git-svn-id: http://pcsx2.googlecode.com/svn/trunk@490 96395faa-99c1-11dd-bbfe-3dabce05a288
This commit is contained in:
refraction 2009-02-13 23:57:39 +00:00
parent 56ed72b8a1
commit 2cc719d5b0
2 changed files with 4 additions and 3 deletions

View File

@ -421,6 +421,7 @@ void mfifoGIFtransfer(int qwc) {
if(qwc > 0 ) {
gifqwc += qwc;
if(!(gif->chcr & 0x100))return;
if(gifdone == 1) return;
}
SPR_LOG("mfifoGIFtransfer %x madr %x, tadr %x\n", gif->chcr, gif->madr, gif->tadr);

View File

@ -486,9 +486,10 @@ void mfifoVIF1transfer(int qwc) {
if(qwc > 0){
vifqwc += qwc;
vif1.done &= ~1;
SPR_LOG("Added %x qw to mfifo, total now %x\n", qwc, vifqwc);
if((vif1ch->chcr & 0x100) == 0 || vif1.vifstalled == 1) return;
if((vif1ch->chcr & 0x100) == 0 || vif1.vifstalled == 1 || vif1.done == 1) return;
}
if(vif1ch->qwc == 0){
@ -590,7 +591,6 @@ void vifMFIFOInterrupt()
if(vif1.done != 1) {
if(vifqwc <= 0){
//SysPrintf("Empty\n");
vif1.done |= 1;
hwDmacIrq(14);
return;
}