From 9ed9529cfee0324f6e55fabe4ef759092a3000ad Mon Sep 17 00:00:00 2001 From: Date: Thu, 11 Feb 2016 03:04:45 -0500 Subject: [PATCH 1/6] [RSP] Fix #include Rsp.h for file system case-sensitivity. --- Source/RSP/Cpu.c | 2 +- Source/RSP/Interpreter CPU.c | 2 +- Source/RSP/Interpreter Ops.c | 2 +- Source/RSP/Mmx.c | 2 +- Source/RSP/RSP Command.c | 2 +- Source/RSP/RSP Register.c | 2 +- Source/RSP/Recompiler Analysis.c | 2 +- Source/RSP/Recompiler CPU.c | 2 +- Source/RSP/Recompiler Ops.c | 2 +- Source/RSP/Recompiler Sections.c | 2 +- Source/RSP/Sse.c | 2 +- Source/RSP/X86.c | 2 +- Source/RSP/breakpoint.c | 2 +- Source/RSP/dma.c | 2 +- Source/RSP/memory.c | 2 +- 15 files changed, 15 insertions(+), 15 deletions(-) diff --git a/Source/RSP/Cpu.c b/Source/RSP/Cpu.c index d9b221355..ea34c8318 100644 --- a/Source/RSP/Cpu.c +++ b/Source/RSP/Cpu.c @@ -27,7 +27,7 @@ #include #include #include -#include "RSP.h" +#include "Rsp.h" #include "Cpu.h" #include "RSP registers.h" #include "RSP Command.h" diff --git a/Source/RSP/Interpreter CPU.c b/Source/RSP/Interpreter CPU.c index 0c1a2aff5..ff928cf3e 100644 --- a/Source/RSP/Interpreter CPU.c +++ b/Source/RSP/Interpreter CPU.c @@ -28,7 +28,7 @@ #include #include #include "breakpoint.h" -#include "RSP.h" +#include "Rsp.h" #include "Cpu.h" #include "Interpreter Ops.h" #include "Interpreter CPU.h" diff --git a/Source/RSP/Interpreter Ops.c b/Source/RSP/Interpreter Ops.c index fc6ad1dd8..f56dfecc2 100644 --- a/Source/RSP/Interpreter Ops.c +++ b/Source/RSP/Interpreter Ops.c @@ -27,7 +27,7 @@ #include #include #include -#include "RSP.h" +#include "Rsp.h" #include "CPU.h" #include "RSP Command.h" #include "RSP Registers.h" diff --git a/Source/RSP/Mmx.c b/Source/RSP/Mmx.c index 8176bd7e7..94a8bf6ea 100644 --- a/Source/RSP/Mmx.c +++ b/Source/RSP/Mmx.c @@ -26,7 +26,7 @@ #include #include -#include "rsp.h" +#include "Rsp.h" #include "x86.h" #include "memory.h" #include "RSP registers.h" diff --git a/Source/RSP/RSP Command.c b/Source/RSP/RSP Command.c index 109b91322..dc8e03eb3 100644 --- a/Source/RSP/RSP Command.c +++ b/Source/RSP/RSP Command.c @@ -29,7 +29,7 @@ #include #include "opcode.h" -#include "RSP.h" +#include "Rsp.h" #include "CPU.h" #include "RSP Registers.h" #include "RSP Command.h" diff --git a/Source/RSP/RSP Register.c b/Source/RSP/RSP Register.c index 34e3b7fc4..6dcaf0294 100644 --- a/Source/RSP/RSP Register.c +++ b/Source/RSP/RSP Register.c @@ -27,7 +27,7 @@ #include #include #include -#include "rsp.h" +#include "Rsp.h" #include "types.h" #define GeneralPurpose 1 diff --git a/Source/RSP/Recompiler Analysis.c b/Source/RSP/Recompiler Analysis.c index 6b5c7781e..1e9051870 100644 --- a/Source/RSP/Recompiler Analysis.c +++ b/Source/RSP/Recompiler Analysis.c @@ -25,7 +25,7 @@ */ #include -#include "rsp.h" +#include "Rsp.h" #include "CPU.h" #include "Interpreter CPU.h" #include "Recompiler CPU.h" diff --git a/Source/RSP/Recompiler CPU.c b/Source/RSP/Recompiler CPU.c index 39e4f95c8..081699df5 100644 --- a/Source/RSP/Recompiler CPU.c +++ b/Source/RSP/Recompiler CPU.c @@ -28,7 +28,7 @@ #include #include #include -#include "RSP.h" +#include "Rsp.h" #include "Cpu.h" #include "Interpreter CPU.h" #include "Recompiler CPU.h" diff --git a/Source/RSP/Recompiler Ops.c b/Source/RSP/Recompiler Ops.c index c7b7db35b..e7d3aa2c2 100644 --- a/Source/RSP/Recompiler Ops.c +++ b/Source/RSP/Recompiler Ops.c @@ -26,7 +26,7 @@ #include #include -#include "RSP.h" +#include "Rsp.h" #include "CPU.h" #include "Interpreter CPU.h" #include "Interpreter Ops.h" diff --git a/Source/RSP/Recompiler Sections.c b/Source/RSP/Recompiler Sections.c index 4459ccf1a..ad18cc310 100644 --- a/Source/RSP/Recompiler Sections.c +++ b/Source/RSP/Recompiler Sections.c @@ -26,7 +26,7 @@ #include #include -#include "RSP.h" +#include "Rsp.h" #include "CPU.h" #include "Recompiler CPU.h" #include "RSP Command.h" diff --git a/Source/RSP/Sse.c b/Source/RSP/Sse.c index c6ad08a5a..898fcacf6 100644 --- a/Source/RSP/Sse.c +++ b/Source/RSP/Sse.c @@ -26,7 +26,7 @@ #include #include -#include "rsp.h" +#include "Rsp.h" #include "x86.h" #include "memory.h" #include "RSP registers.h" diff --git a/Source/RSP/X86.c b/Source/RSP/X86.c index b9227bd24..a83097539 100644 --- a/Source/RSP/X86.c +++ b/Source/RSP/X86.c @@ -26,7 +26,7 @@ #include #include -#include "rsp.h" +#include "Rsp.h" #include "x86.h" #include "memory.h" #include "RSP registers.h" diff --git a/Source/RSP/breakpoint.c b/Source/RSP/breakpoint.c index f0e9fc61e..ec9793662 100644 --- a/Source/RSP/breakpoint.c +++ b/Source/RSP/breakpoint.c @@ -26,7 +26,7 @@ #include #include -#include "rsp.h" +#include "Rsp.h" #include "CPU.h" #include "breakpoint.h" diff --git a/Source/RSP/dma.c b/Source/RSP/dma.c index 33523364a..7bdd05e73 100644 --- a/Source/RSP/dma.c +++ b/Source/RSP/dma.c @@ -26,7 +26,7 @@ #include #include -#include "RSP.h" +#include "Rsp.h" #include "RSP Registers.h" #include "memory.h" diff --git a/Source/RSP/memory.c b/Source/RSP/memory.c index c96901b49..987af3043 100644 --- a/Source/RSP/memory.c +++ b/Source/RSP/memory.c @@ -27,7 +27,7 @@ enum { MaxMaps = 32 }; #include -#include "rsp.h" +#include "Rsp.h" #include "RSP Registers.h" DWORD NoOfMaps, MapsCRC[MaxMaps], Table; From 34ae28fdea138add7ff9f4d7c1775667d8683aed Mon Sep 17 00:00:00 2001 From: Date: Thu, 11 Feb 2016 03:18:00 -0500 Subject: [PATCH 2/6] [RSP] Replace HINSTANCE/HWND/etc. with void* to match PJ64. --- Source/RSP/Rsp.h | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/Source/RSP/Rsp.h b/Source/RSP/Rsp.h index f63083637..7e4a3e761 100644 --- a/Source/RSP/Rsp.h +++ b/Source/RSP/Rsp.h @@ -64,7 +64,7 @@ typedef struct { } PLUGIN_INFO; typedef struct { - HINSTANCE hInst; + void * hInst; int MemoryBswaped; /* If this is set to TRUE, then the memory has been pre bswap on a dword (32 bits) boundry */ uint8_t * RDRAM; @@ -102,19 +102,19 @@ typedef struct { typedef struct { /* Menu */ /* Items should have an ID between 5001 and 5100 */ - HMENU hRSPMenu; + void * hRSPMenu; void (*ProcessMenuItem) ( int ID ); /* Break Points */ int UseBPoints; char BPPanelName[20]; void (*Add_BPoint) ( void ); - void (*CreateBPPanel) ( HWND hDlg, RECT rcBox ); + void (*CreateBPPanel) (void * hDlg, RECT rcBox); void (*HideBPPanel) ( void ); void (*PaintBPPanel) ( PAINTSTRUCT ps ); void (*ShowBPPanel) ( void ); - void (*RefreshBpoints) ( HWND hList ); - void (*RemoveBpoint) ( HWND hList, int index ); + void (*RefreshBpoints)(void * hList); + void (*RemoveBpoint) (void * hList, int index); void (*RemoveAllBpoint) ( void ); /* RSP command Window */ @@ -133,7 +133,7 @@ typedef struct { } DEBUG_INFO; EXPORT void CloseDLL(void); -EXPORT void DllAbout(HWND hParent); +EXPORT void DllAbout(void * hParent); EXPORT DWORD DoRspCycles(DWORD Cycles); EXPORT void GetDllInfo(PLUGIN_INFO * PluginInfo); EXPORT void GetRspDebugInfo(RSPDEBUG_INFO * DebugInfo); @@ -141,7 +141,7 @@ EXPORT void InitiateRSP(RSP_INFO Rsp_Info, DWORD * CycleCount); EXPORT void InitiateRSPDebugger(DEBUG_INFO Debug_Info); EXPORT void RomOpen(void); EXPORT void RomClosed(void); -EXPORT void DllConfig(HWND hWnd); +EXPORT void DllConfig(void * hWnd); EXPORT void EnableDebugging(BOOL Enabled); EXPORT void PluginLoaded(void); @@ -156,7 +156,7 @@ extern int DebuggingEnabled, Profiling, IndvidualBlock, ShowErrors, BreakOnStart extern DWORD CPUCore; extern DEBUG_INFO DebugInfo; extern RSP_INFO RSPInfo; -extern HINSTANCE hinstDLL; +extern void * hinstDLL; #if defined(__cplusplus) } From 41cf39284083a60ffa4a9b79993d5dd914e5aecc Mon Sep 17 00:00:00 2001 From: Date: Thu, 11 Feb 2016 03:23:15 -0500 Subject: [PATCH 3/6] [RSP] Substitute uint32_t for DWORD. --- Source/RSP/Rsp.h | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/Source/RSP/Rsp.h b/Source/RSP/Rsp.h index 7e4a3e761..38fdc9aeb 100644 --- a/Source/RSP/Rsp.h +++ b/Source/RSP/Rsp.h @@ -134,10 +134,10 @@ typedef struct { EXPORT void CloseDLL(void); EXPORT void DllAbout(void * hParent); -EXPORT DWORD DoRspCycles(DWORD Cycles); +EXPORT uint32_t DoRspCycles(uint32_t Cycles); EXPORT void GetDllInfo(PLUGIN_INFO * PluginInfo); EXPORT void GetRspDebugInfo(RSPDEBUG_INFO * DebugInfo); -EXPORT void InitiateRSP(RSP_INFO Rsp_Info, DWORD * CycleCount); +EXPORT void InitiateRSP(RSP_INFO Rsp_Info, uint32_t * CycleCount); EXPORT void InitiateRSPDebugger(DEBUG_INFO Debug_Info); EXPORT void RomOpen(void); EXPORT void RomClosed(void); @@ -145,15 +145,15 @@ EXPORT void DllConfig(void * hWnd); EXPORT void EnableDebugging(BOOL Enabled); EXPORT void PluginLoaded(void); -DWORD AsciiToHex (char * HexValue); +uint32_t AsciiToHex(char * HexValue); void DisplayError (char * Message, ...); -int GetStoredWinPos( char * WinName, DWORD * X, DWORD * Y ); +int GetStoredWinPos(char * WinName, uint32_t * X, uint32_t * Y); #define InterpreterCPU 0 #define RecompilerCPU 1 extern int DebuggingEnabled, Profiling, IndvidualBlock, ShowErrors, BreakOnStart, LogRDP, LogX86Code; -extern DWORD CPUCore; +extern uint32_t CPUCore; extern DEBUG_INFO DebugInfo; extern RSP_INFO RSPInfo; extern void * hinstDLL; From 88289a4ebf752ef69cee0f3c3feebab13d59172b Mon Sep 17 00:00:00 2001 From: Date: Thu, 11 Feb 2016 03:25:33 -0500 Subject: [PATCH 4/6] [RSP] Match BOOL w/ int for ABI strictness. --- Source/RSP/Rsp.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Source/RSP/Rsp.h b/Source/RSP/Rsp.h index 38fdc9aeb..78cc73b00 100644 --- a/Source/RSP/Rsp.h +++ b/Source/RSP/Rsp.h @@ -142,7 +142,7 @@ EXPORT void InitiateRSPDebugger(DEBUG_INFO Debug_Info); EXPORT void RomOpen(void); EXPORT void RomClosed(void); EXPORT void DllConfig(void * hWnd); -EXPORT void EnableDebugging(BOOL Enabled); +EXPORT void EnableDebugging(int Enabled); EXPORT void PluginLoaded(void); uint32_t AsciiToHex(char * HexValue); From 39387f6ec0acd68bdf08630a179ca8833f25f919 Mon Sep 17 00:00:00 2001 From: Date: Thu, 11 Feb 2016 03:31:24 -0500 Subject: [PATCH 5/6] [RSP] memory.h: Get rid of #include . --- Source/RSP/memory.h | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/Source/RSP/memory.h b/Source/RSP/memory.h index 8a31abed2..4582e0ae8 100644 --- a/Source/RSP/memory.h +++ b/Source/RSP/memory.h @@ -24,16 +24,15 @@ * */ -#include #include "types.h" int AllocateMemory ( void ); void FreeMemory ( void ); -void SetJumpTable ( DWORD End ); +void SetJumpTable (uint32_t End); -extern BYTE * RecompCode, * RecompCodeSecondary, * RecompPos; +extern uint8_t * RecompCode, * RecompCodeSecondary, * RecompPos; extern void ** JumpTable; -extern DWORD Table; +extern uint32_t Table; void RSP_LB_DMEM ( uint32_t Addr, uint8_t * Value ); void RSP_LBV_DMEM ( uint32_t Addr, int vect, int element ); From 1be25ea69801ab5e56f0ee429719562e843e1e07 Mon Sep 17 00:00:00 2001 From: Date: Thu, 11 Feb 2016 03:33:11 -0500 Subject: [PATCH 6/6] [RSP] s/types/Types --- Source/RSP/RSP Registers.h | 2 +- Source/RSP/memory.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Source/RSP/RSP Registers.h b/Source/RSP/RSP Registers.h index 5e87a2e9f..0c5a91cac 100644 --- a/Source/RSP/RSP Registers.h +++ b/Source/RSP/RSP Registers.h @@ -24,7 +24,7 @@ * */ -#include "types.h" +#include "Types.h" #define SP_STATUS_HALT 0x001 /* Bit 0: halt */ #define SP_STATUS_BROKE 0x002 /* Bit 1: broke */ diff --git a/Source/RSP/memory.h b/Source/RSP/memory.h index 4582e0ae8..497557a41 100644 --- a/Source/RSP/memory.h +++ b/Source/RSP/memory.h @@ -24,7 +24,7 @@ * */ -#include "types.h" +#include "Types.h" int AllocateMemory ( void ); void FreeMemory ( void );