Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- From 50e338321b82b17e5a792479837b4e9dd1259a8f Mon Sep 17 00:00:00 2001
- From: MrCheeze <fishycheeze@yahoo.ca>
- Date: Sun, 8 Sep 2019 22:41:14 -0400
- Subject: [PATCH] src changes for exposing sram and flashram memory domains
- ---
- .../Consoles/Nintendo/N64/N64.IMemoryDomains.cs | 2 ++
- .../Nintendo/N64/NativeApi/mupen64plusCoreApi.cs | 2 ++
- libmupen64plus/mupen64plus-core/src/api/debugger.c | 9 +++++++++
- libmupen64plus/mupen64plus-core/src/api/m64p_types.h | 2 ++
- 4 files changed, 15 insertions(+)
- diff --git a/BizHawk.Emulation.Cores/Consoles/Nintendo/N64/N64.IMemoryDomains.cs b/BizHawk.Emulation.Cores/Consoles/Nintendo/N64/N64.IMemoryDomains.cs
- index f4742fa09..d6f5a091c 100644
- --- a/BizHawk.Emulation.Cores/Consoles/Nintendo/N64/N64.IMemoryDomains.cs
- +++ b/BizHawk.Emulation.Cores/Consoles/Nintendo/N64/N64.IMemoryDomains.cs
- @@ -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)
- diff --git a/BizHawk.Emulation.Cores/Consoles/Nintendo/N64/NativeApi/mupen64plusCoreApi.cs b/BizHawk.Emulation.Cores/Consoles/Nintendo/N64/NativeApi/mupen64plusCoreApi.cs
- index a12fe81ac..3cc7b24ec 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 4cddf33bb..92cd746cf 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 ef1a19db7..37f2c278e 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,
- --
- 2.20.1.windows.1
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement