GSdx: Add GUI for disabling all CRC hacks (for testing purposes only, disabled by default). The new checkbox is at the "HW Hacks" section, and is only relevant when the global "Enable HW Hacks" box is checked.

git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5294 96395faa-99c1-11dd-bbfe-3dabce05a288
This commit is contained in:
avihal 2012-06-13 23:53:08 +00:00
parent 1ed80f320e
commit 999ff5c457
5 changed files with 16 additions and 2 deletions

View File

@ -423,6 +423,7 @@ void GSHacksDlg::OnInit()
CheckDlgButton(m_hWnd, IDC_SPRITEHACK, theApp.GetConfig("UserHacks_SpriteHack", 0)); CheckDlgButton(m_hWnd, IDC_SPRITEHACK, theApp.GetConfig("UserHacks_SpriteHack", 0));
CheckDlgButton(m_hWnd, IDC_WILDHACK, theApp.GetConfig("UserHacks_WildHack", 0)); CheckDlgButton(m_hWnd, IDC_WILDHACK, theApp.GetConfig("UserHacks_WildHack", 0));
CheckDlgButton(m_hWnd, IDC_AGGRESSIVECRC, theApp.GetConfig("UserHacks_AggressiveCRC", 0)); CheckDlgButton(m_hWnd, IDC_AGGRESSIVECRC, theApp.GetConfig("UserHacks_AggressiveCRC", 0));
CheckDlgButton(m_hWnd, IDC_CHECK_DISABLE_ALL_HACKS, theApp.GetConfig("UserHacks_DisableCrcHacks", 0));
SendMessage(GetDlgItem(m_hWnd, IDC_SKIPDRAWHACK), UDM_SETRANGE, 0, MAKELPARAM(1000, 0)); SendMessage(GetDlgItem(m_hWnd, IDC_SKIPDRAWHACK), UDM_SETRANGE, 0, MAKELPARAM(1000, 0));
SendMessage(GetDlgItem(m_hWnd, IDC_SKIPDRAWHACK), UDM_SETPOS, 0, MAKELPARAM(theApp.GetConfig("UserHacks_SkipDraw", 0), 0)); SendMessage(GetDlgItem(m_hWnd, IDC_SKIPDRAWHACK), UDM_SETPOS, 0, MAKELPARAM(theApp.GetConfig("UserHacks_SkipDraw", 0), 0));
@ -489,6 +490,14 @@ bool GSHacksDlg::OnMessage(UINT message, WPARAM wParam, LPARAM lParam)
"Only affects few games, removing some effects which might make the image sharper/clearer.\n" "Only affects few games, removing some effects which might make the image sharper/clearer.\n"
"Affected games: FFX, FFX2, FFXII, GOW2, ICO, SoTC, SSX3."; "Affected games: FFX, FFX2, FFXII, GOW2, ICO, SoTC, SSX3.";
break; break;
case IDC_CHECK_DISABLE_ALL_HACKS:
helpstr = "FOR TESTING ONLY!!\n\n"
"Disable all CRC hacks - will break many games. Overrides CrcHacksExclusion at gsdx.ini\n"
"\n"
"It's possible to exclude CRC hacks also via the gsdx.ini. E.g.:\n"
"CrcHacksExclusions=all\n"
"CrcHacksExclusions=0x0F0C4A9C, 0x0EE5646B, 0x7ACF7E03";
break;
default: default:
helpstr = "Hover over an item to get a description."; helpstr = "Hover over an item to get a description.";
break; break;
@ -513,6 +522,7 @@ bool GSHacksDlg::OnMessage(UINT message, WPARAM wParam, LPARAM lParam)
theApp.SetConfig("UserHacks_SkipDraw", (int)SendMessage(GetDlgItem(m_hWnd, IDC_SKIPDRAWHACK), UDM_GETPOS, 0, 0)); theApp.SetConfig("UserHacks_SkipDraw", (int)SendMessage(GetDlgItem(m_hWnd, IDC_SKIPDRAWHACK), UDM_GETPOS, 0, 0));
theApp.SetConfig("UserHacks_WildHack", (int)IsDlgButtonChecked(m_hWnd, IDC_WILDHACK)); theApp.SetConfig("UserHacks_WildHack", (int)IsDlgButtonChecked(m_hWnd, IDC_WILDHACK));
theApp.SetConfig("UserHacks_AggressiveCRC", (int)IsDlgButtonChecked(m_hWnd, IDC_AGGRESSIVECRC)); theApp.SetConfig("UserHacks_AggressiveCRC", (int)IsDlgButtonChecked(m_hWnd, IDC_AGGRESSIVECRC));
theApp.SetConfig("UserHacks_DisableCrcHacks", (int)IsDlgButtonChecked(m_hWnd, IDC_CHECK_DISABLE_ALL_HACKS));
EndDialog(m_hWnd, id); EndDialog(m_hWnd, id);
} break; } break;
} }

