mirror of https://github.com/PCSX2/pcsx2.git
IPU: Fix for Xenosaga 1 videos. Apparently the DMA chain modes can be manipulated on suspend!
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@2829 96395faa-99c1-11dd-bbfe-3dabce05a288
This commit is contained in:
parent
04eb79093d
commit
223617a99e
|
@ -1255,22 +1255,27 @@ static __forceinline void ipuDmacSrcChain()
|
||||||
{
|
{
|
||||||
case 0x0: // refe
|
case 0x0: // refe
|
||||||
//if(IPU1Status.InProgress == false) ipu1dma->tadr += 16;
|
//if(IPU1Status.InProgress == false) ipu1dma->tadr += 16;
|
||||||
|
if(ipu1dma->qwc == 0) IPU1Status.DMAFinished = true;
|
||||||
break;
|
break;
|
||||||
case 0x1: // cnt
|
case 0x1: // cnt
|
||||||
// Set the taddr to the next tag
|
// Set the taddr to the next tag
|
||||||
ipu1dma->tadr = ipu1dma->madr;
|
ipu1dma->tadr = ipu1dma->madr;
|
||||||
|
if(ipu1dma->qwc == 0) IPU1Status.DMAFinished = false;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 0x2: // next
|
case 0x2: // next
|
||||||
ipu1dma->tadr = IPU1Status.NextMem;
|
ipu1dma->tadr = IPU1Status.NextMem;
|
||||||
|
if(ipu1dma->qwc == 0) IPU1Status.DMAFinished = false;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
/*case 0x3: // ref
|
case 0x3: // ref
|
||||||
if(IPU1Status.InProgress == false)ipu1dma->tadr += 16;
|
//if(IPU1Status.InProgress == false)ipu1dma->tadr += 16;
|
||||||
break;*/
|
if(ipu1dma->qwc == 0) IPU1Status.DMAFinished = false;
|
||||||
|
break;
|
||||||
|
|
||||||
case 0x7: // end
|
case 0x7: // end
|
||||||
ipu1dma->tadr = ipu1dma->madr;
|
ipu1dma->tadr = ipu1dma->madr;
|
||||||
|
if(ipu1dma->qwc == 0) IPU1Status.DMAFinished = true;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1401,7 +1406,7 @@ int IPU1dma()
|
||||||
ipu1dma->tadr += 16;
|
ipu1dma->tadr += 16;
|
||||||
ipu1dma->madr = ptag[1];
|
ipu1dma->madr = ptag[1];
|
||||||
DMA_LOG("Tag should end on %x", ipu1dma->tadr);
|
DMA_LOG("Tag should end on %x", ipu1dma->tadr);
|
||||||
IPU1Status.DMAFinished = true;
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 0x1: // cnt
|
case 0x1: // cnt
|
||||||
|
@ -1409,21 +1414,21 @@ int IPU1dma()
|
||||||
DMA_LOG("Tag should end on %x", ipu1dma->madr + ipu1dma->qwc * 16);
|
DMA_LOG("Tag should end on %x", ipu1dma->madr + ipu1dma->qwc * 16);
|
||||||
//ipu1dma->tadr = ipu1dma->madr + (ipu1dma->qwc * 16);
|
//ipu1dma->tadr = ipu1dma->madr + (ipu1dma->qwc * 16);
|
||||||
// Set the taddr to the next tag
|
// Set the taddr to the next tag
|
||||||
IPU1Status.DMAFinished = false;
|
//IPU1Status.DMAFinished = false;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 0x2: // next
|
case 0x2: // next
|
||||||
ipu1dma->madr = ipu1dma->tadr + 16;
|
ipu1dma->madr = ipu1dma->tadr + 16;
|
||||||
IPU1Status.NextMem = ptag[1];
|
IPU1Status.NextMem = ptag[1];
|
||||||
DMA_LOG("Tag should end on %x", IPU1Status.NextMem);
|
DMA_LOG("Tag should end on %x", IPU1Status.NextMem);
|
||||||
IPU1Status.DMAFinished = false;
|
//IPU1Status.DMAFinished = false;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 0x3: // ref
|
case 0x3: // ref
|
||||||
ipu1dma->madr = ptag[1];
|
ipu1dma->madr = ptag[1];
|
||||||
ipu1dma->tadr += 16;
|
ipu1dma->tadr += 16;
|
||||||
DMA_LOG("Tag should end on %x", ipu1dma->tadr);
|
DMA_LOG("Tag should end on %x", ipu1dma->tadr);
|
||||||
IPU1Status.DMAFinished = false;
|
//IPU1Status.DMAFinished = false;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 0x7: // end
|
case 0x7: // end
|
||||||
|
@ -1431,7 +1436,7 @@ int IPU1dma()
|
||||||
ipu1dma->madr = ipu1dma->tadr + 16;
|
ipu1dma->madr = ipu1dma->tadr + 16;
|
||||||
ipu1dma->tadr += 16;
|
ipu1dma->tadr += 16;
|
||||||
DMA_LOG("Tag should end on %x", ipu1dma->madr + ipu1dma->qwc * 16);
|
DMA_LOG("Tag should end on %x", ipu1dma->madr + ipu1dma->qwc * 16);
|
||||||
IPU1Status.DMAFinished = true;
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
|
@ -1549,9 +1554,8 @@ __forceinline void dmaIPU1() // toIPU
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{ //Attempting to continue a previous chain
|
{ //Attempting to continue a previous chain
|
||||||
//Console.Warning("IPU1 continuing previous chain");
|
//We MUST check the CHCR for the tag it last knew, it can be manipulated!
|
||||||
if(IPU1Status.ChainMode == 0 || IPU1Status.ChainMode == 0x7)IPU1Status.DMAFinished = true;
|
IPU1Status.ChainMode = (ipu1dma->chcr.TAG >> 12) & 0x7;
|
||||||
else IPU1Status.DMAFinished = false;
|
|
||||||
IPU1Status.InProgress = true;
|
IPU1Status.InProgress = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue