Path 3 games speed up. Stopping VIF looping when waiting for Path 3 to finish (can sometimes loop over 1000 times)

Examples of speed ups:

Outrun 2006

before 43.4 - 45.7
after  44.7 - 47.33

Grand Theft Auto: San Andreas
before 63 - 66.9
after  66 - 69.5

Need for Speed Most Wanted

before 33.0 - 33.3
after  33.22 - 33.57

Burnout 2

before 46.5 - 48.3
after  53.2 - 55.5

git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5246 96395faa-99c1-11dd-bbfe-3dabce05a288
This commit is contained in:
refraction 2012-05-30 19:19:53 +00:00
parent 098640b06a
commit 489bce662d
3 changed files with 10 additions and 3 deletions

View File

@ -57,6 +57,8 @@ __fi void gifInterrupt()
if(vif1Regs.stat.VGW)
{
CPU_INT(DMAC_VIF1, 1);
if(!gifUnit.Path3Masked())
CPU_INT(DMAC_GIF, 16);

View File

@ -342,7 +342,9 @@ __fi void vif1Interrupt()
if(g_vif1Cycles > 0 || vif1ch.qwc)
{
CPU_INT(DMAC_VIF1, max((int)g_vif1Cycles, 8));
if(!(vif1Regs.stat.VGW && gifUnit.gifPath[GIF_PATH_3].state != GIF_PATH_IDLE)) //If we're waiting on GIF, stop looping, (can be over 1000 loops!)
CPU_INT(DMAC_VIF1, max((int)g_vif1Cycles, 8));
return;
}
else if(vif1Regs.stat.VPS == VPS_TRANSFERRING) DevCon.Warning("Cycles %x, cmd %x, qwc %x, waitonvu %x", g_vif1Cycles, vif1.cmd, vif1ch.qwc, vif1.waitforvu);

View File

@ -318,9 +318,12 @@ void vifMFIFOInterrupt()
vif1Regs.stat.FQC = min((u16)0x10, vif1ch.qwc);
case 1: //Transfer data
mfifo_VIF1chain();
if(vif1.inprogress & 0x1) //Just in case the tag breaks early (or something wierd happens)!
mfifo_VIF1chain();
//Sanity check! making sure we always have non-zero values
CPU_INT(DMAC_MFIFO_VIF, (g_vif1Cycles == 0 ? 4 : g_vif1Cycles) );
if(!(vif1Regs.stat.VGW && gifUnit.gifPath[GIF_PATH_3].state != GIF_PATH_IDLE)) //If we're waiting on GIF, stop looping, (can be over 1000 loops!)
CPU_INT(DMAC_MFIFO_VIF, (g_vif1Cycles == 0 ? 4 : g_vif1Cycles) );
vif1Regs.stat.FQC = min((u16)0x10, vif1ch.qwc);
return;
}