added default button to advance options dialog

git-svn-id: http://pcsx2-playground.googlecode.com/svn/trunk@119 a6443dda-0b58-4228-96e9-037be469359c
This commit is contained in:
cottonvibes 2008-09-13 19:59:33 +00:00 committed by Gregory Hainaut
parent 832ac7f609
commit af18a6c626
5 changed files with 28 additions and 13 deletions

View File

@ -66,23 +66,18 @@
#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 SLOWDVD (Config.GameFixes & 0x1) // Slow DVD access times, for games that are strict about them (Tales of the Abyss)
#define CHECK_FPUCLAMPHACK (Config.GameFixes & 0x4) // Special Fix for Tekken 5, different clamping for FPU (sets NaN to zero; doesn't clamp infinities)
#define CHECK_VUCLIPHACK (Config.GameFixes & 0x2) // Special Fix for GoW, updates the clipflag differently in recVUMI_CLIP() (note: turning this hack on, breaks Rockstar games)
//------------ DEFAULT sseMXCSR VALUES!!! ---------------
#define DEFAULT_sseMXCSR 0x9fc0 //disable all exception, round to 0, flush to 0
#define DEFAULT_sseVUMXCSR 0x7f80 //disable all exception
#define CHECK_FRAMELIMIT (Config.Options&PCSX2_FRAMELIMIT_MASK)
//#ifdef PCSX2_DEVBUILD
#define CHECK_VU0REC (Config.Options&PCSX2_VU0REC)
#define CHECK_VU1REC (Config.Options&PCSX2_VU1REC)
//#else
//// force to VU recs all the time
//#define CHECK_VU0REC 1
//#define CHECK_VU1REC 1
//
//#endif
typedef struct {
char Bios[256];

View File

@ -464,6 +464,9 @@ int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine
strcpy(Config.PluginsDir, "Plugins\\");
Config.Patch = 1;
Config.Options = PCSX2_EEREC|PCSX2_VU0REC|PCSX2_VU1REC|PCSX2_COP2REC;
Config.sseMXCSR = g_sseMXCSR;
Config.sseVUMXCSR = g_sseVUMXCSR;
SysMessage(_("Pcsx2 needs to be configured"));
Pcsx2Configure(NULL);
@ -851,6 +854,21 @@ BOOL APIENTRY AdvancedOptionsProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM
EndDialog(hDlg, TRUE);
break;
case IDDEFAULT:
Config.sseMXCSR = DEFAULT_sseMXCSR;
Config.sseVUMXCSR = DEFAULT_sseVUMXCSR;
CheckRadioButton(hDlg, IDC_EE_ROUNDMODE0, IDC_EE_ROUNDMODE3, IDC_EE_ROUNDMODE0 + ( (Config.sseMXCSR & 0x6000) >> 13));
CheckRadioButton(hDlg, IDC_VU_ROUNDMODE0, IDC_VU_ROUNDMODE3, IDC_VU_ROUNDMODE0 + ( (Config.sseVUMXCSR & 0x6000) >> 13));
CheckDlgButton(hDlg, IDC_EE_CHECK1, (Config.sseMXCSR & 0x8000) ? TRUE : FALSE);
CheckDlgButton(hDlg, IDC_VU_CHECK1, (Config.sseVUMXCSR & 0x8000) ? TRUE : FALSE);
CheckDlgButton(hDlg, IDC_EE_CHECK2, (Config.sseMXCSR & 0x0040) ? TRUE : FALSE);
CheckDlgButton(hDlg, IDC_VU_CHECK2, (Config.sseVUMXCSR & 0x0040) ? TRUE : FALSE);
break;
case IDC_EE_ROUNDMODE0:
case IDC_EE_ROUNDMODE1:
case IDC_EE_ROUNDMODE2:
@ -866,7 +884,6 @@ BOOL APIENTRY AdvancedOptionsProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM
CheckRadioButton(hDlg, IDC_VU_ROUNDMODE0, IDC_VU_ROUNDMODE3, IDC_VU_ROUNDMODE0 + ( LOWORD(wParam) % IDC_VU_ROUNDMODE0 ) );
break;
}
return TRUE;

View File

@ -899,8 +899,8 @@ STYLE DS_SETFONT | DS_MODALFRAME | DS_FIXEDSYS | WS_POPUP | WS_CAPTION | WS_SYSM
CAPTION "Advanced Options"
FONT 8, "MS Shell Dlg", 400, 0, 0x1
BEGIN
DEFPUSHBUTTON "OK",IDOK,64,142,50,14
PUSHBUTTON "Cancel",IDCANCEL,123,142,50,14
DEFPUSHBUTTON "OK",IDOK,105,142,50,14
PUSHBUTTON "Cancel",IDCANCEL,165,142,50,14
RADIOBUTTON "Nearest",IDC_EE_ROUNDMODE0,23,33,59,16
RADIOBUTTON "Negative",IDC_EE_ROUNDMODE1,23,48,49,16
RADIOBUTTON "Positive",IDC_EE_ROUNDMODE2,23,62,44,16
@ -917,6 +917,7 @@ BEGIN
RADIOBUTTON "Negative",IDC_VU_ROUNDMODE1,141,50,41,12
RADIOBUTTON "Positive",IDC_VU_ROUNDMODE2,141,65,39,12
RADIOBUTTON "Chop / Zero",IDC_VU_ROUNDMODE3,141,79,52,12
PUSHBUTTON "Defaults",IDDEFAULT,14,142,50,14
END

View File

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

View File

@ -1449,8 +1449,8 @@ void eeFPURecompileCode(R5900FNPTR_INFO xmmcode, R5900FNPTR_INFO fpucode, int xm
////////////////////////////////////////////////////
extern u8 g_MACFlagTransform[256]; // for vus
u32 g_sseMXCSR = 0x9fc0; //0x9fc0 disable all exception, round to 0, flush to 0
u32 g_sseVUMXCSR = 0x7f80;
u32 g_sseMXCSR = DEFAULT_sseMXCSR;
u32 g_sseVUMXCSR = DEFAULT_sseVUMXCSR;
void SetCPUState(u32 sseMXCSR, u32 sseVUMXCSR)
{