mirror of https://github.com/PCSX2/pcsx2.git
A couple minor GUI bug fixes: - DaZ mode is now disabled for SSE1 CPUs, preventing a crash when trying to OK the setting or run the Emulator with default settings. - Emulator no longer tries to run games when a BIOS hasn't been configured (usually led to a crash).
git-svn-id: http://pcsx2-playground.googlecode.com/svn/trunk@410 a6443dda-0b58-4228-96e9-037be469359c
This commit is contained in:
parent
43720a2d27
commit
c228e982cc
|
@ -2980,7 +2980,7 @@ void loadBiosRom(char *ext, u8 *dest) {
|
|||
SysPrintf("**************\n\n\n");
|
||||
}
|
||||
|
||||
void memReset() {
|
||||
int memReset() {
|
||||
struct stat buf;
|
||||
char Bios[g_MaxPath];
|
||||
FILE *fp;
|
||||
|
@ -2998,7 +2998,7 @@ void memReset() {
|
|||
|
||||
if (stat(Bios, &buf) == -1) {
|
||||
SysMessage(_("Unable to load bios: '%s', PCSX2 can't run without that"), Bios);
|
||||
return;
|
||||
return 0;
|
||||
}
|
||||
|
||||
#ifdef PCSX2_VIRTUAL_MEM
|
||||
|
@ -3048,6 +3048,7 @@ void memReset() {
|
|||
#endif
|
||||
|
||||
#endif
|
||||
return 1;
|
||||
}
|
||||
|
||||
void memSetKernelMode() {
|
||||
|
|
|
@ -163,7 +163,7 @@ extern uptr *memLUTWU;
|
|||
#define PSMu64(mem) (*(u64*)PSM(mem))
|
||||
|
||||
int memInit();
|
||||
void memReset();
|
||||
int memReset(); // returns FALSE on error
|
||||
void memSetKernelMode();
|
||||
void memSetSupervisorMode();
|
||||
void memSetUserMode();
|
||||
|
|
|
@ -42,7 +42,7 @@
|
|||
|
||||
// --->> Path Utilities [PathUtil.c]
|
||||
|
||||
#define g_MaxPath 512
|
||||
#define g_MaxPath 255 // 255 is safer with antiquitated Win32 ASCII APIs.
|
||||
extern int g_Error_PathTooLong;
|
||||
|
||||
int isPathRooted( const char* path );
|
||||
|
|
|
@ -111,11 +111,11 @@ int cpuInit()
|
|||
return ret;
|
||||
}
|
||||
|
||||
void cpuReset()
|
||||
int cpuReset()
|
||||
{
|
||||
Cpu->Reset();
|
||||
|
||||
memReset();
|
||||
if( !memReset() ) return 0;
|
||||
|
||||
memset(&cpuRegs, 0, sizeof(cpuRegs));
|
||||
memset(&fpuRegs, 0, sizeof(fpuRegs));
|
||||
|
@ -139,6 +139,8 @@ void cpuReset()
|
|||
vif1Reset();
|
||||
rcntInit();
|
||||
psxReset();
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
void cpuShutdown()
|
||||
|
|
|
@ -225,7 +225,7 @@ extern PCSX2_ALIGNED16_DECL(tlbs tlb[48]);
|
|||
#endif
|
||||
|
||||
int cpuInit();
|
||||
void cpuReset();
|
||||
int cpuReset();
|
||||
void cpuShutdown();
|
||||
void cpuException(u32 code, u32 bd);
|
||||
void cpuTlbMissR(u32 addr, u32 bd);
|
||||
|
|
|
@ -20,7 +20,7 @@
|
|||
#define __SYSTEM_H__
|
||||
|
||||
int SysInit(); // Init mem and plugins
|
||||
void SysReset(); // Resets mem
|
||||
int SysReset(); // Resets mem
|
||||
void SysPrintf(const char *fmt, ...); // Printf used by bios syscalls
|
||||
void SysMessage(const char *fmt, ...); // Message used to print msg to users
|
||||
void SysUpdate(); // Called on VBlank (to update i.e. pads)
|
||||
|
|
|
@ -118,7 +118,7 @@ void RunExecute(int run) {
|
|||
nDisableSC = 1;
|
||||
|
||||
if (needReset == 1) {
|
||||
SysReset();
|
||||
if( !SysReset() ) return;
|
||||
}
|
||||
|
||||
if( UseGui )
|
||||
|
@ -1034,9 +1034,24 @@ BOOL APIENTRY AdvancedOptionsProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM
|
|||
if (Config.sseMXCSR & 0x8000) CheckDlgButton(hDlg, IDC_EE_CHECK1, TRUE);
|
||||
if (Config.sseVUMXCSR & 0x8000) CheckDlgButton(hDlg, IDC_VU_CHECK1, TRUE);
|
||||
|
||||
if (Config.sseMXCSR & 0x0040) CheckDlgButton(hDlg, IDC_EE_CHECK2, TRUE);
|
||||
if (Config.sseVUMXCSR & 0x0040) CheckDlgButton(hDlg, IDC_VU_CHECK2, TRUE);
|
||||
|
||||
if( !cpucaps.hasStreamingSIMD2Extensions )
|
||||
{
|
||||
// SSE1 cpus do not support Denormals Are Zero flag.
|
||||
|
||||
Config.sseMXCSR &= ~0x0040;
|
||||
Config.sseVUMXCSR &= ~0x0040;
|
||||
|
||||
EnableWindow( GetDlgItem( hDlg, IDC_EE_CHECK2 ), FALSE );
|
||||
EnableWindow( GetDlgItem( hDlg, IDC_VU_CHECK2 ), FALSE );
|
||||
CheckDlgButton( hDlg, IDC_EE_CHECK2, FALSE );
|
||||
CheckDlgButton( hDlg, IDC_VU_CHECK2, FALSE );
|
||||
}
|
||||
else
|
||||
{
|
||||
if (Config.sseMXCSR & 0x0040) CheckDlgButton(hDlg, IDC_EE_CHECK2, TRUE);
|
||||
if (Config.sseVUMXCSR & 0x0040) CheckDlgButton(hDlg, IDC_VU_CHECK2, TRUE);
|
||||
}
|
||||
|
||||
return TRUE;
|
||||
|
||||
case WM_COMMAND:
|
||||
|
@ -1079,6 +1094,14 @@ BOOL APIENTRY AdvancedOptionsProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM
|
|||
Config.sseMXCSR = DEFAULT_sseMXCSR;
|
||||
Config.sseVUMXCSR = DEFAULT_sseVUMXCSR;
|
||||
|
||||
if( !cpucaps.hasStreamingSIMD2Extensions )
|
||||
{
|
||||
// SSE1 cpus do not support Denormals Are Zero flag.
|
||||
|
||||
Config.sseMXCSR &= ~0x0040;
|
||||
Config.sseVUMXCSR &= ~0x0040;
|
||||
}
|
||||
|
||||
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));
|
||||
|
||||
|
@ -1774,11 +1797,12 @@ int SysInit() {
|
|||
return 0;
|
||||
}
|
||||
|
||||
void SysReset() {
|
||||
if (sinit == 0) return;
|
||||
int SysReset() {
|
||||
if (sinit == 0) return 1;
|
||||
StatusSet(_("Resetting..."));
|
||||
cpuReset();
|
||||
if( !cpuReset() ) return 0;
|
||||
StatusSet(_("Ready"));
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -1452,6 +1452,15 @@ void SetCPUState(u32 sseMXCSR, u32 sseVUMXCSR)
|
|||
sseMXCSR &= 0xffff; // clear the upper 16 bits since they shouldn't be set
|
||||
sseVUMXCSR &= 0xffff;
|
||||
|
||||
if( !cpucaps.hasStreamingSIMD2Extensions )
|
||||
{
|
||||
// SSE1 cpus do not support Denormals Are Zero flag (throws an exception
|
||||
// if we don't mask them off)
|
||||
|
||||
sseMXCSR &= ~0x0040;
|
||||
sseVUMXCSR &= ~0x0040;
|
||||
}
|
||||
|
||||
g_sseMXCSR = sseMXCSR;
|
||||
g_sseVUMXCSR = sseVUMXCSR;
|
||||
// do NOT set Denormals-Are-Zero flag (charlie and chocfac messes up)
|
||||
|
|
Loading…
Reference in New Issue