mirror of https://github.com/PCSX2/pcsx2.git
Linux: Commit the latest aR5900-32.S patch, and a few Linux Gui changes.
git-svn-id: http://pcsx2-playground.googlecode.com/svn/trunk@667 a6443dda-0b58-4228-96e9-037be469359c
This commit is contained in:
parent
b9fe352299
commit
65a1ef18c8
|
@ -126,17 +126,41 @@ void SignalExit(int sig) {
|
||||||
|
|
||||||
void ExecuteCpu()
|
void ExecuteCpu()
|
||||||
{
|
{
|
||||||
|
// Make sure any left-over recovery states are cleaned up.
|
||||||
|
safe_delete( g_RecoveryState );
|
||||||
|
|
||||||
// Destroy the window. Ugly thing.
|
// Destroy the window. Ugly thing.
|
||||||
gtk_widget_destroy(MainWindow);
|
gtk_widget_destroy(MainWindow);
|
||||||
gtk_main_quit();
|
gtk_main_quit();
|
||||||
while (gtk_events_pending()) gtk_main_iteration();
|
while (gtk_events_pending()) gtk_main_iteration();
|
||||||
|
|
||||||
|
g_GameInProgress = true;
|
||||||
|
m_ReturnToGame = false;
|
||||||
|
|
||||||
signal(SIGINT, SignalExit);
|
signal(SIGINT, SignalExit);
|
||||||
signal(SIGPIPE, SignalExit);
|
signal(SIGPIPE, SignalExit);
|
||||||
|
|
||||||
g_GameInProgress = true;
|
//timeBeginPeriod( 1 );
|
||||||
Cpu->Execute();
|
|
||||||
g_GameInProgress = false;
|
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 )
|
void RunExecute( const char* elf_file, bool use_bios )
|
||||||
|
|
|
@ -52,6 +52,7 @@
|
||||||
#include "VUmicro.h"
|
#include "VUmicro.h"
|
||||||
#include "Plugins.h"
|
#include "Plugins.h"
|
||||||
#include "x86/ix86/ix86.h"
|
#include "x86/ix86/ix86.h"
|
||||||
|
#include "x86/iR5900.h"
|
||||||
|
|
||||||
/* Misc.c */
|
/* Misc.c */
|
||||||
extern void vu0Shutdown();
|
extern void vu0Shutdown();
|
||||||
|
|
|
@ -203,9 +203,6 @@ int main(int argc, char *argv[]) {
|
||||||
if (!efile) efile=GetPS2ElfName(elfname);
|
if (!efile) efile=GetPS2ElfName(elfname);
|
||||||
loadElfFile(elfname);
|
loadElfFile(elfname);
|
||||||
|
|
||||||
if( GSsetGameCRC != NULL )
|
|
||||||
GSsetGameCRC(ElfCRC, g_ZeroGSOptions);
|
|
||||||
|
|
||||||
ExecuteCpu();
|
ExecuteCpu();
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
|
|
@ -31,27 +31,27 @@ Dispatcher:
|
||||||
# ((BASEBLOCK*)(recLUT[((u32)(x)) >> 16] + (sizeof(BASEBLOCK)/4)*((x) & 0xffff)))
|
# ((BASEBLOCK*)(recLUT[((u32)(x)) >> 16] + (sizeof(BASEBLOCK)/4)*((x) & 0xffff)))
|
||||||
|
|
||||||
mov %eax,dword ptr [cpuRegs+PCOFFSET]
|
mov %eax,dword ptr [cpuRegs+PCOFFSET]
|
||||||
mov %ecx,%eax
|
mov REG_BLOCK,%eax
|
||||||
mov REG_PC,%eax
|
mov REG_PC,%eax
|
||||||
shr %eax,0x10
|
shr %eax,0x10
|
||||||
and %ecx,0xFFFF
|
and %ecx,0xFFFF
|
||||||
mov %edx,dword ptr [recLUT]
|
mov %edx,dword ptr [recLUT]
|
||||||
mov %eax,dword ptr [%edx+%eax*4]
|
mov %eax,dword ptr [%edx+%eax*4]
|
||||||
lea %ecx,[%eax+%ecx*2]
|
lea REG_BLOCK,[%eax+REG_BLOCK*2]
|
||||||
|
|
||||||
// check if startpc == cpuRegs.pc
|
// check if startpc == cpuRegs.pc
|
||||||
//and %ecx, 0x5fffffff // remove higher bits
|
//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
|
je Dispatcher_CheckPtr
|
||||||
|
|
||||||
// recompile
|
// recompile
|
||||||
push %ecx
|
push REG_BLOCK // BASEBLOCK
|
||||||
push REG_PC // pc
|
push REG_PC // pc
|
||||||
call recRecompile
|
call recRecompile
|
||||||
add %esp, 4
|
add %esp, 4
|
||||||
pop %ecx // ecx is now the REG_BLOCK
|
pop REG_BLOCK // ecx is now the REG_BLOCK
|
||||||
Dispatcher_CheckPtr:
|
Dispatcher_CheckPtr:
|
||||||
mov %eax, dword ptr [%ecx]
|
mov %eax, dword ptr [REG_BLOCK]
|
||||||
|
|
||||||
#ifdef _DEBUG
|
#ifdef _DEBUG
|
||||||
test %eax, %eax
|
test %eax, %eax
|
||||||
|
@ -135,27 +135,27 @@ DispatcherClear_Recompile:
|
||||||
DispatcherReg:
|
DispatcherReg:
|
||||||
|
|
||||||
mov %eax,dword ptr [cpuRegs+PCOFFSET]
|
mov %eax,dword ptr [cpuRegs+PCOFFSET]
|
||||||
mov %ecx,%eax
|
mov REG_BLOCK,%eax
|
||||||
mov REG_PC,%eax
|
mov REG_PC,%eax
|
||||||
shr %eax,0x10
|
shr %eax,0x10
|
||||||
and %ecx,0xFFFF
|
and REG_BLOCK,0xFFFF
|
||||||
mov %edx,dword ptr [recLUT]
|
mov %edx,dword ptr [recLUT]
|
||||||
mov %eax,dword ptr [%edx+%eax*4]
|
mov %eax,dword ptr [%edx+%eax*4]
|
||||||
lea %ecx,[%eax+%ecx*2]
|
lea REG_BLOCK,[%eax+REG_BLOCK*2]
|
||||||
|
|
||||||
// check if startpc == cpuRegs.pc
|
// check if startpc == cpuRegs.pc
|
||||||
//and %ecx, 0x5fffffff // remove higher bits
|
//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
|
je DispatcherReg_CheckPtr
|
||||||
|
|
||||||
// recompile
|
// recompile
|
||||||
push %ecx
|
push REG_BLOCK
|
||||||
push REG_PC // pc
|
push REG_PC // pc
|
||||||
call recRecompile
|
call recRecompile
|
||||||
add %esp, 4
|
add %esp, 4
|
||||||
pop %ecx
|
pop REG_BLOCK
|
||||||
DispatcherReg_CheckPtr:
|
DispatcherReg_CheckPtr:
|
||||||
mov %eax, dword ptr [%ecx]
|
mov %eax, dword ptr [REG_BLOCK]
|
||||||
|
|
||||||
#ifdef _DEBUG
|
#ifdef _DEBUG
|
||||||
test %eax, %eax
|
test %eax, %eax
|
||||||
|
|
Loading…
Reference in New Issue