diff --git a/BizHawk.Emulation.Cores/Consoles/Nintendo/SNES/LibsnesApi.cs b/BizHawk.Emulation.Cores/Consoles/Nintendo/SNES/LibsnesApi.cs index bde3a5186e..cdc470593a 100644 --- a/BizHawk.Emulation.Cores/Consoles/Nintendo/SNES/LibsnesApi.cs +++ b/BizHawk.Emulation.Cores/Consoles/Nintendo/SNES/LibsnesApi.cs @@ -202,7 +202,7 @@ namespace BizHawk.Emulation.Cores.Nintendo.SNES public void* ptr; public uint id, addr, value, size; public int port, device, index, slot; - public uint width, height; + public int width, height; public int scanline; //this should always be used in pairs diff --git a/BizHawk.Emulation.Cores/Consoles/Nintendo/SNES/LibsnesApi_BRK.cs b/BizHawk.Emulation.Cores/Consoles/Nintendo/SNES/LibsnesApi_BRK.cs index 2c50a26a61..6ac0ca9ae6 100644 --- a/BizHawk.Emulation.Cores/Consoles/Nintendo/SNES/LibsnesApi_BRK.cs +++ b/BizHawk.Emulation.Cores/Consoles/Nintendo/SNES/LibsnesApi_BRK.cs @@ -42,7 +42,7 @@ namespace BizHawk.Emulation.Cores.Nintendo.SNES } //switch(msg) - Message(eMessage.eMessage_ResumeAfterBRK); + Message(eMessage.eMessage_Resume); return true; } } diff --git a/BizHawk.Emulation.Cores/Consoles/Nintendo/SNES/LibsnesApi_Enums.cs b/BizHawk.Emulation.Cores/Consoles/Nintendo/SNES/LibsnesApi_Enums.cs index 1e2cf909c9..d704f74b8b 100644 --- a/BizHawk.Emulation.Cores/Consoles/Nintendo/SNES/LibsnesApi_Enums.cs +++ b/BizHawk.Emulation.Cores/Consoles/Nintendo/SNES/LibsnesApi_Enums.cs @@ -10,8 +10,7 @@ namespace BizHawk.Emulation.Cores.Nintendo.SNES { eMessage_NotSet, - eMessage_ResumeAfterBRK, - eMessage_Shutdown, + eMessage_Resume, eMessage_QUERY_FIRST, eMessage_QUERY_get_memory_size, diff --git a/BizHawk.Emulation.Cores/Consoles/Nintendo/SNES/LibsnesApi_SIG.cs b/BizHawk.Emulation.Cores/Consoles/Nintendo/SNES/LibsnesApi_SIG.cs index ff6fd2c781..ff901e1ff3 100644 --- a/BizHawk.Emulation.Cores/Consoles/Nintendo/SNES/LibsnesApi_SIG.cs +++ b/BizHawk.Emulation.Cores/Consoles/Nintendo/SNES/LibsnesApi_SIG.cs @@ -15,8 +15,8 @@ namespace BizHawk.Emulation.Cores.Nintendo.SNES case eMessage.eMessage_SIG_video_refresh: { - int width = (int)comm->width; - int height = (int)comm->height; + int width = comm->width; + int height = comm->height; if (video_refresh != null) { video_refresh((int*)comm->ptr, width, height); @@ -127,7 +127,7 @@ namespace BizHawk.Emulation.Cores.Nintendo.SNES } } //switch(msg) - Message(eMessage.eMessage_ResumeAfterBRK); + Message(eMessage.eMessage_Resume); return true; } } diff --git a/libsnes/bsnes/target-libsnes/libsnes_pwrap.cpp b/libsnes/bsnes/target-libsnes/libsnes_pwrap.cpp index 5a755bd3e1..9d39cece0d 100644 --- a/libsnes/bsnes/target-libsnes/libsnes_pwrap.cpp +++ b/libsnes/bsnes/target-libsnes/libsnes_pwrap.cpp @@ -16,28 +16,25 @@ #include #include -#include #include #include extern SNES::Interface *iface; typedef uint8 u8; -typedef int32 s32; +typedef uint16 u16; typedef uint64 u64; typedef uint32 u32; -typedef uint16 u16; + +typedef int32 s32; typedef void(*Action)(); - enum eMessage : int32 { eMessage_NotSet, - eMessage_ResumeAfterBRK, - - eMessage_Shutdown, + eMessage_Resume, eMessage_QUERY_FIRST, eMessage_QUERY_get_memory_size, @@ -148,14 +145,14 @@ struct CommStruct void* ptr; uint32 id, addr, value, size; int32 port, device, index, slot; - uint32 width, height; + int32 width, height; int32 scanline; //always used in pairs void* buf[2]; int32 buf_size[2]; - uint64 cdl_ptr[4]; + int64 cdl_ptr[4]; int32 cdl_size[4]; CPURegsComm cpuregs; @@ -291,8 +288,6 @@ public: HANDLE handle; }; -static std::map memHandleTable; - void* snes_allocSharedMemory(const char* memtype, size_t amt) { //its important that this happen before the message marshaling because allocation/free attempts can happen before the marshaling is setup (or at shutdown time, in case of errors?) @@ -594,7 +589,7 @@ extern "C" dllexport void* __cdecl DllInit() extern "C" dllexport void __cdecl Message(eMessage msg) { - if (msg == eMessage_ResumeAfterBRK) + if (msg == eMessage_Resume) { cothread_t temp = co_emu_suspended; co_emu_suspended = NULL;