Beispiel #1
0
void __fastcall ReadFIFO_VIF1(mem128_t* out)
{
	if (vif1Regs.stat.test(VIF1_STAT_INT | VIF1_STAT_VSS | VIF1_STAT_VIS | VIF1_STAT_VFS) )
		DevCon.Warning( "Reading from vif1 fifo when stalled" );

	ZeroQWC(out); // Clear first in case no data gets written...
	pxAssertRel(vif1Regs.stat.FQC != 0, "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();
			if (GSinitReadFIFO) {
				GetMTGS().SendPointerPacket(GS_RINGTYPE_INIT_READ_FIFO1, 0, out);
				GetMTGS().WaitGS(false); // wait without reg sync
			}
			GSreadFIFO((u64*)out);
			vif1.GSLastDownloadSize--;
			GUNIT_LOG("ReadFIFO_VIF1");
			if (vif1.GSLastDownloadSize <= 16)
				gifRegs.stat.OPH = false;
			vif1Regs.stat.FQC = std::min((u32)16, vif1.GSLastDownloadSize);
		}
	}

	VIF_LOG("ReadFIFO/VIF1 -> %ls", WX_STR(out->ToString()));
}
Beispiel #2
0
void __fastcall ReadFIFO_VIF1(mem128_t* out)
{
    if (vif1Regs.stat.test(VIF1_STAT_INT | VIF1_STAT_VSS | VIF1_STAT_VIS | VIF1_STAT_VFS) )
        DevCon.Warning( "Reading from vif1 fifo when stalled" );

    ZeroQWC(out); // Clear first in case no data gets written...
    pxAssertRel(vif1Regs.stat.FQC != 0, "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((u64*)out);
            vif1.GSLastDownloadSize--;
            GUNIT_LOG("ReadFIFO_VIF1");
            if (vif1.GSLastDownloadSize <= 16)
                gifRegs.stat.OPH = false;
            vif1Regs.stat.FQC = min((u32)16, vif1.GSLastDownloadSize);
        }
    }

    VIF_LOG("ReadFIFO/VIF1 -> %ls", out->ToString().c_str());
}
Beispiel #3
0
static void __fastcall nullRead128(u32 mem, mem128_t *out) {
	MEM_LOG("Read uninstalled memory at address %08x", mem);
	ZeroQWC(out);
}