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;
|
||||
|
||||
// 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);
|
||||
// Console.Warning("Unexpected hwRead16 from 0x%x", mem);
|
||||
|
||||
|
|
|
@ -392,7 +392,7 @@ static void intExecuteBiosStub()
|
|||
{
|
||||
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
|
||||
// will update UI status, and then re-enter if the bios stub execution criteria
|
||||
// wasn't met yet.
|
||||
|
|
|
@ -335,6 +335,7 @@ AppConfig::AppConfig()
|
|||
|
||||
McdEnableNTFS = true;
|
||||
EnableSpeedHacks = false;
|
||||
EnableGameFixes = false;
|
||||
|
||||
CdvdSource = CDVDsrc_Iso;
|
||||
|
||||
|
@ -405,6 +406,7 @@ void AppConfig::LoadSaveRootItems( IniInterface& ini )
|
|||
IniEntry( CurrentELF );
|
||||
|
||||
IniEntry( EnableSpeedHacks );
|
||||
IniEntry( EnableGameFixes );
|
||||
|
||||
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.
|
||||
// (the toggle is applied when a new EmuConfig is sent through AppCoreThread::ApplySettings)
|
||||
bool EnableSpeedHacks;
|
||||
bool EnableGameFixes;
|
||||
|
||||
wxString CurrentIso;
|
||||
wxString CurrentELF;
|
||||
|
|
|
@ -173,7 +173,7 @@ void AppCoreThread::StateCheckInThread()
|
|||
|
||||
// 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
|
||||
// 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 )
|
||||
{
|
||||
//if( m_ExecMode != ExecMode_Closed ) return;
|
||||
|
@ -181,6 +181,8 @@ void AppCoreThread::ApplySettings( const Pcsx2Config& src )
|
|||
Pcsx2Config fixup( src );
|
||||
if( !g_Conf->EnableSpeedHacks )
|
||||
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
|
||||
// which are not part of g_Conf. The subsequent call to apply g_Conf settings (which is
|
||||
|
|
|
@ -309,10 +309,13 @@ namespace Panels
|
|||
{
|
||||
protected:
|
||||
pxCheckBox* m_checkbox[NUM_OF_GAME_FIXES];
|
||||
pxCheckBox* m_check_Enable;
|
||||
|
||||
public:
|
||||
GameFixesPanel( wxWindow* parent );
|
||||
virtual ~GameFixesPanel() throw() { }
|
||||
void EnableStuff();
|
||||
void OnEnable_Toggled( wxCommandEvent& evt );
|
||||
void Apply();
|
||||
void AppStatusEvent_OnSettingsApplied();
|
||||
};
|
||||
|
|
|
@ -19,6 +19,7 @@
|
|||
Panels::GameFixesPanel::GameFixesPanel( wxWindow* parent ) :
|
||||
BaseApplicableConfigPanel( parent )
|
||||
{
|
||||
|
||||
*this += new pxStaticHeading( this, _("Some games need special settings.\nEnable them here."));
|
||||
|
||||
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_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 += m_check_Enable;
|
||||
*this += new pxStaticHeading( this, pxE( ".Panels:Gamefixes:Compat Warning",
|
||||
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."
|
||||
));
|
||||
Connect( m_check_Enable->GetId(), wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( GameFixesPanel::OnEnable_Toggled ) );
|
||||
EnableStuff();
|
||||
|
||||
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.
|
||||
void Panels::GameFixesPanel::Apply()
|
||||
{
|
||||
g_Conf->EnableGameFixes = m_check_Enable->GetValue();
|
||||
|
||||
Pcsx2Config::GamefixOptions& opts( g_Conf->EmuOptions.Gamefixes );
|
||||
for (int i = 0; i < NUM_OF_GAME_FIXES; i++)
|
||||
{
|
||||
if (m_checkbox[i]->GetValue())
|
||||
{
|
||||
opts.bitset |= (1 << i);
|
||||
}
|
||||
else
|
||||
{
|
||||
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()
|
||||
{
|
||||
const Pcsx2Config::GamefixOptions& opts( g_Conf->EmuOptions.Gamefixes );
|
||||
for( int i=0; i<NUM_OF_GAME_FIXES; ++i )
|
||||
{
|
||||
m_checkbox[i]->SetValue( !!(opts.bitset & (1 << i)) );
|
||||
}
|
||||
}
|
||||
|
|
|
@ -140,6 +140,10 @@ union name \
|
|||
{ \
|
||||
u64 _u64; \
|
||||
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 { \
|
||||
|
||||
#define REG128(name)\
|
||||
|
@ -411,14 +415,8 @@ REG_SET_END
|
|||
#define SET_GIF_REG(gifTag, iRegNo, uiValue) \
|
||||
{((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) \
|
||||
(((tag).u32[2 + ((reg) >> 3)] >> (((reg) & 7) << 2)) & 0xf)
|
||||
#endif
|
||||
|
||||
//
|
||||
// GIFTag
|
||||
|
||||
|
|
|
@ -485,22 +485,26 @@ extern int g_GameSettings;
|
|||
extern GSconf conf;
|
||||
extern int ppf;
|
||||
|
||||
#define PSMCT32 0
|
||||
#define PSMCT24 1
|
||||
#define PSMCT16 2
|
||||
#define PSMCT16S 10
|
||||
#define PSMT8 19
|
||||
#define PSMT4 20
|
||||
#define PSMT8H 27
|
||||
#define PSMT4HL 36
|
||||
#define PSMT4HH 44
|
||||
#define PSMT32Z 48
|
||||
#define PSMT24Z 49
|
||||
#define PSMT16Z 50
|
||||
#define PSMT16SZ 58
|
||||
// PSM values
|
||||
// PSM types == Texture Storage Format
|
||||
enum PSM_value{
|
||||
PSMCT32 = 0, // 000000
|
||||
PSMCT24 = 1, // 000001
|
||||
PSMCT16 = 2, // 000010
|
||||
PSMCT16S = 10, // 001010
|
||||
PSMT8 = 19, // 010011
|
||||
PSMT4 = 20, // 010100
|
||||
PSMT8H = 27, // 011011
|
||||
PSMT4HL = 36, // 100100
|
||||
PSMT4HH = 44, // 101100
|
||||
PSMT32Z = 48, // 110000
|
||||
PSMT24Z = 49, // 110001
|
||||
PSMT16Z = 50, // 110010
|
||||
PSMT16SZ = 58, // 111010
|
||||
};
|
||||
|
||||
#define PSMT_ISCLUT(psm) (((psm)&0x7)>2)
|
||||
#define PSMT_IS16BIT(psm) (((psm)&7)==2||((psm)&7)==10)
|
||||
static __forceinline bool PSMT_ISCLUT(u32 psm) { return ((psm & 0x7) > 2);}
|
||||
static __forceinline bool PSMT_IS16BIT(u32 psm) { return ((psm & 0x7) == 2);}
|
||||
|
||||
typedef struct {
|
||||
int nloop;
|
||||
|
|
|
@ -793,7 +793,7 @@ bool ZeroGS::CDepthTarget::Create(const frameInfo& frame)
|
|||
if( !CRenderTarget::Create(frame) )
|
||||
return false;
|
||||
|
||||
if( psm == 0x31 ) fbm = 0xff000000;
|
||||
if( psm == PSMT24Z ) fbm = 0xff000000;
|
||||
else fbm = 0;
|
||||
|
||||
assert( glGetError() == GL_NO_ERROR );
|
||||
|
|
|
@ -707,7 +707,7 @@ void ZeroGS::VB::CheckFrame(int tbp)
|
|||
f.fbh = prndr->fbh;
|
||||
f.psm = zbuf.psm;
|
||||
|
||||
if( zbuf.psm == 0x31 ) f.fbm = 0xff000000;
|
||||
if( zbuf.psm == PSMT24Z ) f.fbm = 0xff000000;
|
||||
else f.fbm = 0;
|
||||
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));
|
||||
|
|
Loading…
Reference in New Issue