mirror of https://github.com/PCSX2/pcsx2.git
Add an enable game fixes checkbox that behaves the same as the enable speed hacks checkbox, for ui consistancy. (Defaults to off, so if you are currently using game fixes, you'll need to go in and check it.)
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@2614 96395faa-99c1-11dd-bbfe-3dabce05a288
This commit is contained in:
parent
b6b6a1d881
commit
b98e4b9b12
|
@ -112,7 +112,7 @@ __forceinline mem16_t hwRead16(u32 mem)
|
||||||
u16 ret;
|
u16 ret;
|
||||||
|
|
||||||
// TODO re-implement this warning along with a *complete* logging of all hw activity.
|
// TODO re-implement this warning along with a *complete* logging of all hw activity.
|
||||||
// (implementation should be modelled after thee iopHWRead/iopHwWrite files)
|
// (implementation should be modelled after the iopHWRead/iopHwWrite files)
|
||||||
if( mem >= IPU_CMD && mem < D0_CHCR ) return psHu8(mem);
|
if( mem >= IPU_CMD && mem < D0_CHCR ) return psHu8(mem);
|
||||||
// Console.Warning("Unexpected hwRead16 from 0x%x", mem);
|
// Console.Warning("Unexpected hwRead16 from 0x%x", mem);
|
||||||
|
|
||||||
|
|
|
@ -392,7 +392,7 @@ static void intExecuteBiosStub()
|
||||||
{
|
{
|
||||||
g_EEFreezeRegs = false;
|
g_EEFreezeRegs = false;
|
||||||
|
|
||||||
// We need to be weary of events that could occur during vsyncs, which means
|
// We need to be wary of events that could occur during vsyncs, which means
|
||||||
// making sure to exit this function for ExitCpuExecute. The calling function
|
// making sure to exit this function for ExitCpuExecute. The calling function
|
||||||
// will update UI status, and then re-enter if the bios stub execution criteria
|
// will update UI status, and then re-enter if the bios stub execution criteria
|
||||||
// wasn't met yet.
|
// wasn't met yet.
|
||||||
|
|
|
@ -335,6 +335,7 @@ AppConfig::AppConfig()
|
||||||
|
|
||||||
McdEnableNTFS = true;
|
McdEnableNTFS = true;
|
||||||
EnableSpeedHacks = false;
|
EnableSpeedHacks = false;
|
||||||
|
EnableGameFixes = false;
|
||||||
|
|
||||||
CdvdSource = CDVDsrc_Iso;
|
CdvdSource = CDVDsrc_Iso;
|
||||||
|
|
||||||
|
@ -405,6 +406,7 @@ void AppConfig::LoadSaveRootItems( IniInterface& ini )
|
||||||
IniEntry( CurrentELF );
|
IniEntry( CurrentELF );
|
||||||
|
|
||||||
IniEntry( EnableSpeedHacks );
|
IniEntry( EnableSpeedHacks );
|
||||||
|
IniEntry( EnableGameFixes );
|
||||||
|
|
||||||
ini.EnumEntry( L"CdvdSource", CdvdSource, CDVD_SourceLabels, defaults.CdvdSource );
|
ini.EnumEntry( L"CdvdSource", CdvdSource, CDVD_SourceLabels, defaults.CdvdSource );
|
||||||
}
|
}
|
||||||
|
|
|
@ -187,6 +187,7 @@ public:
|
||||||
// Master toggle for enabling or disabling all speedhacks in one fail-free swoop.
|
// Master toggle for enabling or disabling all speedhacks in one fail-free swoop.
|
||||||
// (the toggle is applied when a new EmuConfig is sent through AppCoreThread::ApplySettings)
|
// (the toggle is applied when a new EmuConfig is sent through AppCoreThread::ApplySettings)
|
||||||
bool EnableSpeedHacks;
|
bool EnableSpeedHacks;
|
||||||
|
bool EnableGameFixes;
|
||||||
|
|
||||||
wxString CurrentIso;
|
wxString CurrentIso;
|
||||||
wxString CurrentELF;
|
wxString CurrentELF;
|
||||||
|
|
|
@ -173,7 +173,7 @@ void AppCoreThread::StateCheckInThread()
|
||||||
|
|
||||||
// To simplify settings application rules and re-entry conditions, the main App's implementation
|
// To simplify settings application rules and re-entry conditions, the main App's implementation
|
||||||
// of ApplySettings requires that the caller manually ensure that the thread has been properly
|
// of ApplySettings requires that the caller manually ensure that the thread has been properly
|
||||||
// suspended. If the thread has mot been suspended, this call will fail *silently*.
|
// suspended. If the thread has not been suspended, this call will fail *silently*.
|
||||||
void AppCoreThread::ApplySettings( const Pcsx2Config& src )
|
void AppCoreThread::ApplySettings( const Pcsx2Config& src )
|
||||||
{
|
{
|
||||||
//if( m_ExecMode != ExecMode_Closed ) return;
|
//if( m_ExecMode != ExecMode_Closed ) return;
|
||||||
|
@ -181,6 +181,8 @@ void AppCoreThread::ApplySettings( const Pcsx2Config& src )
|
||||||
Pcsx2Config fixup( src );
|
Pcsx2Config fixup( src );
|
||||||
if( !g_Conf->EnableSpeedHacks )
|
if( !g_Conf->EnableSpeedHacks )
|
||||||
fixup.Speedhacks = Pcsx2Config::SpeedhackOptions();
|
fixup.Speedhacks = Pcsx2Config::SpeedhackOptions();
|
||||||
|
if( !g_Conf->EnableGameFixes )
|
||||||
|
fixup.Gamefixes = Pcsx2Config::GamefixOptions();
|
||||||
|
|
||||||
// Re-entry guard protects against cases where code wants to manually set core settings
|
// Re-entry guard protects against cases where code wants to manually set core settings
|
||||||
// which are not part of g_Conf. The subsequent call to apply g_Conf settings (which is
|
// which are not part of g_Conf. The subsequent call to apply g_Conf settings (which is
|
||||||
|
|
|
@ -309,10 +309,13 @@ namespace Panels
|
||||||
{
|
{
|
||||||
protected:
|
protected:
|
||||||
pxCheckBox* m_checkbox[NUM_OF_GAME_FIXES];
|
pxCheckBox* m_checkbox[NUM_OF_GAME_FIXES];
|
||||||
|
pxCheckBox* m_check_Enable;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
GameFixesPanel( wxWindow* parent );
|
GameFixesPanel( wxWindow* parent );
|
||||||
virtual ~GameFixesPanel() throw() { }
|
virtual ~GameFixesPanel() throw() { }
|
||||||
|
void EnableStuff();
|
||||||
|
void OnEnable_Toggled( wxCommandEvent& evt );
|
||||||
void Apply();
|
void Apply();
|
||||||
void AppStatusEvent_OnSettingsApplied();
|
void AppStatusEvent_OnSettingsApplied();
|
||||||
};
|
};
|
||||||
|
|
|
@ -19,6 +19,7 @@
|
||||||
Panels::GameFixesPanel::GameFixesPanel( wxWindow* parent ) :
|
Panels::GameFixesPanel::GameFixesPanel( wxWindow* parent ) :
|
||||||
BaseApplicableConfigPanel( parent )
|
BaseApplicableConfigPanel( parent )
|
||||||
{
|
{
|
||||||
|
|
||||||
*this += new pxStaticHeading( this, _("Some games need special settings.\nEnable them here."));
|
*this += new pxStaticHeading( this, _("Some games need special settings.\nEnable them here."));
|
||||||
|
|
||||||
wxStaticBoxSizer& groupSizer = *new wxStaticBoxSizer( wxVERTICAL, this, _("PCSX2 Gamefixes") );
|
wxStaticBoxSizer& groupSizer = *new wxStaticBoxSizer( wxVERTICAL, this, _("PCSX2 Gamefixes") );
|
||||||
|
@ -69,12 +70,20 @@ Panels::GameFixesPanel::GameFixesPanel( wxWindow* parent ) :
|
||||||
m_checkbox[i]->SetToolTip( check_text[i].tooltip );
|
m_checkbox[i]->SetToolTip( check_text[i].tooltip );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
m_check_Enable = new pxCheckBox( this, _("Enable game fixes"),
|
||||||
|
_("(Warning, can cause compatibility or performance issues!)"));
|
||||||
|
m_check_Enable->SetToolTip(_("The safest way to make sure that all game fixes are completely disabled."));
|
||||||
|
m_check_Enable ->SetValue( g_Conf->EnableGameFixes );
|
||||||
|
|
||||||
*this += groupSizer | wxSF.Centre();
|
*this += groupSizer | wxSF.Centre();
|
||||||
|
|
||||||
|
*this += m_check_Enable;
|
||||||
*this += new pxStaticHeading( this, pxE( ".Panels:Gamefixes:Compat Warning",
|
*this += new pxStaticHeading( this, pxE( ".Panels:Gamefixes:Compat Warning",
|
||||||
L"Enabling game fixes can cause compatibility or performance issues in other games. You "
|
L"Enabling game fixes can cause compatibility or performance issues in other games. You "
|
||||||
L"will need to turn off fixes manually when changing games."
|
L"will need to turn off fixes manually when changing games."
|
||||||
));
|
));
|
||||||
|
Connect( m_check_Enable->GetId(), wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( GameFixesPanel::OnEnable_Toggled ) );
|
||||||
|
EnableStuff();
|
||||||
|
|
||||||
AppStatusEvent_OnSettingsApplied();
|
AppStatusEvent_OnSettingsApplied();
|
||||||
}
|
}
|
||||||
|
@ -82,19 +91,41 @@ Panels::GameFixesPanel::GameFixesPanel( wxWindow* parent ) :
|
||||||
// I could still probably get rid of the for loop, but I think this is clearer.
|
// I could still probably get rid of the for loop, but I think this is clearer.
|
||||||
void Panels::GameFixesPanel::Apply()
|
void Panels::GameFixesPanel::Apply()
|
||||||
{
|
{
|
||||||
|
g_Conf->EnableGameFixes = m_check_Enable->GetValue();
|
||||||
|
|
||||||
Pcsx2Config::GamefixOptions& opts( g_Conf->EmuOptions.Gamefixes );
|
Pcsx2Config::GamefixOptions& opts( g_Conf->EmuOptions.Gamefixes );
|
||||||
for (int i = 0; i < NUM_OF_GAME_FIXES; i++)
|
for (int i = 0; i < NUM_OF_GAME_FIXES; i++)
|
||||||
{
|
{
|
||||||
if (m_checkbox[i]->GetValue())
|
if (m_checkbox[i]->GetValue())
|
||||||
|
{
|
||||||
opts.bitset |= (1 << i);
|
opts.bitset |= (1 << i);
|
||||||
|
}
|
||||||
else
|
else
|
||||||
|
{
|
||||||
opts.bitset &= ~(1 << i);
|
opts.bitset &= ~(1 << i);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void Panels::GameFixesPanel::EnableStuff()
|
||||||
|
{
|
||||||
|
for (int i = 0; i < NUM_OF_GAME_FIXES; i++)
|
||||||
|
{
|
||||||
|
m_checkbox[i]->Enable(m_check_Enable->GetValue());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void Panels::GameFixesPanel::OnEnable_Toggled( wxCommandEvent& evt )
|
||||||
|
{
|
||||||
|
EnableStuff();
|
||||||
|
evt.Skip();
|
||||||
}
|
}
|
||||||
|
|
||||||
void Panels::GameFixesPanel::AppStatusEvent_OnSettingsApplied()
|
void Panels::GameFixesPanel::AppStatusEvent_OnSettingsApplied()
|
||||||
{
|
{
|
||||||
const Pcsx2Config::GamefixOptions& opts( g_Conf->EmuOptions.Gamefixes );
|
const Pcsx2Config::GamefixOptions& opts( g_Conf->EmuOptions.Gamefixes );
|
||||||
for( int i=0; i<NUM_OF_GAME_FIXES; ++i )
|
for( int i=0; i<NUM_OF_GAME_FIXES; ++i )
|
||||||
|
{
|
||||||
m_checkbox[i]->SetValue( !!(opts.bitset & (1 << i)) );
|
m_checkbox[i]->SetValue( !!(opts.bitset & (1 << i)) );
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -140,6 +140,10 @@ union name \
|
||||||
{ \
|
{ \
|
||||||
u64 _u64; \
|
u64 _u64; \
|
||||||
u32 _u32[2]; \
|
u32 _u32[2]; \
|
||||||
|
/*void operator = (const GSVector4i& v) {GSVector4i::storel(this, v);} \
|
||||||
|
bool operator == (const union name& r) const {return ((GSVector4i)r).eq(*this);} \
|
||||||
|
bool operator != (const union name& r) const {return !((GSVector4i)r).eq(*this);} \
|
||||||
|
operator GSVector4i() const {return GSVector4i::loadl(this);}*/ \
|
||||||
struct { \
|
struct { \
|
||||||
|
|
||||||
#define REG128(name)\
|
#define REG128(name)\
|
||||||
|
@ -411,14 +415,8 @@ REG_SET_END
|
||||||
#define SET_GIF_REG(gifTag, iRegNo, uiValue) \
|
#define SET_GIF_REG(gifTag, iRegNo, uiValue) \
|
||||||
{((GIFTag*)&gifTag)->u64[1] |= (((uiValue) & 0xf) << ((iRegNo) << 2));}
|
{((GIFTag*)&gifTag)->u64[1] |= (((uiValue) & 0xf) << ((iRegNo) << 2));}
|
||||||
|
|
||||||
#ifdef _M_AMD64
|
|
||||||
#define GET_GIF_REG(tag, reg) \
|
|
||||||
(((tag).u64[1] >> ((reg) << 2)) & 0xf)
|
|
||||||
#else
|
|
||||||
#define GET_GIF_REG(tag, reg) \
|
#define GET_GIF_REG(tag, reg) \
|
||||||
(((tag).u32[2 + ((reg) >> 3)] >> (((reg) & 7) << 2)) & 0xf)
|
(((tag).u32[2 + ((reg) >> 3)] >> (((reg) & 7) << 2)) & 0xf)
|
||||||
#endif
|
|
||||||
|
|
||||||
//
|
//
|
||||||
// GIFTag
|
// GIFTag
|
||||||
|
|
||||||
|
|
|
@ -485,22 +485,26 @@ extern int g_GameSettings;
|
||||||
extern GSconf conf;
|
extern GSconf conf;
|
||||||
extern int ppf;
|
extern int ppf;
|
||||||
|
|
||||||
#define PSMCT32 0
|
// PSM values
|
||||||
#define PSMCT24 1
|
// PSM types == Texture Storage Format
|
||||||
#define PSMCT16 2
|
enum PSM_value{
|
||||||
#define PSMCT16S 10
|
PSMCT32 = 0, // 000000
|
||||||
#define PSMT8 19
|
PSMCT24 = 1, // 000001
|
||||||
#define PSMT4 20
|
PSMCT16 = 2, // 000010
|
||||||
#define PSMT8H 27
|
PSMCT16S = 10, // 001010
|
||||||
#define PSMT4HL 36
|
PSMT8 = 19, // 010011
|
||||||
#define PSMT4HH 44
|
PSMT4 = 20, // 010100
|
||||||
#define PSMT32Z 48
|
PSMT8H = 27, // 011011
|
||||||
#define PSMT24Z 49
|
PSMT4HL = 36, // 100100
|
||||||
#define PSMT16Z 50
|
PSMT4HH = 44, // 101100
|
||||||
#define PSMT16SZ 58
|
PSMT32Z = 48, // 110000
|
||||||
|
PSMT24Z = 49, // 110001
|
||||||
|
PSMT16Z = 50, // 110010
|
||||||
|
PSMT16SZ = 58, // 111010
|
||||||
|
};
|
||||||
|
|
||||||
#define PSMT_ISCLUT(psm) (((psm)&0x7)>2)
|
static __forceinline bool PSMT_ISCLUT(u32 psm) { return ((psm & 0x7) > 2);}
|
||||||
#define PSMT_IS16BIT(psm) (((psm)&7)==2||((psm)&7)==10)
|
static __forceinline bool PSMT_IS16BIT(u32 psm) { return ((psm & 0x7) == 2);}
|
||||||
|
|
||||||
typedef struct {
|
typedef struct {
|
||||||
int nloop;
|
int nloop;
|
||||||
|
|
|
@ -793,7 +793,7 @@ bool ZeroGS::CDepthTarget::Create(const frameInfo& frame)
|
||||||
if( !CRenderTarget::Create(frame) )
|
if( !CRenderTarget::Create(frame) )
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
if( psm == 0x31 ) fbm = 0xff000000;
|
if( psm == PSMT24Z ) fbm = 0xff000000;
|
||||||
else fbm = 0;
|
else fbm = 0;
|
||||||
|
|
||||||
assert( glGetError() == GL_NO_ERROR );
|
assert( glGetError() == GL_NO_ERROR );
|
||||||
|
|
|
@ -707,7 +707,7 @@ void ZeroGS::VB::CheckFrame(int tbp)
|
||||||
f.fbh = prndr->fbh;
|
f.fbh = prndr->fbh;
|
||||||
f.psm = zbuf.psm;
|
f.psm = zbuf.psm;
|
||||||
|
|
||||||
if( zbuf.psm == 0x31 ) f.fbm = 0xff000000;
|
if( zbuf.psm == PSMT24Z ) f.fbm = 0xff000000;
|
||||||
else f.fbm = 0;
|
else f.fbm = 0;
|
||||||
CDepthTarget* pnewdepth = (CDepthTarget*)s_DepthRTs.GetTarg(f, CRenderTargetMngr::TO_DepthBuffer|CRenderTargetMngr::TO_StrictHeight|
|
CDepthTarget* pnewdepth = (CDepthTarget*)s_DepthRTs.GetTarg(f, CRenderTargetMngr::TO_DepthBuffer|CRenderTargetMngr::TO_StrictHeight|
|
||||||
(zbuf.zmsk?CRenderTargetMngr::TO_Virtual:0), GET_MAXHEIGHT(zbuf.zbp, gsfb.fbw, 0));
|
(zbuf.zmsk?CRenderTargetMngr::TO_Virtual:0), GET_MAXHEIGHT(zbuf.zbp, gsfb.fbw, 0));
|
||||||
|
|
Loading…
Reference in New Issue