diff --git a/pcsx2/Config.h b/pcsx2/Config.h index ff5fb7a133..f129d5148a 100644 --- a/pcsx2/Config.h +++ b/pcsx2/Config.h @@ -54,6 +54,7 @@ enum GamefixId Fix_DMABusy, Fix_VIFFIFO, Fix_VIF1Stall, + Fix_GIFReverse, GamefixId_COUNT }; @@ -345,7 +346,8 @@ struct Pcsx2Config OPHFlagHack :1, // Bleach Blade Battlers DMABusyHack :1, // Denies writes to the DMAC when it's busy. This is correct behaviour but bad timing can cause problems. VIFFIFOHack :1, // Pretends to fill the non-existant VIF FIFO Buffer. - VIF1StallHack :1; // Like above, processes FIFO data before the stall is allowed (to make sure data goes over). + VIF1StallHack :1, // Like above, processes FIFO data before the stall is allowed (to make sure data goes over). + GIFReverseHack :1; // Allows PATH3 to continue even if the FIFO is reversed. BITFIELD_END GamefixOptions(); @@ -495,6 +497,7 @@ TraceLogFilters& SetTraceConfig(); #define CHECK_DMABUSYHACK (EmuConfig.Gamefixes.DMABusyHack) // Denies writes to the DMAC when it's busy. This is correct behaviour but bad timing can cause problems. #define CHECK_VIFFIFOHACK (EmuConfig.Gamefixes.VIFFIFOHack) // Pretends to fill the non-existant VIF FIFO Buffer. #define CHECK_VIF1STALLHACK (EmuConfig.Gamefixes.VIF1StallHack) // Like above, processes FIFO data before the stall is allowed (to make sure data goes over). +#define CHECK_GIFREVERSEHACK (EmuConfig.Gamefixes.GIFReverseHack) // Allows PATH3 to continue even if the FIFO is reversed. //------------ Advanced Options!!! --------------- #define CHECK_VU_OVERFLOW (EmuConfig.Cpu.Recompiler.vuOverflow) #define CHECK_VU_EXTRA_OVERFLOW (EmuConfig.Cpu.Recompiler.vuExtraOverflow) // If enabled, Operands are clamped before being used in the VU recs diff --git a/pcsx2/Gif_Unit.h b/pcsx2/Gif_Unit.h index e34732e970..33cbc1b567 100644 --- a/pcsx2/Gif_Unit.h +++ b/pcsx2/Gif_Unit.h @@ -576,13 +576,13 @@ struct Gif_Unit { // DirectHL bool CanDoPath2HL() { return (stat.APATH == 0 || stat.APATH == 2) && (CanDoGif() == 1); } - // Gif DMA - gifch.qwc <= 1 is a hack for Hot Wheels, shouldnt cause much trouble (if any):S + // Gif DMA - CHECK_GIFREVERSEHACK is a hack for Hot Wheels. bool CanDoPath3() { return((stat.APATH == 0 && !Path3Masked()) || stat.APATH == 3) - && (CanDoGif() == 1 || gifch.qwc <= 1); } + && (CanDoGif() == 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; } + bool CanDoGif() { return stat.PSE == 0 && (CHECK_GIFREVERSEHACK ? 1 : stat.DIR == 0) && gsSIGNAL.queued == 0; } bool Path3Masked() { return stat.M3R || stat.M3P; } void PrintInfo(bool printP1=1, bool printP2=1, bool printP3=1) { diff --git a/pcsx2/Pcsx2Config.cpp b/pcsx2/Pcsx2Config.cpp index b86f3aaa74..a070d60c3a 100644 --- a/pcsx2/Pcsx2Config.cpp +++ b/pcsx2/Pcsx2Config.cpp @@ -255,7 +255,8 @@ const wxChar *const tbl_GamefixNames[] = L"OPHFlag", L"DMABusy", L"VIFFIFO", - L"VIF1Stall" + L"VIF1Stall", + L"GIFReverse" }; const __fi wxChar* EnumToString( GamefixId id ) @@ -315,6 +316,7 @@ void Pcsx2Config::GamefixOptions::Set( GamefixId id, bool enabled ) case Fix_DMABusy: DMABusyHack = enabled; break; case Fix_VIFFIFO: VIFFIFOHack = enabled; break; case Fix_VIF1Stall: VIF1StallHack = enabled; break; + case Fix_GIFReverse: GIFReverseHack = enabled; break; jNO_DEFAULT; } @@ -338,6 +340,7 @@ bool Pcsx2Config::GamefixOptions::Get( GamefixId id ) const case Fix_DMABusy: return DMABusyHack; case Fix_VIFFIFO: return VIFFIFOHack; case Fix_VIF1Stall: return VIF1StallHack; + case Fix_GIFReverse: return GIFReverseHack; jNO_DEFAULT; } @@ -361,6 +364,7 @@ void Pcsx2Config::GamefixOptions::LoadSave( IniInterface& ini ) IniBitBool( DMABusyHack ); IniBitBool( VIFFIFOHack ); IniBitBool( VIF1StallHack ); + IniBitBool( GIFReverseHack ); } Pcsx2Config::Pcsx2Config() diff --git a/pcsx2/gui/Panels/GameFixesPanel.cpp b/pcsx2/gui/Panels/GameFixesPanel.cpp index d18d68cc88..01f4b83eb7 100644 --- a/pcsx2/gui/Panels/GameFixesPanel.cpp +++ b/pcsx2/gui/Panels/GameFixesPanel.cpp @@ -102,6 +102,10 @@ Panels::GameFixesPanel::GameFixesPanel( wxWindow* parent ) { _("Delay VIF1 Stalls (VIF1 FIFO) - For SOCOM 2 HUD."), wxEmptyString + }, + { + _("Ignore Bus Direction on Path3 Transfer - Used for Hotwheels"), + wxEmptyString } };