View File

@ -120,6 +120,7 @@ GSState::GSState()
s_saven = theApp.GetConfig("saven", 0); s_saven = theApp.GetConfig("saven", 0);
userHacks_AggressiveCRC = !!theApp.GetConfig("UserHacks", 0) ? theApp.GetConfig("UserHacks_AggressiveCRC", 0) : 0; userHacks_AggressiveCRC = !!theApp.GetConfig("UserHacks", 0) ? theApp.GetConfig("UserHacks_AggressiveCRC", 0) : 0;
userHacks_DisableCrcHacks = !!theApp.GetConfig("UserHacks", 0) ? theApp.GetConfig( "UserHacks_DisableCrcHacks", 0 ) : 0;
} }
GSState::~GSState() GSState::~GSState()
@ -5319,7 +5320,7 @@ bool GSState::IsBadFrame(int& skip, int UserHacks_SkipDraw)
#ifdef ENABLE_DYNAMIC_CRC_HACK #ifdef ENABLE_DYNAMIC_CRC_HACK
bool res=false; if(IsInvokedDynamicCrcHack(fi, skip, g_crc_region, res, m_crc)){ if( !res ) return false; } else bool res=false; if(IsInvokedDynamicCrcHack(fi, skip, g_crc_region, res, m_crc)){ if( !res ) return false; } else
#endif #endif
if(gsc && !gsc(fi, skip)) if(gsc && !userHacks_DisableCrcHacks && !gsc(fi, skip))
{ {
return false; return false;
} }

View File

@ -139,6 +139,7 @@ class GSState : public GSAlignedClass<32>
protected: protected:
bool IsBadFrame(int& skip, int UserHacks_SkipDraw); bool IsBadFrame(int& skip, int UserHacks_SkipDraw);
int userHacks_AggressiveCRC; int userHacks_AggressiveCRC;
int userHacks_DisableCrcHacks;
GSVertex m_v; GSVertex m_v;
float m_q; float m_q;

View File

@ -94,6 +94,7 @@ BEGIN
CONTROL "WildArmsOffset",IDC_WILDHACK,"Button",BS_AUTO3STATE | WS_TABSTOP,14,105,64,10 CONTROL "WildArmsOffset",IDC_WILDHACK,"Button",BS_AUTO3STATE | WS_TABSTOP,14,105,64,10
LTEXT "TEXT_GOES_HERE",IDC_HACK_DESCRIPTION,92,20,209,145 LTEXT "TEXT_GOES_HERE",IDC_HACK_DESCRIPTION,92,20,209,145
CONTROL "Aggressive-CRC",IDC_AGGRESSIVECRC,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,14,122,66,10 CONTROL "Aggressive-CRC",IDC_AGGRESSIVECRC,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,14,122,66,10
CONTROL "Disable CRCs",IDC_CHECK_DISABLE_ALL_HACKS,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,15,157,58,10
END END
IDD_SHADEBOOST DIALOGEX 0, 0, 316, 129 IDD_SHADEBOOST DIALOGEX 0, 0, 316, 129

View File

@ -93,6 +93,7 @@
#define IDC_STATIC_MSAA 2074 #define IDC_STATIC_MSAA 2074
#define IDC_STATIC_SKIPDRAW 2075 #define IDC_STATIC_SKIPDRAW 2075
#define IDC_AGGRESSIVECRC 2076 #define IDC_AGGRESSIVECRC 2076
#define IDC_CHECK_DISABLE_ALL_HACKS 2077
#define IDC_COLORSPACE 3000 #define IDC_COLORSPACE 3000
#define IDR_CONVERT_FX 10000 #define IDR_CONVERT_FX 10000
#define IDR_TFX_FX 10001 #define IDR_TFX_FX 10001
@ -111,7 +112,7 @@
#ifndef APSTUDIO_READONLY_SYMBOLS #ifndef APSTUDIO_READONLY_SYMBOLS
#define _APS_NEXT_RESOURCE_VALUE 10012 #define _APS_NEXT_RESOURCE_VALUE 10012
#define _APS_NEXT_COMMAND_VALUE 32771 #define _APS_NEXT_COMMAND_VALUE 32771
#define _APS_NEXT_CONTROL_VALUE 2077 #define _APS_NEXT_CONTROL_VALUE 2078
#define _APS_NEXT_SYMED_VALUE 5000 #define _APS_NEXT_SYMED_VALUE 5000
#endif #endif
#endif #endif