Morphed the Hotwheels hack into a gamefix to be safe!

git-svn-id: http://pcsx2.googlecode.com/svn/trunk@4890 96395faa-99c1-11dd-bbfe-3dabce05a288
This commit is contained in:
refraction 2011-08-29 23:05:22 +00:00
parent c355393b5b
commit 09af07d954
4 changed files with 16 additions and 5 deletions

View File

@ -54,6 +54,7 @@ enum GamefixId
Fix_DMABusy, Fix_DMABusy,
Fix_VIFFIFO, Fix_VIFFIFO,
Fix_VIF1Stall, Fix_VIF1Stall,
Fix_GIFReverse,
GamefixId_COUNT GamefixId_COUNT
}; };
@ -345,7 +346,8 @@ struct Pcsx2Config
OPHFlagHack :1, // Bleach Blade Battlers 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. 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. 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 BITFIELD_END
GamefixOptions(); 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_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_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_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!!! --------------- //------------ Advanced Options!!! ---------------
#define CHECK_VU_OVERFLOW (EmuConfig.Cpu.Recompiler.vuOverflow) #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 #define CHECK_VU_EXTRA_OVERFLOW (EmuConfig.Cpu.Recompiler.vuExtraOverflow) // If enabled, Operands are clamped before being used in the VU recs

View File

@ -576,13 +576,13 @@ struct Gif_Unit {
// DirectHL // DirectHL
bool CanDoPath2HL() { return (stat.APATH == 0 || stat.APATH == 2) bool CanDoPath2HL() { return (stat.APATH == 0 || stat.APATH == 2)
&& (CanDoGif() == 1); } && (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()) bool CanDoPath3() { return((stat.APATH == 0 && !Path3Masked())
|| stat.APATH == 3) || 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 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; } bool Path3Masked() { return stat.M3R || stat.M3P; }
void PrintInfo(bool printP1=1, bool printP2=1, bool printP3=1) { void PrintInfo(bool printP1=1, bool printP2=1, bool printP3=1) {

View File

@ -255,7 +255,8 @@ const wxChar *const tbl_GamefixNames[] =
L"OPHFlag", L"OPHFlag",
L"DMABusy", L"DMABusy",
L"VIFFIFO", L"VIFFIFO",
L"VIF1Stall" L"VIF1Stall",
L"GIFReverse"
}; };
const __fi wxChar* EnumToString( GamefixId id ) 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_DMABusy: DMABusyHack = enabled; break;
case Fix_VIFFIFO: VIFFIFOHack = enabled; break; case Fix_VIFFIFO: VIFFIFOHack = enabled; break;
case Fix_VIF1Stall: VIF1StallHack = enabled; break; case Fix_VIF1Stall: VIF1StallHack = enabled; break;
case Fix_GIFReverse: GIFReverseHack = enabled; break;
jNO_DEFAULT; jNO_DEFAULT;
} }
@ -338,6 +340,7 @@ bool Pcsx2Config::GamefixOptions::Get( GamefixId id ) const
case Fix_DMABusy: return DMABusyHack; case Fix_DMABusy: return DMABusyHack;
case Fix_VIFFIFO: return VIFFIFOHack; case Fix_VIFFIFO: return VIFFIFOHack;
case Fix_VIF1Stall: return VIF1StallHack; case Fix_VIF1Stall: return VIF1StallHack;
case Fix_GIFReverse: return GIFReverseHack;
jNO_DEFAULT; jNO_DEFAULT;
} }
@ -361,6 +364,7 @@ void Pcsx2Config::GamefixOptions::LoadSave( IniInterface& ini )
IniBitBool( DMABusyHack ); IniBitBool( DMABusyHack );
IniBitBool( VIFFIFOHack ); IniBitBool( VIFFIFOHack );
IniBitBool( VIF1StallHack ); IniBitBool( VIF1StallHack );
IniBitBool( GIFReverseHack );
} }
Pcsx2Config::Pcsx2Config() Pcsx2Config::Pcsx2Config()

View File

@ -102,6 +102,10 @@ Panels::GameFixesPanel::GameFixesPanel( wxWindow* parent )
{ {
_("Delay VIF1 Stalls (VIF1 FIFO) - For SOCOM 2 HUD."), _("Delay VIF1 Stalls (VIF1 FIFO) - For SOCOM 2 HUD."),
wxEmptyString wxEmptyString
},
{
_("Ignore Bus Direction on Path3 Transfer - Used for Hotwheels"),
wxEmptyString
} }
}; };