diff --git a/pcsx2/Misc.h b/pcsx2/Misc.h index 49f44a57f8..ef12cb5fdf 100644 --- a/pcsx2/Misc.h +++ b/pcsx2/Misc.h @@ -103,6 +103,7 @@ typedef struct { int ThPriority; int CustomFps; int Hacks; + int GameFixes; int CustomFrameSkip; int CustomConsecutiveFrames; int CustomConsecutiveSkip; diff --git a/pcsx2/windows/WinMain.c b/pcsx2/windows/WinMain.c index 138d1d028d..26aaf8de56 100644 --- a/pcsx2/windows/WinMain.c +++ b/pcsx2/windows/WinMain.c @@ -716,6 +716,34 @@ BOOL APIENTRY AdvancedProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam return FALSE; } +BOOL APIENTRY GameFixes(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam) +{ + switch (message) + { + case WM_INITDIALOG: + SetWindowText(hDlg, _("Game specific Fixes")); + if(Config.GameFixes & 0x1) CheckDlgButton(hDlg, IDC_ROUNDMODE, TRUE); + return TRUE; + + case WM_COMMAND: + if (LOWORD(wParam) == IDOK) + { + Config.GameFixes = 0; + Config.GameFixes |= IsDlgButtonChecked(hDlg, IDC_ROUNDMODE) ? 0x1 : 0; + + SaveConfig(); + + EndDialog(hDlg, TRUE); + } + else if (LOWORD(wParam) == IDCANCEL) { + EndDialog(hDlg, TRUE); + } + return TRUE; + } + + return FALSE; +} + BOOL APIENTRY HacksProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam) { //char str[256]; @@ -803,6 +831,9 @@ LRESULT WINAPI MainWndProc(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam) { case WM_COMMAND: switch (LOWORD(wParam)) { + case ID_GAMEFIXES: + DialogBox(gApp.hInstance, MAKEINTRESOURCE(IDD_GAMEFIXES), hWnd, (DLGPROC)GameFixes); + return TRUE; case ID_HACKS: DialogBox(gApp.hInstance, MAKEINTRESOURCE(IDD_HACKS), hWnd, (DLGPROC)HacksProc); return TRUE; @@ -1136,6 +1167,7 @@ void CreateMainMenu() { // ADDMENUITEM(0,_("&Advanced"), ID_CONFIG_ADVANCED); #endif ADDMENUITEM(0,_("Speed &Hacks"), ID_HACKS); + ADDMENUITEM(0,_("Gamefixes"), ID_GAMEFIXES); ADDMENUITEM(0,_("&Patches"), ID_PATCHBROWSER); ADDMENUITEM(0,_("C&pu"), ID_CONFIG_CPU); ADDMENUITEM(0,_("&Memcards"), ID_CONFIG_MEMCARDS); @@ -1301,7 +1333,6 @@ BOOL Open_File_Proc(char * filename) { return FALSE; } - //2002-09-20 (Florin) BOOL APIENTRY CmdlineProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam) { diff --git a/pcsx2/windows/ini.c b/pcsx2/windows/ini.c index 6a22778c9f..341e7a583b 100644 --- a/pcsx2/windows/ini.c +++ b/pcsx2/windows/ini.c @@ -101,6 +101,8 @@ int LoadConfig() { #endif GetPrivateProfileString("Misc", "Hacks", NULL, szValue, 20, szIniFile); Conf->Hacks = strtoul(szValue, NULL, 0); + GetPrivateProfileString("Misc", "GameFixes", NULL, szValue, 20, szIniFile); + Conf->GameFixes = strtoul(szValue, NULL, 0); #ifdef ENABLE_NLS sprintf(text, "LANGUAGE=%s", Conf->Lang); @@ -179,6 +181,8 @@ void SaveConfig() { WritePrivateProfileString("Misc","varLog",szValue,szIniFile); sprintf(szValue,"%u",Conf->Hacks); WritePrivateProfileString("Misc","Hacks",szValue,szIniFile); + sprintf(szValue,"%u",Conf->GameFixes); + WritePrivateProfileString("Misc","GameFixes",szValue,szIniFile); } diff --git a/pcsx2/windows/pcsx2.rc b/pcsx2/windows/pcsx2.rc index ec446a6625..80a9faae73 100644 --- a/pcsx2/windows/pcsx2.rc +++ b/pcsx2/windows/pcsx2.rc @@ -61,6 +61,56 @@ END ///////////////////////////////////////////////////////////////////////////// +///////////////////////////////////////////////////////////////////////////// +// German (Germany) resources + +#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_DEU) +#ifdef _WIN32 +LANGUAGE LANG_GERMAN, SUBLANG_GERMAN +#pragma code_page(1252) +#endif //_WIN32 + +///////////////////////////////////////////////////////////////////////////// +// +// Dialog +// + +IDD_GAMEFIXES DIALOGEX 0, 0, 316, 184 +STYLE DS_SETFONT | DS_MODALFRAME | DS_FIXEDSYS | WS_POPUP | WS_CAPTION | WS_SYSMENU +CAPTION "Dialog" +FONT 8, "MS Shell Dlg", 400, 0, 0x1 +BEGIN + DEFPUSHBUTTON "OK",IDOK,205,163,50,14 + PUSHBUTTON "Cancel",IDCANCEL,259,163,50,14 + LTEXT "Some games need special settings. Configure them here",IDC_STATIC,60,7,181,8 + CONTROL "Change EE Recompiler Roundmode",IDC_ROUNDMODE,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,7,25,127,10 +END + + +///////////////////////////////////////////////////////////////////////////// +// +// DESIGNINFO +// + +#ifdef APSTUDIO_INVOKED +GUIDELINES DESIGNINFO +BEGIN + IDD_GAMEFIXES, DIALOG + BEGIN + LEFTMARGIN, 7 + RIGHTMARGIN, 309 + VERTGUIDE, 60 + VERTGUIDE, 241 + TOPMARGIN, 7 + BOTTOMMARGIN, 177 + END +END +#endif // APSTUDIO_INVOKED + +#endif // German (Germany) resources +///////////////////////////////////////////////////////////////////////////// + + ///////////////////////////////////////////////////////////////////////////// // English (U.S.) resources diff --git a/pcsx2/windows/resource.h b/pcsx2/windows/resource.h index 475a4a2732..2e9f7adeb6 100644 --- a/pcsx2/windows/resource.h +++ b/pcsx2/windows/resource.h @@ -33,6 +33,7 @@ #define IDD_USERNAME 129 #define IDB_PS2SILVER 132 #define IDD_CHEATS 133 +#define IDD_GAMEFIXES 134 #define IDD_HACKS 135 #define IDD_DUMP 136 #define IDD_DUMPMEM 137 @@ -611,6 +612,7 @@ #define IDC_VUCLIPHACK 1302 #define IDC_FRAMELIMIT_OPTIONS 1303 #define IDC_FPUCLAMPHACK 1303 +#define IDC_ROUNDMODE 1304 #define IDC_LOG 1500 #define IDC_CPULOG 1500 #define IDC_MEMLOG 1501 @@ -737,13 +739,14 @@ #define ID_CHEAT_FINDER_SHOW 40100 #define ID_CHEAT_BROWSER_SHOW 40101 #define ID_HACKS 40102 +#define ID_GAMEFIXES 40103 #define ID_LANGS 50000 // Next default values for new objects // #ifdef APSTUDIO_INVOKED #ifndef APSTUDIO_READONLY_SYMBOLS -#define _APS_NEXT_RESOURCE_VALUE 136 +#define _APS_NEXT_RESOURCE_VALUE 140 #define _APS_NEXT_COMMAND_VALUE 40018 #define _APS_NEXT_CONTROL_VALUE 1304 #define _APS_NEXT_SYMED_VALUE 102 diff --git a/pcsx2/x86/ix86-32/iR5900-32.c b/pcsx2/x86/ix86-32/iR5900-32.c index 8855327c56..86e7d6742d 100644 --- a/pcsx2/x86/ix86-32/iR5900-32.c +++ b/pcsx2/x86/ix86-32/iR5900-32.c @@ -1461,7 +1461,9 @@ void SetCPUState(u32 sseMXCSR, u32 sseVUMXCSR) sseVUMXCSR &= 0xffff; if( cpucaps.hasStreamingSIMDExtensions ) { - g_sseMXCSR = sseMXCSR; + if(Config.GameFixes & 0x1) g_sseMXCSR = 0xffc0; + else g_sseMXCSR = sseMXCSR; + g_sseVUMXCSR = sseVUMXCSR; // do NOT set Denormals-Are-Zero flag (charlie and chocfac messes up) // Update 11/05/08 - Doesnt seem to effect it anymore, for the speed boost, its on :p