added SRAM and FlashRAM memory domain support for N64

This commit is contained in:
MrCheeze 2019-09-08 22:41:14 -04:00
parent 79c4b1e846
commit 3f26d14eaa
5 changed files with 15 additions and 0 deletions

View File

@ -90,6 +90,8 @@ namespace BizHawk.Emulation.Cores.Nintendo.N64
MakeMemoryDomain("AI Register", mupen64plusApi.N64_MEMORY.AI_REG, MemoryDomain.Endian.Little);
MakeMemoryDomain("EEPROM", mupen64plusApi.N64_MEMORY.EEPROM, MemoryDomain.Endian.Little);
MakeMemoryDomain("SRAM", mupen64plusApi.N64_MEMORY.SRAM, MemoryDomain.Endian.Little);
MakeMemoryDomain("FlashRAM", mupen64plusApi.N64_MEMORY.FLASHRAM, MemoryDomain.Endian.Little);
if (_syncSettings.Controllers[0].IsConnected &&
_syncSettings.Controllers[0].PakType == N64SyncSettings.N64ControllerSettings.N64ControllerPakType.MEMORY_CARD)

View File

@ -151,6 +151,8 @@ namespace BizHawk.Emulation.Cores.Nintendo.N64.NativeApi
AI_REG,
EEPROM = 100,
SRAM,
FLASHRAM,
MEMPAK1,
MEMPAK2,
MEMPAK3,

View File

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

View File

@ -266,6 +266,8 @@ typedef enum {
M64P_DBG_PTR_AI_REG,
EEPROM = 100,
M64P_DBG_PTR_SRAM,
M64P_DBG_PTR_FLASHRAM,
MEMPAK1,
MEMPAK2,
MEMPAK3,

Binary file not shown.