mirror of https://github.com/PCSX2/pcsx2.git
Path3 Masking: Fixed up some issues causing Gunfighter 2 not to work. Closes Issue 1445
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5759 96395faa-99c1-11dd-bbfe-3dabce05a288
This commit is contained in:
parent
54fa8719a3
commit
45d790b854
|
@ -60,17 +60,20 @@ __fi void gifInterrupt()
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//Required for Path3 Masking timing!
|
//Required for Path3 Masking timing!
|
||||||
if(gifUnit.gifPath[GIF_PATH_3].state == GIF_PATH_WAIT)
|
if(gifUnit.gifPath[GIF_PATH_3].state == GIF_PATH_WAIT)
|
||||||
{
|
|
||||||
gifUnit.gifPath[GIF_PATH_3].state = GIF_PATH_IDLE;
|
gifUnit.gifPath[GIF_PATH_3].state = GIF_PATH_IDLE;
|
||||||
|
|
||||||
|
if(gifUnit.gifPath[GIF_PATH_3].state == GIF_PATH_IDLE)
|
||||||
|
{
|
||||||
if(vif1Regs.stat.VGW)
|
if(vif1Regs.stat.VGW)
|
||||||
{
|
{
|
||||||
//Check if VIF is in a cycle or is currently "idle" waiting for GIF to come back.
|
//Check if VIF is in a cycle or is currently "idle" waiting for GIF to come back.
|
||||||
if(!(cpuRegs.interrupt & (1<<DMAC_VIF1)))
|
if(!(cpuRegs.interrupt & (1<<DMAC_VIF1)))
|
||||||
CPU_INT(DMAC_VIF1, 1);
|
CPU_INT(DMAC_VIF1, 1);
|
||||||
|
|
||||||
|
if(!gifUnit.Path3Masked())
|
||||||
CPU_INT(DMAC_GIF, 16);
|
CPU_INT(DMAC_GIF, 16);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -506,18 +509,22 @@ void gifMFIFOInterrupt()
|
||||||
}
|
}
|
||||||
|
|
||||||
if(gifUnit.gifPath[GIF_PATH_3].state == GIF_PATH_WAIT)
|
if(gifUnit.gifPath[GIF_PATH_3].state == GIF_PATH_WAIT)
|
||||||
{
|
|
||||||
gifUnit.gifPath[GIF_PATH_3].state = GIF_PATH_IDLE;
|
gifUnit.gifPath[GIF_PATH_3].state = GIF_PATH_IDLE;
|
||||||
|
|
||||||
|
if(gifUnit.gifPath[GIF_PATH_3].state == GIF_PATH_IDLE)
|
||||||
|
{
|
||||||
if(vif1Regs.stat.VGW)
|
if(vif1Regs.stat.VGW)
|
||||||
{
|
{
|
||||||
|
//Check if VIF is in a cycle or is currently "idle" waiting for GIF to come back.
|
||||||
|
if(!(cpuRegs.interrupt & (1<<DMAC_VIF1)))
|
||||||
CPU_INT(DMAC_VIF1, 1);
|
CPU_INT(DMAC_VIF1, 1);
|
||||||
|
|
||||||
if(!gifUnit.Path3Masked())
|
if(!gifUnit.Path3Masked())
|
||||||
CPU_INT(DMAC_MFIFO_GIF, 16);
|
CPU_INT(DMAC_GIF, 16);
|
||||||
|
|
||||||
if(!gspath3done || gifch.qwc > 0) return;
|
if(!gspath3done || gifch.qwc > 0) return;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (dmacRegs.ctrl.MFD != MFD_GIF) {
|
if (dmacRegs.ctrl.MFD != MFD_GIF) {
|
||||||
|
|
|
@ -590,9 +590,9 @@ struct Gif_Unit {
|
||||||
}
|
}
|
||||||
if (!gsSIGNAL.queued && !gifPath[0].isDone()) { stat.APATH = 1; stat.P1Q = 0; curPath = 0; }
|
if (!gsSIGNAL.queued && !gifPath[0].isDone()) { stat.APATH = 1; stat.P1Q = 0; curPath = 0; }
|
||||||
elif (!gsSIGNAL.queued && !gifPath[1].isDone()) { stat.APATH = 2; stat.P2Q = 0; curPath = 1; }
|
elif (!gsSIGNAL.queued && !gifPath[1].isDone()) { stat.APATH = 2; stat.P2Q = 0; curPath = 1; }
|
||||||
elif (!gsSIGNAL.queued && !gifPath[2].isDone() && !Path3Masked() /*&& !stat.P2Q*/)
|
elif (!gsSIGNAL.queued && !gifPath[2].isDone() && !Path3Masked())
|
||||||
{ stat.APATH = 3; stat.P3Q = 0; stat.IP3 = 0; curPath = 2; }
|
{ stat.APATH = 3; stat.P3Q = 0; stat.IP3 = 0; curPath = 2; }
|
||||||
else { if(isResume) { stat.APATH = 0; stat.OPH = 0; } break; }
|
else { if(isResume || curPath == 0) { stat.APATH = 0; stat.OPH = 0; } break; }
|
||||||
}
|
}
|
||||||
|
|
||||||
//Some loaders/Refresh Rate selectors and things dont issue "End of Packet" commands
|
//Some loaders/Refresh Rate selectors and things dont issue "End of Packet" commands
|
||||||
|
|
|
@ -294,9 +294,10 @@ __fi void vif1Interrupt()
|
||||||
|| (isDirectHL && !gifUnit.CanDoPath2HL())) {
|
|| (isDirectHL && !gifUnit.CanDoPath2HL())) {
|
||||||
GUNIT_WARN("vif1Interrupt() - Waiting for Path 2 to be ready");
|
GUNIT_WARN("vif1Interrupt() - Waiting for Path 2 to be ready");
|
||||||
CPU_INT(DMAC_VIF1, 128);
|
CPU_INT(DMAC_VIF1, 128);
|
||||||
|
if(gifRegs.stat.APATH == 3) vif1Regs.stat.VGW = 1; //We're waiting for path 3. Gunslinger II
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
vif1Regs.stat.VGW = 0; //Path 3 isn't busy so we don't need to wait for it.
|
||||||
vif1Regs.stat.FQC = min(vif1ch.qwc, (u16)16);
|
vif1Regs.stat.FQC = min(vif1ch.qwc, (u16)16);
|
||||||
//Simulated GS transfer time done, clear the flags
|
//Simulated GS transfer time done, clear the flags
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue