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:
arcum42 2009-01-31 00:49:31 +00:00 committed by Gregory Hainaut
parent b9fe352299
commit 65a1ef18c8
4 changed files with 41 additions and 19 deletions

View File

@ -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 )

View File

@ -52,6 +52,7 @@
#include "VUmicro.h"
#include "Plugins.h"
#include "x86/ix86/ix86.h"
#include "x86/iR5900.h"
/* Misc.c */
extern void vu0Shutdown();

View File

@ -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;

View File

@ -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