mirror of
https://github.com/ARMSX2/ARMSX2.git
synced 2026-08-24 16:50:16 -07:00
GIF: Implement GIF FIFO on GIF MFIFO mode.
-Removed some obsolete code -Tiny optimisation for the gifUnit -Fixed a tiny bug on GIF MFIFO
This commit is contained in:
committed by
Gregory Hainaut
parent
71601b88ff
commit
2734f53a79
@@ -57,25 +57,11 @@ void gsReset()
|
||||
static __fi void gsCSRwrite( const tGS_CSR& csr )
|
||||
{
|
||||
if (csr.RESET) {
|
||||
#if USE_OLD_GIF == 1 // ...
|
||||
// perform a soft reset -- which is a clearing of all GIFpaths -- and fall back to doing
|
||||
// a full reset if the plugin doesn't support soft resets.
|
||||
|
||||
if (GSgifSoftReset != NULL) {
|
||||
GIFPath_Clear( GIF_PATH_1 );
|
||||
GIFPath_Clear( GIF_PATH_2 );
|
||||
GIFPath_Clear( GIF_PATH_3 );
|
||||
}
|
||||
else GetMTGS().SendSimplePacket( GS_RINGTYPE_RESET, 0, 0, 0 );
|
||||
|
||||
SIGNAL_IMR_Pending = false;
|
||||
#else
|
||||
GUNIT_WARN("GUNIT_WARN: csr.RESET");
|
||||
//Console.Warning( "csr.RESET" );
|
||||
//gifUnit.Reset(true); // Don't think gif should be reset...
|
||||
gifUnit.gsSIGNAL.queued = false;
|
||||
GetMTGS().SendSimplePacket(GS_RINGTYPE_RESET, 0, 0, 0);
|
||||
#endif
|
||||
|
||||
CSRreg.Reset();
|
||||
GSIMR = 0x7F00; //This is bits 14-8 thats all that should be 1
|
||||
|
||||
+189
-119
File diff suppressed because it is too large
Load Diff
@@ -15,7 +15,6 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#define USE_OLD_GIF 0
|
||||
#define COPY_GS_PACKET_TO_MTGS 0
|
||||
#define PRINT_GIF_PACKET 0
|
||||
|
||||
|
||||
+4
-6
@@ -592,12 +592,11 @@ struct Gif_Unit {
|
||||
break; // Not finished with GS packet
|
||||
}
|
||||
//DevCon.WriteLn("Adding GS Packet for path %d", stat.APATH);
|
||||
AddCompletedGSPacket(gsPack, (GIF_PATH)(stat.APATH-1));
|
||||
/*if (path.curSize == path.curOffset)
|
||||
curPath = 0;*/
|
||||
if (gifPath[curPath].state == GIF_PATH_WAIT || gifPath[curPath].state == GIF_PATH_IDLE) {
|
||||
AddCompletedGSPacket(gsPack, (GIF_PATH)(stat.APATH - 1));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
if (!gsSIGNAL.queued && !gifPath[0].isDone()) {
|
||||
stat.APATH = 1;
|
||||
stat.P1Q = 0;
|
||||
@@ -623,11 +622,10 @@ struct Gif_Unit {
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
//Some loaders/Refresh Rate selectors and things dont issue "End of Packet" commands
|
||||
//So we look and see if the end of the last tag is all there, if so, stick it in the buffer for the GS :)
|
||||
//(Invisible Screens on Terminator 3 and Growlanser 2/3)
|
||||
if(gifPath[curPath].curOffset == gifPath[curPath].curSize)
|
||||
if(gifPath[curPath].curOffset == gifPath[curPath].curSize)
|
||||
{
|
||||
FlushToMTGS();
|
||||
}
|
||||
|
||||
+1
-9
@@ -200,15 +200,7 @@ __fi void vif1FBRST(u32 value) {
|
||||
if(gifUnit.checkPaths(1,0,1)) gifUnit.Execute(false, true);
|
||||
}
|
||||
}
|
||||
|
||||
#if USE_OLD_GIF == 1 // ...
|
||||
if(vif1Regs.mskpath3 == 1 && GSTransferStatus.PTH3 == STOPPED_MODE && gifch.chcr.STR) {
|
||||
DevCon.Warning("VIF Path3 Resume on FBRST MSK = %x", vif1Regs.mskpath3);
|
||||
gifInterrupt();
|
||||
vif1Regs.mskpath3 = false;
|
||||
gifRegs.stat.M3P = false;
|
||||
}
|
||||
#endif
|
||||
|
||||
GUNIT_WARN(Color_Red, "VIF FBRST Reset MSK = %x", vif1Regs.mskpath3);
|
||||
vif1Regs.mskpath3 = false;
|
||||
gifRegs.stat.M3P = 0;
|
||||
|
||||
+4
-7
@@ -406,14 +406,11 @@ vifOp(vifCode_MskPath3) {
|
||||
pass1 {
|
||||
vif1Regs.mskpath3 = (vif1Regs.code >> 15) & 0x1;
|
||||
gifRegs.stat.M3P = (vif1Regs.code >> 15) & 0x1;
|
||||
GUNIT_LOG("Vif1 - MskPath3 [p3 = %s]", vif1Regs.mskpath3 ? "disabled" : "enabled");
|
||||
GUNIT_LOG("Vif1 - MskPath3 [p3 = %s]", vif1Regs.mskpath3 ? "masked" : "enabled");
|
||||
if(!vif1Regs.mskpath3) {
|
||||
//if(!gifUnit.gifPath[GIF_PATH_3].isDone() || gifRegs.stat.P3Q || gifRegs.stat.IP3) {
|
||||
GUNIT_WARN("Path3 triggering!");
|
||||
if(CHECK_GIFFIFOHACK)gif_fifo.read(false);
|
||||
else gifInterrupt();
|
||||
GIF_LOG("GIF state on mskpth3 QWC in fifo %x APATH = %x OPH = %x state = %x", gifRegs.stat.FQC, gifRegs.stat.APATH, gifRegs.stat.OPH, gifUnit.gifPath[GIF_PATH_3].state);
|
||||
//}
|
||||
GUNIT_WARN("Path3 triggering!");
|
||||
if(CHECK_GIFFIFOHACK)gif_fifo.read(false);
|
||||
else gifInterrupt();
|
||||
}
|
||||
vif1.cmd = 0;
|
||||
vif1.pass = 0;
|
||||
|
||||
Reference in New Issue
Block a user