diff --git a/BizHawk.Emulation.Cores/Consoles/Nintendo/N64/N64.IMemoryDomains.cs b/BizHawk.Emulation.Cores/Consoles/Nintendo/N64/N64.IMemoryDomains.cs index f4742fa094..23ba98c752 100644 --- a/BizHawk.Emulation.Cores/Consoles/Nintendo/N64/N64.IMemoryDomains.cs +++ b/BizHawk.Emulation.Cores/Consoles/Nintendo/N64/N64.IMemoryDomains.cs @@ -78,41 +78,42 @@ namespace BizHawk.Emulation.Cores.Nintendo.N64 private void InitMemoryDomains() { - //zero 07-sep-2014 - made RDRAM big endian domain, but none others. others need to be studied individually. MakeMemoryDomain("RDRAM", mupen64plusApi.N64_MEMORY.RDRAM, MemoryDomain.Endian.Big, true); MakeMemoryDomain("ROM", mupen64plusApi.N64_MEMORY.THE_ROM, MemoryDomain.Endian.Big, true); - MakeMemoryDomain("PI Register", mupen64plusApi.N64_MEMORY.PI_REG, MemoryDomain.Endian.Little); - MakeMemoryDomain("SI Register", mupen64plusApi.N64_MEMORY.SI_REG, MemoryDomain.Endian.Little); - MakeMemoryDomain("VI Register", mupen64plusApi.N64_MEMORY.VI_REG, MemoryDomain.Endian.Little); - MakeMemoryDomain("RI Register", mupen64plusApi.N64_MEMORY.RI_REG, MemoryDomain.Endian.Little); - MakeMemoryDomain("AI Register", mupen64plusApi.N64_MEMORY.AI_REG, MemoryDomain.Endian.Little); + MakeMemoryDomain("PI Register", mupen64plusApi.N64_MEMORY.PI_REG, MemoryDomain.Endian.Big, true); + MakeMemoryDomain("SI Register", mupen64plusApi.N64_MEMORY.SI_REG, MemoryDomain.Endian.Big, true); + MakeMemoryDomain("VI Register", mupen64plusApi.N64_MEMORY.VI_REG, MemoryDomain.Endian.Big, true); + MakeMemoryDomain("RI Register", mupen64plusApi.N64_MEMORY.RI_REG, MemoryDomain.Endian.Big, true); + MakeMemoryDomain("AI Register", mupen64plusApi.N64_MEMORY.AI_REG, MemoryDomain.Endian.Big, true); - MakeMemoryDomain("EEPROM", mupen64plusApi.N64_MEMORY.EEPROM, MemoryDomain.Endian.Little); + MakeMemoryDomain("EEPROM", mupen64plusApi.N64_MEMORY.EEPROM, MemoryDomain.Endian.Big, true); + MakeMemoryDomain("SRAM", mupen64plusApi.N64_MEMORY.SRAM, MemoryDomain.Endian.Big, true); + MakeMemoryDomain("FlashRAM", mupen64plusApi.N64_MEMORY.FLASHRAM, MemoryDomain.Endian.Big, true); if (_syncSettings.Controllers[0].IsConnected && _syncSettings.Controllers[0].PakType == N64SyncSettings.N64ControllerSettings.N64ControllerPakType.MEMORY_CARD) { - MakeMemoryDomain("Mempak 1", mupen64plusApi.N64_MEMORY.MEMPAK1, MemoryDomain.Endian.Little); + MakeMemoryDomain("Mempak 1", mupen64plusApi.N64_MEMORY.MEMPAK1, MemoryDomain.Endian.Big, true); } if (_syncSettings.Controllers[1].IsConnected && _syncSettings.Controllers[1].PakType == N64SyncSettings.N64ControllerSettings.N64ControllerPakType.MEMORY_CARD) { - MakeMemoryDomain("Mempak 2", mupen64plusApi.N64_MEMORY.MEMPAK2, MemoryDomain.Endian.Little); + MakeMemoryDomain("Mempak 2", mupen64plusApi.N64_MEMORY.MEMPAK2, MemoryDomain.Endian.Big, true); } if (_syncSettings.Controllers[2].IsConnected && _syncSettings.Controllers[2].PakType == N64SyncSettings.N64ControllerSettings.N64ControllerPakType.MEMORY_CARD) { - MakeMemoryDomain("Mempak 3", mupen64plusApi.N64_MEMORY.MEMPAK3, MemoryDomain.Endian.Little); + MakeMemoryDomain("Mempak 3", mupen64plusApi.N64_MEMORY.MEMPAK3, MemoryDomain.Endian.Big, true); } if (_syncSettings.Controllers[3].IsConnected && _syncSettings.Controllers[3].PakType == N64SyncSettings.N64ControllerSettings.N64ControllerPakType.MEMORY_CARD) { - MakeMemoryDomain("Mempak 4", mupen64plusApi.N64_MEMORY.MEMPAK4, MemoryDomain.Endian.Little); + MakeMemoryDomain("Mempak 4", mupen64plusApi.N64_MEMORY.MEMPAK4, MemoryDomain.Endian.Big, true); } diff --git a/BizHawk.Emulation.Cores/Consoles/Nintendo/N64/NativeApi/mupen64plusCoreApi.cs b/BizHawk.Emulation.Cores/Consoles/Nintendo/N64/NativeApi/mupen64plusCoreApi.cs index a12fe81ac7..3cc7b24ec8 100644 --- a/BizHawk.Emulation.Cores/Consoles/Nintendo/N64/NativeApi/mupen64plusCoreApi.cs +++ b/BizHawk.Emulation.Cores/Consoles/Nintendo/N64/NativeApi/mupen64plusCoreApi.cs @@ -151,6 +151,8 @@ namespace BizHawk.Emulation.Cores.Nintendo.N64.NativeApi AI_REG, EEPROM = 100, + SRAM, + FLASHRAM, MEMPAK1, MEMPAK2, MEMPAK3, diff --git a/libmupen64plus/mupen64plus-core/src/api/debugger.c b/libmupen64plus/mupen64plus-core/src/api/debugger.c index 4cddf33bb6..92cd746cf7 100644 --- a/libmupen64plus/mupen64plus-core/src/api/debugger.c +++ b/libmupen64plus/mupen64plus-core/src/api/debugger.c @@ -37,6 +37,7 @@ #include "debugger/dbg_memory.h" #include "debugger/debugger.h" #include "memory/memory.h" +#include "memory/pif.h" #include "r4300/r4300.h" #include "main/rom.h" @@ -224,6 +225,10 @@ EXPORT void * CALL DebugMemGetPointer(m64p_dbg_memptr_type mem_ptr_type) case EEPROM: return eeprom; + case M64P_DBG_PTR_SRAM: + return sram; + case M64P_DBG_PTR_FLASHRAM: + return flashram; case MEMPAK1: return mempack[0]; case MEMPAK2: @@ -260,6 +265,10 @@ EXPORT int CALL MemGetSize(m64p_dbg_memptr_type mem_ptr_type) case EEPROM: return 0x800; + case M64P_DBG_PTR_SRAM: + return 0x8000; + case M64P_DBG_PTR_FLASHRAM: + return 0x20000; case MEMPAK1: return 0x8000; case MEMPAK2: diff --git a/libmupen64plus/mupen64plus-core/src/api/m64p_types.h b/libmupen64plus/mupen64plus-core/src/api/m64p_types.h index ef1a19db76..37f2c278ea 100644 --- a/libmupen64plus/mupen64plus-core/src/api/m64p_types.h +++ b/libmupen64plus/mupen64plus-core/src/api/m64p_types.h @@ -266,6 +266,8 @@ typedef enum { M64P_DBG_PTR_AI_REG, EEPROM = 100, + M64P_DBG_PTR_SRAM, + M64P_DBG_PTR_FLASHRAM, MEMPAK1, MEMPAK2, MEMPAK3, diff --git a/output/dll/mupen64plus.dll b/output/dll/mupen64plus.dll index 0c76346eb4..05cf1d522f 100644 Binary files a/output/dll/mupen64plus.dll and b/output/dll/mupen64plus.dll differ