diff --git a/pcsx2/CDVD.cpp b/pcsx2/CDVD.cpp index b6d92d3704..005b3cfe1a 100644 --- a/pcsx2/CDVD.cpp +++ b/pcsx2/CDVD.cpp @@ -529,9 +529,12 @@ void cdvdReadKey(u8 arg0, u16 arg1, u32 arg2, u8* key) { // Now's a good time to reload the ELF info... if( ElfCRC == 0 ) { + FreezeMMXRegs(1); ElfCRC = loadElfCRC( str ); ElfApplyPatches(); LoadGameSpecificSettings(); + GSsetGameCRC( ElfCRC, 0 ); + FreezeMMXRegs(0); } } diff --git a/pcsx2/System.cpp b/pcsx2/System.cpp index 66291160ff..6f3c0860df 100644 --- a/pcsx2/System.cpp +++ b/pcsx2/System.cpp @@ -98,7 +98,7 @@ void SysDetect() if( sysInitialized ) return; sysInitialized = true; - Notice("PCSX2 " PCSX2_VERSION " - compiled on %s", params __DATE__ ); + Notice("PCSX2 " PCSX2_VERSION " - compiled on " __DATE__ ); Notice("Savestate version: %x", params g_SaveVersion); // fixme: This line is here for the purpose of creating external ASM code. Yah. >_< diff --git a/pcsx2/windows/AboutDlg.cpp b/pcsx2/windows/AboutDlg.cpp index 77e34bb7a7..f9eb2931f8 100644 --- a/pcsx2/windows/AboutDlg.cpp +++ b/pcsx2/windows/AboutDlg.cpp @@ -27,9 +27,10 @@ HWND hW; HBITMAP hBMP, hSilverBMP; -LRESULT WINAPI AboutDlgProc(HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM lParam) { - - switch(uMsg) { +LRESULT WINAPI AboutDlgProc(HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM lParam) +{ + switch(uMsg) + { case WM_INITDIALOG: hBMP = LoadBitmap(GetModuleHandle(NULL), MAKEINTRESOURCE(SPLASH_LOGO)); hSilverBMP = LoadBitmap(GetModuleHandle(NULL), MAKEINTRESOURCE(IDB_PS2SILVER)); @@ -43,15 +44,20 @@ LRESULT WINAPI AboutDlgProc(HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM lParam) Button_SetText(GetDlgItem(hDlg, IDOK), _("OK")); Static_SetText(GetDlgItem(hDlg, IDC_PCSX_ABOUT_AUTHORS), _(LabelAuthors)); Static_SetText(GetDlgItem(hDlg, IDC_PCSX_ABOUT_GREETS), _(LabelGreets)); - return TRUE; + return TRUE; case WM_COMMAND: - switch(wParam) { + switch(wParam) + { case IDOK: - EndDialog(hDlg, TRUE ); - return TRUE; + EndDialog( hDlg, TRUE ); + return TRUE; } - break; + return FALSE; + + case WM_CLOSE: + EndDialog( hDlg, TRUE ); + return TRUE; } return FALSE; } diff --git a/pcsx2/x86/iCOP0.cpp b/pcsx2/x86/iCOP0.cpp index 29cb4be9bd..6088b6942d 100644 --- a/pcsx2/x86/iCOP0.cpp +++ b/pcsx2/x86/iCOP0.cpp @@ -49,7 +49,7 @@ static void _setupBranchTest() _eeFlushAllUnused(); // COP0 branch conditionals are based on the following equation: - // (((psHu16(DMAC_STAT) & psHu16(DMAC_PCR)) & 0x3ff) == (psHu16(DMAC_PCR) & 0x3ff)) + // (((psHu16(DMAC_STAT) | ~psHu16(DMAC_PCR)) & 0x3ff) == 0x3ff) // BC0F checks if the statement is false, BC0T checks if the statement is true. // note: We only want to compare the 16 bit values of DMAC_STAT and PCR. @@ -57,10 +57,11 @@ static void _setupBranchTest() // everything except the lower 10 bits away. MOV32MtoR( EAX, (uptr)&psHu32(DMAC_PCR) ); + MOV32ItoR( ECX, 0x3ff ); // ECX is our 10-bit mask var NOT32R( EAX ); OR32MtoR( EAX, (uptr)&psHu32(DMAC_STAT) ); - AND32ItoR( EAX, 0x3ff ); - CMP32ItoR( EAX, 0x3ff); + AND32RtoR( EAX, ECX ); + CMP32RtoR( EAX, ECX ); } void recBC0F() @@ -72,7 +73,7 @@ void recBC0F() void recBC0T() { _setupBranchTest(); - recDoBranchImm(JL32(0)); + recDoBranchImm(JNE32(0)); } void recBC0FL() @@ -84,7 +85,7 @@ void recBC0FL() void recBC0TL() { _setupBranchTest(); - recDoBranchImm_Likely(JL32(0)); + recDoBranchImm_Likely(JNE32(0)); } void recTLBR() { recCall( Interp::TLBR, -1 ); }