diff --git a/pcsx2/Misc.h b/pcsx2/Misc.h index 22b7c25ece..83415a662c 100644 --- a/pcsx2/Misc.h +++ b/pcsx2/Misc.h @@ -52,7 +52,7 @@ #define CHECK_DUALCORE (Config.Options&PCSX2_DUALCORE) #define CHECK_EEREC (Config.Options&PCSX2_EEREC) #define CHECK_COP2REC (Config.Options&PCSX2_COP2REC) // goes with ee option -//------------ SPEED HACKS!!! --------------- +//------------ SPEED/MISC HACKS!!! --------------- #define CHECK_OVERFLOW (!(Config.Hacks & 0x2)) #define CHECK_EXTRA_OVERFLOW (Config.Hacks & 0x40) // If enabled, Operands are checked for infinities before being used in the VU recs #define CHECK_FPU_OVERFLOW (!(Config.Hacks & 0x800)) @@ -65,6 +65,7 @@ #define CHECK_FASTBRANCHES (Config.Hacks & 0x80) #define CHECK_VU_EXTRA_FLAGS (!(Config.Hacks & 0x100)) // Sets correct flags in the VU recs #define CHECK_FPU_EXTRA_FLAGS (!(Config.Hacks & 0x200)) // Sets correct flags in the FPU recs +#define CHECK_ESCAPE_HACK (Config.Hacks & 0x400) //------------ SPECIAL GAME FIXES!!! --------------- //#define CHECK_FPUCLAMPHACK (Config.GameFixes & 0x1) // Special Fix for GT4, different clamping for FPU (Note: sets negative infinity to positive fMax when clamping, which the real ps2 doesn't do) diff --git a/pcsx2/windows/WinMain.c b/pcsx2/windows/WinMain.c index 01a5869c28..8505eab30e 100644 --- a/pcsx2/windows/WinMain.c +++ b/pcsx2/windows/WinMain.c @@ -621,13 +621,14 @@ void CALLBACK KeyEvent(keyEvent* ev) } #endif - /* - ClosePlugins(); - SysClose(); - //ReleasePlugins(); - //needReset = 1; - //efile = 0; - exit(0);*/ + if (CHECK_ESCAPE_HACK) { + ClosePlugins(); + SysClose(); + //ReleasePlugins(); + //needReset = 1; + //efile = 0; + exit(0); + } ClosePlugins(); @@ -763,7 +764,7 @@ BOOL APIENTRY HacksProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam) { 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_DENORMALS, 2); + 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); @@ -782,6 +783,7 @@ BOOL APIENTRY HacksProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam) { 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) diff --git a/pcsx2/windows/pcsx2.rc b/pcsx2/windows/pcsx2.rc index 6470a4013f..8c5194f100 100644 --- a/pcsx2/windows/pcsx2.rc +++ b/pcsx2/windows/pcsx2.rc @@ -1032,13 +1032,13 @@ BEGIN CONTROL 132,IDC_PS2SILVER_RECT,"Static",SS_BITMAP,0,167,70,74 END -IDD_HACKS DIALOGEX 0, 0, 511, 295 +IDD_HACKS DIALOGEX 0, 0, 511, 313 STYLE DS_SETFONT | DS_MODALFRAME | DS_FIXEDSYS | WS_POPUP | WS_CAPTION | WS_SYSMENU CAPTION "PCSX2 Speed Hacks" FONT 8, "MS Shell Dlg", 400, 0, 0x1 BEGIN - DEFPUSHBUTTON "OK",IDOK,205,274,50,14 - PUSHBUTTON "Cancel",IDCANCEL,261,274,50,14 + DEFPUSHBUTTON "OK",IDOK,205,292,50,14 + PUSHBUTTON "Cancel",IDCANCEL,261,292,50,14 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 CONTROL "Disable VU Overflow Checks - *Checked = Disables overflow checks. ( Speedup! ) *Greyed = Extra overflow checks. ( Helps SPS, Slow! )",IDC_VU_OVERFLOWHACK, @@ -1059,12 +1059,14 @@ BEGIN CONTROL "Disable Underflow Checks - *Checked = Disables underflow checks. ( Speedup! )",IDC_DENORMALS, "Button",BS_AUTOCHECKBOX | WS_TABSTOP,15,77,319,10 GROUPBOX "Sync Hacks",IDC_STATIC,7,149,497,63 - GROUPBOX "Miscellaneous",IDC_STATIC,7,216,497,50 + GROUPBOX "Miscellaneous",IDC_STATIC,7,216,497,61 GROUPBOX "Flag Setting",IDC_STATIC,7,100,497,41 CONTROL "Disable Extra VU Flags - When checked, PCSX2 doesn't set some flags that are rarely used by games. ( Speedup! )",IDC_VU_FLAGS, "Button",BS_AUTOCHECKBOX | WS_TABSTOP,15,113,442,10 CONTROL "Disable Extra FPU Flags - When checked, PCSX2 doesn't set some flags that are rarely used by games. ( Speedup! )",IDC_FPU_FLAGS, "Button",BS_AUTOCHECKBOX | WS_TABSTOP,15,126,414,10 + CONTROL "Escape Hack - Use Esc key to fully exit PCSX2.",IDC_ESCHACK, + "Button",BS_AUTOCHECKBOX | WS_TABSTOP,15,259,421,10 END @@ -1088,7 +1090,7 @@ BEGIN RIGHTMARGIN, 504 VERTGUIDE, 15 TOPMARGIN, 7 - BOTTOMMARGIN, 288 + BOTTOMMARGIN, 306 END END #endif // APSTUDIO_INVOKED diff --git a/pcsx2/windows/resource.h b/pcsx2/windows/resource.h index 8c87f5a329..26d4c6d5fe 100644 --- a/pcsx2/windows/resource.h +++ b/pcsx2/windows/resource.h @@ -624,6 +624,8 @@ #define IDC_VU_CHECK2 1303 #define IDC_FPU_FLAGS 1303 #define IDC_ROUNDMODE 1304 +#define IDC_SOUNDHACK2 1304 +#define IDC_ESCHACK 1304 #define IDC_EE_ROUNDMODE0 1305 #define IDC_EE_ROUNDMODE1 1306 #define IDC_EE_ROUNDMODE2 1307