From f5290c789528861530ce9826a5f654948373c34d Mon Sep 17 00:00:00 2001 From: zilmar Date: Mon, 11 Feb 2013 19:28:49 +1100 Subject: [PATCH] RSP: JumpTableSize and RomOpen --- Source/RSP/Recompiler CPU.c | 7 ++++--- Source/RSP/Recompiler CPU.h | 2 +- Source/RSP/Rsp.h | 1 + 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/Source/RSP/Recompiler CPU.c b/Source/RSP/Recompiler CPU.c index 54fb0f416..f949ec5f6 100644 --- a/Source/RSP/Recompiler CPU.c +++ b/Source/RSP/Recompiler CPU.c @@ -46,7 +46,7 @@ #define X86_RECOMP_VERBOSE #define BUILD_BRANCHLABELS_VERBOSE -DWORD CompilePC, BlockID = 0; +DWORD CompilePC, JumpTableSize, BlockID = 0; DWORD dwBuffer = MainBuffer; BOOL ChangedPC; @@ -891,9 +891,10 @@ DWORD RunRecompilerCPU ( DWORD Cycles ) { BYTE * Block; RSP_Running = TRUE; - SetJumpTable(0x800); + SetJumpTable(JumpTableSize); - while (RSP_Running) { + while (RSP_Running) + { Block = *(JumpTable + (*PrgCount >> 2)); if (Block == NULL) { diff --git a/Source/RSP/Recompiler CPU.h b/Source/RSP/Recompiler CPU.h index 52f391bb5..572e319c2 100644 --- a/Source/RSP/Recompiler CPU.h +++ b/Source/RSP/Recompiler CPU.h @@ -26,7 +26,7 @@ #include "opcode.h" -extern DWORD CompilePC, NextInstruction; +extern DWORD CompilePC, NextInstruction, JumpTableSize; extern BOOL ChangedPC; #define CompilerWarning if (ShowErrors) DisplayError diff --git a/Source/RSP/Rsp.h b/Source/RSP/Rsp.h index 444fbf0b7..4b1544853 100644 --- a/Source/RSP/Rsp.h +++ b/Source/RSP/Rsp.h @@ -129,6 +129,7 @@ __declspec(dllexport) void GetDllInfo ( PLUGIN_INFO * PluginInfo ); __declspec(dllexport) void GetRspDebugInfo ( RSPDEBUG_INFO * DebugInfo ); __declspec(dllexport) void InitiateRSP ( RSP_INFO Rsp_Info, DWORD * CycleCount); __declspec(dllexport) void InitiateRSPDebugger ( DEBUG_INFO Debug_Info); +__declspec(dllexport) void RomOpen (void); __declspec(dllexport) void RomClosed (void); __declspec(dllexport) void DllConfig (HWND hWnd); __declspec(dllexport) void EnableDebugging (BOOL Enabled);