New gamefix hack that alternates the GIF_STAT flag "OPH" on each register read.

This will be needed until we've figured out how this thing is supposed to work.

Enabling this hack should fix, among others, Growlanser games, Bleach and Wizardry.

git-svn-id: http://pcsx2.googlecode.com/svn/trunk@3574 96395faa-99c1-11dd-bbfe-3dabce05a288
This commit is contained in:
ramapcsx2 2010-07-26 18:55:18 +00:00
parent 4bb830827d
commit 0d029979ca
4 changed files with 29 additions and 6 deletions

View File

@ -50,6 +50,7 @@ enum GamefixId
Fix_IpuWait,
Fix_EETiming,
Fix_SkipMpeg,
Fix_OPHFlag,
GamefixId_COUNT
};
@ -457,7 +458,8 @@ struct Pcsx2Config
XgKickHack :1, // Erementar Gerad, adds more delay to VU XGkick instructions. Corrects the color of some graphics, but breaks Tri-ace games and others.
IPUWaitHack :1, // FFX FMV, makes GIF flush before doing IPU work. Fixes bad graphics overlay.
EETimingHack :1, // General purpose timing hack.
SkipMPEGHack :1; // Skips MPEG videos (Katamari and other games need this)
SkipMPEGHack :1, // Skips MPEG videos (Katamari and other games need this)
OPHFlagHack :1; // Skips MPEG videos (Katamari and other games need this)
BITFIELD_END
// all gamefixes are disabled by default.
@ -603,6 +605,7 @@ TraceLogFilters& SetTraceConfig();
#define CHECK_IPUWAITHACK (EmuConfig.Gamefixes.IPUWaitHack) // Special Fix For FFX
#define CHECK_EETIMINGHACK (EmuConfig.Gamefixes.EETimingHack) // Fix all scheduled events to happen in 1 cycle.
#define CHECK_SKIPMPEGHACK (EmuConfig.Gamefixes.SkipMPEGHack) // Finds sceMpegIsEnd pattern to tell the game the mpeg is finished (Katamari and a lot of games need this)
#define CHECK_OPHFLAGHACK (EmuConfig.Gamefixes.OPHFlagHack)
//------------ Advanced Options!!! ---------------
#define CHECK_VU_OVERFLOW (EmuConfig.Cpu.Recompiler.vuOverflow)

View File

@ -380,14 +380,21 @@ mem32_t __fastcall hwRead32_generic(u32 mem)
switch( masked_mem>>12 ) // switch out as according to the 4k page of the access.
{
case 0x03:
if(masked_mem >= 0x3800) HW_LOG("VIF%x Register Read32 at 0x%x, value=0x%x", (masked_mem < 0x3c00) ? 0 : 1, mem, psHu32(mem) );
else HW_LOG("GIF Register Read32 at 0x%x, value=0x%x", mem, psHu32(mem) );
// Fixme: OPH hack. Toggle the flag on each GIF_STAT access. (rama)
if (CHECK_OPHFLAGHACK)
{
if (masked_mem == 0x3020)
gifRegs->stat.OPH = !gifRegs->stat.OPH;
}
break;
///////////////////////////////////////////////////////
// Most of the following case handlers are for developer builds only (logging).
// It'll all optimize to ziltch in public release builds.
#ifdef PCSX2_DEVBUILD
case 0x03:
if(masked_mem >= 0x3800) HW_LOG("VIF%x Register Read32 at 0x%x, value=0x%x", (masked_mem < 0x3c00) ? 0 : 1, mem, psHu32(mem) );
else HW_LOG("GIF Register Read32 at 0x%x, value=0x%x", mem, psHu32(mem) );
break;
case 0x04:
case 0x05:
case 0x06:

View File

@ -262,7 +262,8 @@ const wxChar *const tbl_GamefixNames[] =
L"XGKick",
L"IpuWait",
L"EETiming",
L"SkipMpeg"
L"SkipMpeg",
L"OPHFlag"
};
const __forceinline wxChar* EnumToString( GamefixId id )
@ -306,6 +307,7 @@ void Pcsx2Config::GamefixOptions::Set( GamefixId id, bool enabled )
case Fix_IpuWait: IPUWaitHack = enabled; break;
case Fix_EETiming: EETimingHack = enabled; break;
case Fix_SkipMpeg: SkipMPEGHack = enabled; break;
case Fix_OPHFlag: OPHFlagHack = enabled; break;
jNO_DEFAULT;
}
@ -325,6 +327,7 @@ bool Pcsx2Config::GamefixOptions::Get( GamefixId id ) const
case Fix_IpuWait: return IPUWaitHack;
case Fix_EETiming: return EETimingHack;
case Fix_SkipMpeg: return SkipMPEGHack;
case Fix_OPHFlag: return OPHFlagHack;
jNO_DEFAULT
}
@ -345,6 +348,7 @@ void Pcsx2Config::GamefixOptions::LoadSave( IniInterface& ini )
IniBitBool( IPUWaitHack );
IniBitBool( EETimingHack );
IniBitBool( SkipMPEGHack );
IniBitBool( OPHFlagHack );
}
Pcsx2Config::Pcsx2Config()

View File

@ -74,6 +74,15 @@ Panels::GameFixesPanel::GameFixesPanel( wxWindow* parent )
{
_("Skip MPEG hack - Skips videos/FMVs in games to avoid game hanging/freezes."),
wxEmptyString
},
{
_("OPH Flag hack - Try if your game freezes showing the same frame."),
pxE( ".Tooltip:Gamefixes:OPH Flag hack",
L"Known to affect following games:\n"
L" * Bleach Blade Battler\n"
L" * Growlanser II and III\n"
L" * Wizardry"
)
}
};