diff --git a/pcsx2/Linux/GtkGui.cpp b/pcsx2/Linux/GtkGui.cpp index 51c415a759..64d5606884 100644 --- a/pcsx2/Linux/GtkGui.cpp +++ b/pcsx2/Linux/GtkGui.cpp @@ -126,17 +126,41 @@ void SignalExit(int sig) { void ExecuteCpu() { + // Make sure any left-over recovery states are cleaned up. + safe_delete( g_RecoveryState ); + // Destroy the window. Ugly thing. gtk_widget_destroy(MainWindow); gtk_main_quit(); while (gtk_events_pending()) gtk_main_iteration(); + + g_GameInProgress = true; + m_ReturnToGame = false; signal(SIGINT, SignalExit); signal(SIGPIPE, SignalExit); - g_GameInProgress = true; - Cpu->Execute(); - g_GameInProgress = false; + //timeBeginPeriod( 1 ); + + if( CHECK_EEREC ) + { + while( !m_ReturnToGame ) + { + recExecute(); + SysUpdate(); + } + } + else + { + while( !m_ReturnToGame ) + { + Cpu->Execute(); + SysUpdate(); + } + } + + //timeEndPeriod( 1 ); + } void RunExecute( const char* elf_file, bool use_bios ) diff --git a/pcsx2/Linux/Linux.h b/pcsx2/Linux/Linux.h index 0d6be3a8e4..169ec93073 100644 --- a/pcsx2/Linux/Linux.h +++ b/pcsx2/Linux/Linux.h @@ -52,6 +52,7 @@ #include "VUmicro.h" #include "Plugins.h" #include "x86/ix86/ix86.h" +#include "x86/iR5900.h" /* Misc.c */ extern void vu0Shutdown(); diff --git a/pcsx2/Linux/LnxMain.cpp b/pcsx2/Linux/LnxMain.cpp index 3f2e80c27f..bd0b5bc6cf 100644 --- a/pcsx2/Linux/LnxMain.cpp +++ b/pcsx2/Linux/LnxMain.cpp @@ -203,9 +203,6 @@ int main(int argc, char *argv[]) { if (!efile) efile=GetPS2ElfName(elfname); loadElfFile(elfname); - if( GSsetGameCRC != NULL ) - GSsetGameCRC(ElfCRC, g_ZeroGSOptions); - ExecuteCpu(); return 0; diff --git a/pcsx2/x86/ix86-32/aR5900-32.S b/pcsx2/x86/ix86-32/aR5900-32.S index 23b60d73a1..d87fe26605 100644 --- a/pcsx2/x86/ix86-32/aR5900-32.S +++ b/pcsx2/x86/ix86-32/aR5900-32.S @@ -31,27 +31,27 @@ Dispatcher: # ((BASEBLOCK*)(recLUT[((u32)(x)) >> 16] + (sizeof(BASEBLOCK)/4)*((x) & 0xffff))) mov %eax,dword ptr [cpuRegs+PCOFFSET] - mov %ecx,%eax + mov REG_BLOCK,%eax mov REG_PC,%eax shr %eax,0x10 and %ecx,0xFFFF mov %edx,dword ptr [recLUT] mov %eax,dword ptr [%edx+%eax*4] - lea %ecx,[%eax+%ecx*2] + lea REG_BLOCK,[%eax+REG_BLOCK*2] // check if startpc == cpuRegs.pc //and %ecx, 0x5fffffff // remove higher bits - cmp REG_PC, dword ptr [%ecx+BLOCKTYPE_STARTPC] + cmp REG_PC, dword ptr [REG_BLOCK+BLOCKTYPE_STARTPC] je Dispatcher_CheckPtr // recompile - push %ecx + push REG_BLOCK // BASEBLOCK push REG_PC // pc call recRecompile add %esp, 4 - pop %ecx // ecx is now the REG_BLOCK + pop REG_BLOCK // ecx is now the REG_BLOCK Dispatcher_CheckPtr: - mov %eax, dword ptr [%ecx] + mov %eax, dword ptr [REG_BLOCK] #ifdef _DEBUG test %eax, %eax @@ -135,27 +135,27 @@ DispatcherClear_Recompile: DispatcherReg: mov %eax,dword ptr [cpuRegs+PCOFFSET] - mov %ecx,%eax + mov REG_BLOCK,%eax mov REG_PC,%eax shr %eax,0x10 - and %ecx,0xFFFF + and REG_BLOCK,0xFFFF mov %edx,dword ptr [recLUT] mov %eax,dword ptr [%edx+%eax*4] - lea %ecx,[%eax+%ecx*2] + lea REG_BLOCK,[%eax+REG_BLOCK*2] // check if startpc == cpuRegs.pc //and %ecx, 0x5fffffff // remove higher bits - cmp REG_PC, dword ptr [%ecx+BLOCKTYPE_STARTPC] + cmp REG_PC, dword ptr [REG_BLOCK+BLOCKTYPE_STARTPC] je DispatcherReg_CheckPtr // recompile - push %ecx + push REG_BLOCK push REG_PC // pc call recRecompile add %esp, 4 - pop %ecx + pop REG_BLOCK DispatcherReg_CheckPtr: - mov %eax, dword ptr [%ecx] + mov %eax, dword ptr [REG_BLOCK] #ifdef _DEBUG test %eax, %eax