Gamefix: Added gamefix for SOCOM 2 HUD corruption.

The game attempts to loads all data in to the VIF FIFO then stall it. Something goes very wrong.  Maybe one day ill replace this and the transformers gamefix with a FIFO we can turn on, but for now, this'll do.

git-svn-id: http://pcsx2.googlecode.com/svn/trunk@4878 96395faa-99c1-11dd-bbfe-3dabce05a288
This commit is contained in:
refraction 2011-08-25 16:23:25 +00:00
parent 7429e797fb
commit ab19387935
4 changed files with 15 additions and 4 deletions

View File

@ -53,6 +53,7 @@ enum GamefixId
Fix_OPHFlag,
Fix_DMABusy,
Fix_VIFFIFO,
Fix_VIF1Stall,
GamefixId_COUNT
};
@ -343,7 +344,8 @@ struct Pcsx2Config
SkipMPEGHack :1, // Skips MPEG videos (Katamari and other games need this)
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.
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).
BITFIELD_END
GamefixOptions();
@ -492,7 +494,7 @@ TraceLogFilters& SetTraceConfig();
#define CHECK_OPHFLAGHACK (EmuConfig.Gamefixes.OPHFlagHack) // Bleach Blade Battlers
#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).
//------------ 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

View File

@ -254,7 +254,8 @@ const wxChar *const tbl_GamefixNames[] =
L"SkipMpeg",
L"OPHFlag",
L"DMABusy",
L"VIFFIFO"
L"VIFFIFO",
L"VIF1Stall"
};
const __fi wxChar* EnumToString( GamefixId id )
@ -313,6 +314,7 @@ void Pcsx2Config::GamefixOptions::Set( GamefixId id, bool enabled )
case Fix_OPHFlag: OPHFlagHack = enabled; break;
case Fix_DMABusy: DMABusyHack = enabled; break;
case Fix_VIFFIFO: VIFFIFOHack = enabled; break;
case Fix_VIF1Stall: VIF1StallHack = enabled; break;
jNO_DEFAULT;
}
@ -335,6 +337,7 @@ bool Pcsx2Config::GamefixOptions::Get( GamefixId id ) const
case Fix_OPHFlag: return OPHFlagHack;
case Fix_DMABusy: return DMABusyHack;
case Fix_VIFFIFO: return VIFFIFOHack;
case Fix_VIF1Stall: return VIF1StallHack;
jNO_DEFAULT;
}
@ -357,6 +360,7 @@ void Pcsx2Config::GamefixOptions::LoadSave( IniInterface& ini )
IniBitBool( OPHFlagHack );
IniBitBool( DMABusyHack );
IniBitBool( VIFFIFOHack );
IniBitBool( VIF1StallHack );
}
Pcsx2Config::Pcsx2Config()

View File

@ -63,7 +63,8 @@ _vifT bool analyzeIbit(u32* &data, int iBit) {
// ... the VIF should not stall and raise the interrupt until after the NOP is processed.
// So the final value for MARK as the game sees it will be 0x333. --air
return runMark<idx>(data);
if(CHECK_VIF1STALLHACK) return 0;
else return 1;
}
return 0;
}

View File

@ -98,6 +98,10 @@ Panels::GameFixesPanel::GameFixesPanel( wxWindow* parent )
L" * Test Drive Unlimited\n"
L" * Transformers"
)
},
{
_("Delay VIF1 Stalls (VIF1 FIFO) - For SOCOM 2 HUD."),
wxEmptyString
}
};