Vif: Modified VIF FIFO reverse while VIF is active hack. Now just makes sure VIF is stopped before it swaps direction either way. Fixes Sled Storm.

git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5477 96395faa-99c1-11dd-bbfe-3dabce05a288
This commit is contained in:
refraction 2012-12-08 13:00:31 +00:00
parent c86ca9c56e
commit 71065506c1
1 changed files with 10 additions and 6 deletions

View File

@ -272,13 +272,17 @@ __fi void vif1STAT(u32 value) {
if ((vif1Regs.stat.FDR) ^ ((tVIF_STAT&)value).FDR) {
// different so can't be stalled
if (vif1Regs.stat.test(VIF1_STAT_INT | VIF1_STAT_VSS | VIF1_STAT_VIS | VIF1_STAT_VFS)) {
DevCon.WriteLn("changing dir when vif1 fifo stalled done = %x qwc = %x", vif1.done, vif1ch.qwc);
//Hack!! Hotwheels seems to leave 1QW in the fifo and expect the DMA to be ready for a reverse FIFO
//There's no important data in there so for it to work, we will just end it.
vif1ch.chcr.STR = false;
//This is actually more important for our handling, else the DMA for reverse fifo doesnt start properly.
DevCon.WriteLn("changing dir when vif1 fifo stalled done = %x qwc = %x", vif1.done, vif1ch.qwc);
}
//Hack!! Hotwheels seems to leave 1QW in the fifo and expect the DMA to be ready for a reverse FIFO
//There's no important data in there so for it to work, we will just end it.
//Hotwheels had this in the "direction when stalled" area, however Sled Storm seems to keep an eye on the dma
//position, as we clear it and set it to the end well before the interrupt, the game assumes it's finished,
//then proceeds to reverse the dma before we have even done it ourselves. So lets just make sure VIF is ready :)
vif1ch.chcr.STR = false;
cpuRegs.interrupt &= ~((1 << DMAC_VIF1) | (1 << DMAC_MFIFO_VIF));
//This is actually more important for our handling, else the DMA for reverse fifo doesnt start properly.
}
vif1Regs.stat.FDR = VIF_STAT(value).FDR;