Couple of very minor changes for GIF/MTGS GIFTag reading

git-svn-id: http://pcsx2.googlecode.com/svn/trunk@1324 96395faa-99c1-11dd-bbfe-3dabce05a288
This commit is contained in:
refraction 2009-06-04 20:46:05 +00:00
parent 480519efad
commit d1b5ee9f5f
2 changed files with 47 additions and 37 deletions

View File

@ -93,7 +93,7 @@ static u32 WRITERING_DMA(u32 *pMem, u32 qwc)
if( mtgsThread != NULL )
{
int sizetoread = (qwc)<<4;
int sizetoread = qwc;
sizetoread = mtgsThread->PrepDataPacket( GIF_PATH_3, pMem, qwc );
u8* pgsmem = mtgsThread->GetDataPacketPtr();
@ -122,7 +122,7 @@ static u32 WRITERING_DMA(u32 *pMem, u32 qwc)
int _GIFchain() {
u32 qwc = ((psHu32(GIF_MODE) & 0x4) && (vif1Regs->mskpath3)) ? min(8, (int)gif->qwc) : min( gifsplit, (int)gif->qwc );
u32 qwc = ((psHu32(GIF_MODE) & 0x4) || vif1Regs->mskpath3) ? min(8, (int)gif->qwc) : min( gifsplit, (int)gif->qwc );
u32 *pMem;
pMem = (u32*)dmaGetAddr(gif->madr);
@ -301,7 +301,6 @@ void GIFdma()
}
prevcycles = 0;
if (!(vif1Regs->mskpath3 || (psHu32(GIF_MODE) & 0x1))) {
if (gspath3done == 0 && gif->qwc == 0)
{
@ -321,7 +320,7 @@ void GIFdma()
} else GIFdmaEnd();
gscycles = 0;
}
}
void dmaGIF() {
@ -372,7 +371,7 @@ void dmaGIF() {
// called from only one location, so forceinline it:
static __forceinline int mfifoGIFrbTransfer() {
u32 qwc = (psHu32(GIF_MODE) & 0x4 && vif1Regs->mskpath3) ? min(8, (int)gif->qwc) : gif->qwc;
u32 qwc = (psHu32(GIF_MODE) & 0x4 || vif1Regs->mskpath3) ? min(8, (int)gif->qwc) : gif->qwc;
int mfifoqwc = min(gifqwc, qwc);
u32 *src;
@ -431,7 +430,7 @@ static __forceinline int mfifoGIFchain() {
}
else
{
int mfifoqwc = (psHu32(GIF_MODE) & 0x4 && vif1Regs->mskpath3) ? min(8, (int)gif->qwc) : gif->qwc;
int mfifoqwc = (psHu32(GIF_MODE) & 0x4 || vif1Regs->mskpath3) ? min(8, (int)gif->qwc) : gif->qwc;
u32 *pMem = (u32*)dmaGetAddr(gif->madr);
if (pMem == NULL) return -1;

View File

@ -390,9 +390,11 @@ __forceinline int mtgsThreadObject::_gifTransferDummy( GIF_PATH pathidx, const u
}
}
if(pathidx == 0)
if(path.tag.nloop == 0)
{
if(path.tag.eop && path.tag.nloop == 0)
if(path.tag.eop)
{
if(pathidx != 1)
{
break;
}
@ -405,14 +407,23 @@ __forceinline int mtgsThreadObject::_gifTransferDummy( GIF_PATH pathidx, const u
path1loop = true;
}*/
}
if(pathidx == 2)
/*else if(size == 0 && pathidx == 0)
{
if(path.tag.eop && path.tag.nloop == 0)
if(path1loop == true) return size - 0x400;
//DevCon::Notice("Looping Nloop %x, Eop %x, FLG %x", params path.tag.nloop, path.tag.eop, path.tag.flg);
size = 0x400;
pMem -= 0x4000;
path1loop = true;
}*/
}
/*else if(size == 0 && pathidx == 0)
{
//if(pathidx == 2) GIF_LOG("BREAK PATH3 NLoop %d EOP %x Mode %d Path3msk %x Path3progress %x ", path.tag.nloop, path.tag.eop, path.tag.flg, vif1Regs->mskpath3, Path3progress);
break;
}
}
if(path1loop == true) return size - 0x400;
//DevCon::Notice("Looping Nloop %x, Eop %x, FLG %x", params path.tag.nloop, path.tag.eop, path.tag.flg);
size = 0x400;
pMem -= 0x4000;
path1loop = true;
}*/
}
if(pathidx == 0)