mirror of https://github.com/PCSX2/pcsx2.git
Slightly pedantic change to OPH clearing and added a condition to an FQC assignment statement (there are far too many of these) which I think would interfere with reversed VIF1 operation.
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@2974 96395faa-99c1-11dd-bbfe-3dabce05a288
This commit is contained in:
parent
96b1935c5f
commit
a8b7c03845
|
@ -65,23 +65,19 @@ void __fastcall ReadFIFO_page_5(u32 mem, u64 *out)
|
|||
if(vif1Regs->stat.FQC == 0) Console.Warning("FQC = 0 on VIF FIFO READ!");
|
||||
if (vif1Regs->stat.FDR)
|
||||
{
|
||||
if(vif1Regs->stat.FQC > vif1.GSLastDownloadSize)
|
||||
{
|
||||
DevCon.Warning("Warning! GS Download size < FIFO count!");
|
||||
}
|
||||
if (vif1Regs->stat.FQC > 0)
|
||||
{
|
||||
GetMTGS().WaitGS();
|
||||
GSreadFIFO(&psHu64(VIF1_FIFO));
|
||||
}
|
||||
if(vif1Regs->stat.FQC > 0)
|
||||
{
|
||||
--vif1.GSLastDownloadSize;
|
||||
vif1Regs->stat.FQC = min((u32)16, vif1.GSLastDownloadSize);
|
||||
}
|
||||
|
||||
if(vif1Regs->stat.FQC == 0) //We're out of data now so clear this..
|
||||
if(vif1Regs->stat.FQC > vif1.GSLastDownloadSize)
|
||||
{
|
||||
DevCon.Warning("Warning! GS Download size < FIFO count!");
|
||||
}
|
||||
if (vif1Regs->stat.FQC > 0)
|
||||
{
|
||||
GetMTGS().WaitGS();
|
||||
GSreadFIFO(&psHu64(VIF1_FIFO));
|
||||
vif1.GSLastDownloadSize--;
|
||||
if (vif1.GSLastDownloadSize <= 16)
|
||||
gifRegs->stat.OPH = false;
|
||||
vif1Regs->stat.FQC = min((u32)16, vif1.GSLastDownloadSize);
|
||||
}
|
||||
}
|
||||
|
||||
out[0] = psHu64(VIF1_FIFO);
|
||||
|
|
|
@ -197,7 +197,7 @@ void GIFdma()
|
|||
}
|
||||
|
||||
clearFIFOstuff(true);
|
||||
gifRegs->stat.FQC = min((u16)0x10, gif->qwc);// FQC=31, hack ;) (for values of 31 that equal 16) [ used to be 0xE00; // OPH=1 | APATH=3]
|
||||
gifRegs->stat.FQC = min((u16)0x10, gif->qwc);// FQC=31, hack ;) (for values of 31 that equal 16) [ used to be 0xE00; // APATH=3]
|
||||
|
||||
//Path2 gets priority in intermittent mode
|
||||
if (GSTransferStatus.PTH1 != STOPPED_MODE || GSTransferStatus.PTH2 != STOPPED_MODE)
|
||||
|
@ -218,7 +218,7 @@ void GIFdma()
|
|||
if ((gif->chcr.MOD == CHAIN_MODE) && gif->chcr.STR)
|
||||
{
|
||||
ptag = ReadTag();
|
||||
gifRegs->stat.FQC = min((u16)0x10, gif->qwc);// FQC=31, hack ;) (for values of 31 that equal 16) [ used to be 0xE00; // OPH=1 | APATH=3]
|
||||
gifRegs->stat.FQC = min((u16)0x10, gif->qwc);// FQC=31, hack ;) (for values of 31 that equal 16) [ used to be 0xE00; // APATH=3]
|
||||
if (ptag == NULL) return;
|
||||
GIF_LOG("PTH3 MASK gifdmaChain %8.8x_%8.8x size=%d, id=%d, addr=%lx tadr=%lx", ptag[1]._u32, ptag[0]._u32, gif->qwc, ptag->ID, gif->madr, gif->tadr);
|
||||
|
||||
|
@ -234,7 +234,7 @@ void GIFdma()
|
|||
if (gif->qwc == 0) CPU_INT(DMAC_GIF, 16);
|
||||
return;
|
||||
}
|
||||
gifRegs->stat.FQC = min((u16)0x10, gif->qwc);// FQC=31, hack ;) (for values of 31 that equal 16) [ used to be 0xE00; // OPH=1 | APATH=3]
|
||||
gifRegs->stat.FQC = min((u16)0x10, gif->qwc);// FQC=31, hack ;) (for values of 31 that equal 16) [ used to be 0xE00; // APATH=3]
|
||||
//Check with Path3 masking games
|
||||
if (gif->qwc > 0) {
|
||||
GIF_LOG("PTH3 MASK Transferring");
|
||||
|
@ -253,7 +253,7 @@ void GIFdma()
|
|||
{
|
||||
Console.WriteLn("DMA Stall Control on GIF normal");
|
||||
}
|
||||
gifRegs->stat.FQC = min((u16)0x10, gif->qwc);// FQC=31, hack ;) (for values of 31 that equal 16) [ used to be 0xE00; // OPH=1 | APATH=3]
|
||||
gifRegs->stat.FQC = min((u16)0x10, gif->qwc);// FQC=31, hack ;) (for values of 31 that equal 16) [ used to be 0xE00; // APATH=3]
|
||||
//Check with Path3 masking games
|
||||
if (gif->qwc > 0) {
|
||||
GIFchain(); //Transfers the data set by the switch
|
||||
|
@ -271,7 +271,7 @@ void GIFdma()
|
|||
ptag = ReadTag();
|
||||
if (ptag == NULL) return;
|
||||
GIF_LOG("gifdmaChain %8.8x_%8.8x size=%d, id=%d, addr=%lx tadr=%lx", ptag[1]._u32, ptag[0]._u32, gif->qwc, ptag->ID, gif->madr, gif->tadr);
|
||||
gifRegs->stat.FQC = min((u16)0x10, gif->qwc);// FQC=31, hack ;) (for values of 31 that equal 16) [ used to be 0xE00; // OPH=1 | APATH=3]
|
||||
gifRegs->stat.FQC = min((u16)0x10, gif->qwc);// FQC=31, hack ;) (for values of 31 that equal 16) [ used to be 0xE00; // APATH=3]
|
||||
if (dmacRegs->ctrl.STD == STD_GIF)
|
||||
{
|
||||
// there are still bugs, need to also check if gif->madr +16*qwc >= stadr, if not, stall
|
||||
|
@ -312,7 +312,7 @@ void GIFdma()
|
|||
CPU_INT(DMAC_GIF, gscycles * BIAS);
|
||||
gscycles = 0;
|
||||
}
|
||||
gifRegs->stat.FQC = min((u16)0x10, gif->qwc);// FQC=31, hack ;) (for values of 31 that equal 16) [ used to be 0xE00; // OPH=1 | APATH=3]
|
||||
gifRegs->stat.FQC = min((u16)0x10, gif->qwc);// FQC=31, hack ;) (for values of 31 that equal 16) [ used to be 0xE00; // APATH=3]
|
||||
}
|
||||
|
||||
void dmaGIF()
|
||||
|
@ -589,7 +589,7 @@ void gifMFIFOInterrupt()
|
|||
gspath3done = false;
|
||||
gscycles = 0;
|
||||
|
||||
gifRegs->stat.clear_flags(GIF_STAT_APATH3 | GIF_STAT_P3Q | GIF_STAT_FQC); // OPH, APATH, P3Q, FQC = 0
|
||||
gifRegs->stat.clear_flags(GIF_STAT_APATH3 | GIF_STAT_P3Q | GIF_STAT_FQC); // APATH, P3Q, FQC = 0
|
||||
|
||||
vif1Regs->stat.VGW = false;
|
||||
gif->chcr.STR = false;
|
||||
|
|
|
@ -107,14 +107,18 @@ void vif1TransferToMemory()
|
|||
|
||||
g_vifCycles += vif1ch->qwc * 2;
|
||||
vif1ch->madr += vif1ch->qwc * 16; // mgs3 scene changes
|
||||
if(vif1.GSLastDownloadSize > vif1ch->qwc)
|
||||
if(vif1.GSLastDownloadSize >= vif1ch->qwc)
|
||||
{
|
||||
vif1.GSLastDownloadSize -= vif1ch->qwc;
|
||||
vif1Regs->stat.FQC = min((u32)16, vif1.GSLastDownloadSize);
|
||||
if (vif1.GSLastDownloadSize <= 16)
|
||||
gifRegs->stat.OPH = false;
|
||||
}
|
||||
else
|
||||
{
|
||||
vif1Regs->stat.FQC = 0;
|
||||
vif1.GSLastDownloadSize = 0;
|
||||
gifRegs->stat.OPH = false;
|
||||
}
|
||||
|
||||
vif1ch->qwc = 0;
|
||||
|
@ -377,7 +381,7 @@ void dmaVIF1()
|
|||
vif1.dmamode = VIF_CHAIN_MODE;
|
||||
}
|
||||
|
||||
vif1Regs->stat.FQC = min((u16)0x10, vif1ch->qwc);
|
||||
if (vif1ch->chcr.DIR) vif1Regs->stat.FQC = min((u16)0x10, vif1ch->qwc);
|
||||
|
||||
// Chain Mode
|
||||
vif1Interrupt();
|
||||
|
|
Loading…
Reference in New Issue