From 0788dec404da2fa091267f0583479318b6656d5d Mon Sep 17 00:00:00 2001 From: refraction Date: Tue, 20 Apr 2010 20:24:04 +0000 Subject: [PATCH] Fix for Fahrenheit :) git-svn-id: http://pcsx2.googlecode.com/svn/trunk@2878 96395faa-99c1-11dd-bbfe-3dabce05a288 --- pcsx2/Vif1_Dma.cpp | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) diff --git a/pcsx2/Vif1_Dma.cpp b/pcsx2/Vif1_Dma.cpp index 03e45aec55..dcd79f80ca 100644 --- a/pcsx2/Vif1_Dma.cpp +++ b/pcsx2/Vif1_Dma.cpp @@ -201,6 +201,18 @@ __forceinline void vif1Interrupt() VIF_LOG("vif1Interrupt: %8.8x", cpuRegs.cycle); g_vifCycles = 0; + + //Some games (Fahrenheit being one) start vif first, let it loop through blankness while it sets MFIFO mode, so we need to check it here. + if (dmacRegs->ctrl.MFD == MFD_VIF1) // VIF MFIFO + { + //Console.WriteLn("VIFMFIFO\n"); + // Test changed because the Final Fantasy 12 opening somehow has the tag in *Undefined* mode, which is not in the documentation that I saw. + if (vif1ch->chcr.MOD == NORMAL_MODE) Console.WriteLn("MFIFO mode is normal (which isn't normal here)! %x", vif1ch->chcr._u32); + vif1Regs->stat.FQC = min((u16)0x10, vif1ch->qwc); + vifMFIFOInterrupt(); + return; + } + if (vif1ch->chcr.DIR) vif1Regs->stat.FQC = min(vif1ch->qwc, (u16)16); //Simulated GS transfer time done, clear the flags if(gifRegs->stat.APATH == GIF_APATH2 && (vif1.cmd & 0x70) != 0x50) @@ -310,16 +322,6 @@ void dmaVIF1() g_vifCycles = 0; vif1.inprogress = 0; - if (dmacRegs->ctrl.MFD == MFD_VIF1) // VIF MFIFO - { - //Console.WriteLn("VIFMFIFO\n"); - // Test changed because the Final Fantasy 12 opening somehow has the tag in *Undefined* mode, which is not in the documentation that I saw. - if (vif1ch->chcr.MOD == NORMAL_MODE) Console.WriteLn("MFIFO mode is normal (which isn't normal here)! %x", vif1ch->chcr._u32); - vif1Regs->stat.FQC = min((u16)0x10, vif1ch->qwc); - vifMFIFOInterrupt(); - return; - } - #ifdef PCSX2_DEVBUILD if (dmacRegs->ctrl.STD == STD_VIF1) {