speedhacks now have "compatibility" and "speed" profiles to help avoid confusion.

compatibility mode: most games will work with this setting.
speed mode: fast settings, will break games.

note:
some games will still require manually tweaking the hacks. GT4 for example needs "Extra VU Overflow Checks" (greyed checkbox)
but the majority of games should work with "compatibility" mode.
there are also some odd games that will work better with "speed" mode, Rogue Galaxy for example.

anyways, hopefully these profiles will help avoid confusion.

git-svn-id: http://pcsx2-playground.googlecode.com/svn/trunk@138 a6443dda-0b58-4228-96e9-037be469359c
This commit is contained in:
cottonvibes 2008-09-22 22:12:42 +00:00 committed by Gregory Hainaut
parent e7bc472969
commit 4d1280c69b
3 changed files with 90 additions and 42 deletions

View File

@ -751,52 +751,97 @@ BOOL APIENTRY GameFixes(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam)
return FALSE; return FALSE;
} }
#define HacksInit() \
{ \
if(Config.Hacks & 0x1) CheckDlgButton(hDlg, IDC_SYNCHACK, TRUE); \
if(Config.Hacks & 0x2) CheckDlgButton(hDlg, IDC_VU_OVERFLOWHACK, TRUE); \
if(Config.Hacks & 0x4) CheckDlgButton(hDlg, IDC_SOUNDHACK, TRUE); \
if(Config.Hacks & 0x8) CheckDlgButton(hDlg, IDC_DENORMALS, TRUE); \
if(Config.Hacks & 0x10) CheckDlgButton(hDlg, IDC_SYNCHACK2, TRUE); \
if(Config.Hacks & 0x20) CheckDlgButton(hDlg, IDC_SYNCHACK3, TRUE); \
if(Config.Hacks & 0x40) CheckDlgButton(hDlg, IDC_VU_OVERFLOWHACK, 2); \
if(Config.Hacks & 0x80) CheckDlgButton(hDlg, IDC_FASTBRANCHES, TRUE); \
if(Config.Hacks & 0x100) CheckDlgButton(hDlg, IDC_VU_FLAGS, TRUE); \
if(Config.Hacks & 0x200) CheckDlgButton(hDlg, IDC_FPU_FLAGS, TRUE); \
if(Config.Hacks & 0x400) CheckDlgButton(hDlg, IDC_ESCHACK, TRUE); \
if(Config.Hacks & 0x800) CheckDlgButton(hDlg, IDC_FPU_OVERFLOWHACK, TRUE); \
if(Config.Hacks & 0x1000) CheckDlgButton(hDlg, IDC_FPU_OVERFLOWHACK, 2); \
}
#define HacksChecked() \
{ \
Config.Hacks = 0; \
Config.Hacks |= IsDlgButtonChecked(hDlg, IDC_SYNCHACK) ? 0x1 : 0; \
/* 0x40 == greyed checkbox (extra overflow checking); 0x2 == checked (disable overflow checking) */ \
Config.Hacks |= ( IsDlgButtonChecked(hDlg, IDC_VU_OVERFLOWHACK) == 2 ) ? 0x40 : (IsDlgButtonChecked(hDlg, IDC_VU_OVERFLOWHACK) ? 0x2 : 0); \
Config.Hacks |= IsDlgButtonChecked(hDlg, IDC_SOUNDHACK) ? 0x4 : 0; \
Config.Hacks |= IsDlgButtonChecked(hDlg, IDC_DENORMALS) ? 0x8 : 0; \
Config.Hacks |= IsDlgButtonChecked(hDlg, IDC_SYNCHACK2) ? 0x10 : 0; \
Config.Hacks |= IsDlgButtonChecked(hDlg, IDC_SYNCHACK3) ? 0x20 : 0; \
Config.Hacks |= IsDlgButtonChecked(hDlg, IDC_FASTBRANCHES) ? 0x80 : 0; \
Config.Hacks |= IsDlgButtonChecked(hDlg, IDC_VU_FLAGS) ? 0x100 : 0; \
Config.Hacks |= IsDlgButtonChecked(hDlg, IDC_FPU_FLAGS) ? 0x200 : 0; \
Config.Hacks |= IsDlgButtonChecked(hDlg, IDC_ESCHACK) ? 0x400 : 0; \
/* 0x1000 == greyed checkbox (extra overflow checking); 0x800 == checked (disable overflow checking)*/ \
Config.Hacks |= ( IsDlgButtonChecked(hDlg, IDC_FPU_OVERFLOWHACK) == 2 ) ? 0x1000 : (IsDlgButtonChecked(hDlg, IDC_FPU_OVERFLOWHACK) ? 0x800 : 0); \
}
BOOL APIENTRY HacksProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam) { BOOL APIENTRY HacksProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam) {
//char str[256]; //char str[256];
switch (message) { switch (message) {
case WM_INITDIALOG: case WM_INITDIALOG:
if(Config.Hacks & 0x1) CheckDlgButton(hDlg, IDC_SYNCHACK, TRUE); HacksInit();
if(Config.Hacks & 0x2) CheckDlgButton(hDlg, IDC_VU_OVERFLOWHACK, TRUE);
if(Config.Hacks & 0x4) CheckDlgButton(hDlg, IDC_SOUNDHACK, TRUE);
if(Config.Hacks & 0x8) CheckDlgButton(hDlg, IDC_DENORMALS, TRUE);
if(Config.Hacks & 0x10) CheckDlgButton(hDlg, IDC_SYNCHACK2, TRUE);
if(Config.Hacks & 0x20) CheckDlgButton(hDlg, IDC_SYNCHACK3, TRUE);
if(Config.Hacks & 0x40) CheckDlgButton(hDlg, IDC_VU_OVERFLOWHACK, 2);
if(Config.Hacks & 0x80) CheckDlgButton(hDlg, IDC_FASTBRANCHES, TRUE);
if(Config.Hacks & 0x100) CheckDlgButton(hDlg, IDC_VU_FLAGS, TRUE);
if(Config.Hacks & 0x200) CheckDlgButton(hDlg, IDC_FPU_FLAGS, TRUE);
if(Config.Hacks & 0x400) CheckDlgButton(hDlg, IDC_ESCHACK, TRUE);
if(Config.Hacks & 0x800) CheckDlgButton(hDlg, IDC_FPU_OVERFLOWHACK, TRUE);
if(Config.Hacks & 0x1000) CheckDlgButton(hDlg, IDC_FPU_OVERFLOWHACK, 2);
return TRUE; return TRUE;
case WM_COMMAND: case WM_COMMAND:
if (LOWORD(wParam) == IDOK) { switch (LOWORD(wParam)) {
Config.Hacks = 0; case IDOK:
Config.Hacks |= IsDlgButtonChecked(hDlg, IDC_SYNCHACK) ? 0x1 : 0; HacksChecked();
Config.Hacks |= ( IsDlgButtonChecked(hDlg, IDC_VU_OVERFLOWHACK) == 2 ) ? 0x40 : (IsDlgButtonChecked(hDlg, IDC_VU_OVERFLOWHACK) ? 0x2 : 0); // 0x40 == greyed checkbox (extra overflow checking); 0x2 == checked (disable overflow checking)
Config.Hacks |= IsDlgButtonChecked(hDlg, IDC_SOUNDHACK) ? 0x4 : 0;
Config.Hacks |= IsDlgButtonChecked(hDlg, IDC_DENORMALS) ? 0x8 : 0;
Config.Hacks |= IsDlgButtonChecked(hDlg, IDC_SYNCHACK2) ? 0x10 : 0;
Config.Hacks |= IsDlgButtonChecked(hDlg, IDC_SYNCHACK3) ? 0x20 : 0;
Config.Hacks |= IsDlgButtonChecked(hDlg, IDC_FASTBRANCHES) ? 0x80 : 0;
Config.Hacks |= IsDlgButtonChecked(hDlg, IDC_VU_FLAGS) ? 0x100 : 0;
Config.Hacks |= IsDlgButtonChecked(hDlg, IDC_FPU_FLAGS) ? 0x200 : 0;
Config.Hacks |= IsDlgButtonChecked(hDlg, IDC_ESCHACK) ? 0x400 : 0;
//Config.Hacks |= ( IsDlgButtonChecked(hDlg, IDC_DENORMALS) == 2 ) ? 0x408 : (IsDlgButtonChecked(hDlg, IDC_DENORMALS) ? 0x8 : 0); // 0x408 == greyed checkbox (DaZ SSE flag; so the CPU sets denormals to zero)
Config.Hacks |= ( IsDlgButtonChecked(hDlg, IDC_FPU_OVERFLOWHACK) == 2 ) ? 0x1000 : (IsDlgButtonChecked(hDlg, IDC_FPU_OVERFLOWHACK) ? 0x800 : 0); // 0x1000 == greyed checkbox (extra overflow checking); 0x800 == checked (disable overflow checking)
SaveConfig(); SaveConfig();
EndDialog(hDlg, TRUE); EndDialog(hDlg, TRUE);
} else break;
if (LOWORD(wParam) == IDCANCEL) {
case IDCANCEL:
EndDialog(hDlg, FALSE); EndDialog(hDlg, FALSE);
} else break;
return TRUE;
case IDBUTTON1:
CheckDlgButton(hDlg, IDC_VU_OVERFLOWHACK, FALSE);
CheckDlgButton(hDlg, IDC_FPU_OVERFLOWHACK, FALSE);
CheckDlgButton(hDlg, IDC_DENORMALS, TRUE);
CheckDlgButton(hDlg, IDC_VU_FLAGS, TRUE);
CheckDlgButton(hDlg, IDC_FPU_FLAGS, TRUE);
CheckDlgButton(hDlg, IDC_SYNCHACK, FALSE);
CheckDlgButton(hDlg, IDC_SYNCHACK2, FALSE);
CheckDlgButton(hDlg, IDC_SYNCHACK3, FALSE);
CheckDlgButton(hDlg, IDC_FASTBRANCHES, FALSE);
//CheckDlgButton(hDlg, IDC_SOUNDHACK, TRUE);
//CheckDlgButton(hDlg, IDC_ESCHACK, TRUE);
HacksChecked();
HacksInit();
break;
case IDBUTTON2:
CheckDlgButton(hDlg, IDC_VU_OVERFLOWHACK, TRUE);
CheckDlgButton(hDlg, IDC_FPU_OVERFLOWHACK, TRUE);
CheckDlgButton(hDlg, IDC_DENORMALS, TRUE);
CheckDlgButton(hDlg, IDC_VU_FLAGS, TRUE);
CheckDlgButton(hDlg, IDC_FPU_FLAGS, TRUE);
CheckDlgButton(hDlg, IDC_SYNCHACK, TRUE);
CheckDlgButton(hDlg, IDC_SYNCHACK2, TRUE);
CheckDlgButton(hDlg, IDC_SYNCHACK3, TRUE);
CheckDlgButton(hDlg, IDC_FASTBRANCHES, FALSE);
CheckDlgButton(hDlg, IDC_SOUNDHACK, FALSE);
//CheckDlgButton(hDlg, IDC_ESCHACK, TRUE);
HacksChecked();
HacksInit();
break;
default: return TRUE;
}
} }
return FALSE; return FALSE;

View File

@ -1035,13 +1035,13 @@ BEGIN
CONTROL 132,IDC_PS2SILVER_RECT,"Static",SS_BITMAP,0,167,70,74 CONTROL 132,IDC_PS2SILVER_RECT,"Static",SS_BITMAP,0,167,70,74
END END
IDD_HACKS DIALOGEX 0, 0, 511, 313 IDD_HACKS DIALOGEX 0, 0, 511, 314
STYLE DS_SETFONT | DS_MODALFRAME | DS_FIXEDSYS | WS_POPUP | WS_CAPTION | WS_SYSMENU STYLE DS_SETFONT | DS_MODALFRAME | DS_FIXEDSYS | WS_POPUP | WS_CAPTION | WS_SYSMENU
CAPTION "PCSX2 Speed Hacks" CAPTION "PCSX2 Speed Hacks"
FONT 8, "MS Shell Dlg", 400, 0, 0x1 FONT 8, "MS Shell Dlg", 400, 0, 0x1
BEGIN BEGIN
DEFPUSHBUTTON "OK",IDOK,205,292,50,14 DEFPUSHBUTTON "OK",IDOK,205,293,50,14
PUSHBUTTON "Cancel",IDCANCEL,261,292,50,14 PUSHBUTTON "Cancel",IDCANCEL,261,293,50,14
CONTROL "EE Sync Hack (x2) - Doubles the cycle rate of the EE. ( Big Speedup in most games! )",IDC_SYNCHACK, CONTROL "EE Sync Hack (x2) - Doubles the cycle rate of the EE. ( Big Speedup in most games! )",IDC_SYNCHACK,
"Button",BS_AUTOCHECKBOX | WS_TABSTOP,15,162,418,10 "Button",BS_AUTOCHECKBOX | WS_TABSTOP,15,162,418,10
CONTROL "Disable VU Overflow Checks - *Checked = Disables overflow checks. ( Speedup! ) *Greyed = Extra overflow checks. ( Helps SPS, Slow! )",IDC_VU_OVERFLOWHACK, CONTROL "Disable VU Overflow Checks - *Checked = Disables overflow checks. ( Speedup! ) *Greyed = Extra overflow checks. ( Helps SPS, Slow! )",IDC_VU_OVERFLOWHACK,
@ -1070,6 +1070,8 @@ BEGIN
"Button",BS_AUTOCHECKBOX | WS_TABSTOP,15,126,414,10 "Button",BS_AUTOCHECKBOX | WS_TABSTOP,15,126,414,10
CONTROL "Escape Hack - Use Esc key to fully exit PCSX2.",IDC_ESCHACK, CONTROL "Escape Hack - Use Esc key to fully exit PCSX2.",IDC_ESCHACK,
"Button",BS_AUTOCHECKBOX | WS_TABSTOP,15,259,421,10 "Button",BS_AUTOCHECKBOX | WS_TABSTOP,15,259,421,10
PUSHBUTTON "Compatibility",IDBUTTON1,15,293,50,14
PUSHBUTTON "Speed",IDBUTTON2,73,293,50,14
END END
@ -1093,7 +1095,7 @@ BEGIN
RIGHTMARGIN, 504 RIGHTMARGIN, 504
VERTGUIDE, 15 VERTGUIDE, 15
TOPMARGIN, 7 TOPMARGIN, 7
BOTTOMMARGIN, 306 BOTTOMMARGIN, 307
END END
END END
#endif // APSTUDIO_INVOKED #endif // APSTUDIO_INVOKED

View File

@ -2,8 +2,9 @@
// Microsoft Visual C++ generated include file. // Microsoft Visual C++ generated include file.
// Used by pcsx2.rc // Used by pcsx2.rc
// //
#define IDCANCEL2 3
#define IDDEFAULT 3 #define IDDEFAULT 3
#define IDBUTTON1 3
#define IDBUTTON2 4
#define IDR_MENU 101 #define IDR_MENU 101
#define IDD_CONFIG 101 #define IDD_CONFIG 101
#define IDD_MCDCONF 102 #define IDD_MCDCONF 102