From c355393b5bd533d0200b10f26b6ea272365ee422 Mon Sep 17 00:00:00 2001 From: refraction Date: Mon, 29 Aug 2011 21:54:23 +0000 Subject: [PATCH] Vif/Gif: Hack for Hotwheels World Race, should be pretty harmless at it's very rare conditions. (Note: Game runs better on ZeroGS than GSDX) git-svn-id: http://pcsx2.googlecode.com/svn/trunk@4889 96395faa-99c1-11dd-bbfe-3dabce05a288 --- pcsx2/Gif_Unit.h | 4 ++-- pcsx2/Vif.cpp | 7 ++++++- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/pcsx2/Gif_Unit.h b/pcsx2/Gif_Unit.h index dc792c3dd8..e34732e970 100644 --- a/pcsx2/Gif_Unit.h +++ b/pcsx2/Gif_Unit.h @@ -576,10 +576,10 @@ struct Gif_Unit { // DirectHL bool CanDoPath2HL() { return (stat.APATH == 0 || stat.APATH == 2) && (CanDoGif() == 1); } - // Gif DMA + // Gif DMA - gifch.qwc <= 1 is a hack for Hot Wheels, shouldnt cause much trouble (if any):S bool CanDoPath3() { return((stat.APATH == 0 && !Path3Masked()) || stat.APATH == 3) - && (CanDoGif() == 1); } + && (CanDoGif() == 1 || gifch.qwc <= 1); } bool CanDoP3Slice() { return stat.IMT == 1 && gifPath[GIF_PATH_3].state == GIF_PATH_IMAGE; } bool CanDoGif() { return stat.PSE == 0 && stat.DIR == 0 && gsSIGNAL.queued == 0; } diff --git a/pcsx2/Vif.cpp b/pcsx2/Vif.cpp index 6ad9278536..721bedb456 100644 --- a/pcsx2/Vif.cpp +++ b/pcsx2/Vif.cpp @@ -260,7 +260,12 @@ __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"); + 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. } }