Advertisement
MrCheeze

Untitled

Sep 8th, 2019
455
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.96 KB | None | 0 0
  1. From 50e338321b82b17e5a792479837b4e9dd1259a8f Mon Sep 17 00:00:00 2001
  2. From: MrCheeze <fishycheeze@yahoo.ca>
  3. Date: Sun, 8 Sep 2019 22:41:14 -0400
  4. Subject: [PATCH] src changes for exposing sram and flashram memory domains
  5.  
  6. ---
  7. .../Consoles/Nintendo/N64/N64.IMemoryDomains.cs | 2 ++
  8. .../Nintendo/N64/NativeApi/mupen64plusCoreApi.cs | 2 ++
  9. libmupen64plus/mupen64plus-core/src/api/debugger.c | 9 +++++++++
  10. libmupen64plus/mupen64plus-core/src/api/m64p_types.h | 2 ++
  11. 4 files changed, 15 insertions(+)
  12.  
  13. diff --git a/BizHawk.Emulation.Cores/Consoles/Nintendo/N64/N64.IMemoryDomains.cs b/BizHawk.Emulation.Cores/Consoles/Nintendo/N64/N64.IMemoryDomains.cs
  14. index f4742fa09..d6f5a091c 100644
  15. --- a/BizHawk.Emulation.Cores/Consoles/Nintendo/N64/N64.IMemoryDomains.cs
  16. +++ b/BizHawk.Emulation.Cores/Consoles/Nintendo/N64/N64.IMemoryDomains.cs
  17. @@ -90,6 +90,8 @@ namespace BizHawk.Emulation.Cores.Nintendo.N64
  18. MakeMemoryDomain("AI Register", mupen64plusApi.N64_MEMORY.AI_REG, MemoryDomain.Endian.Little);
  19.  
  20. MakeMemoryDomain("EEPROM", mupen64plusApi.N64_MEMORY.EEPROM, MemoryDomain.Endian.Little);
  21. + MakeMemoryDomain("SRAM", mupen64plusApi.N64_MEMORY.SRAM, MemoryDomain.Endian.Little);
  22. + MakeMemoryDomain("FlashRAM", mupen64plusApi.N64_MEMORY.FLASHRAM, MemoryDomain.Endian.Little);
  23.  
  24. if (_syncSettings.Controllers[0].IsConnected &&
  25. _syncSettings.Controllers[0].PakType == N64SyncSettings.N64ControllerSettings.N64ControllerPakType.MEMORY_CARD)
  26. diff --git a/BizHawk.Emulation.Cores/Consoles/Nintendo/N64/NativeApi/mupen64plusCoreApi.cs b/BizHawk.Emulation.Cores/Consoles/Nintendo/N64/NativeApi/mupen64plusCoreApi.cs
  27. index a12fe81ac..3cc7b24ec 100644
  28. --- a/BizHawk.Emulation.Cores/Consoles/Nintendo/N64/NativeApi/mupen64plusCoreApi.cs
  29. +++ b/BizHawk.Emulation.Cores/Consoles/Nintendo/N64/NativeApi/mupen64plusCoreApi.cs
  30. @@ -151,6 +151,8 @@ namespace BizHawk.Emulation.Cores.Nintendo.N64.NativeApi
  31. AI_REG,
  32.  
  33. EEPROM = 100,
  34. + SRAM,
  35. + FLASHRAM,
  36. MEMPAK1,
  37. MEMPAK2,
  38. MEMPAK3,
  39. diff --git a/libmupen64plus/mupen64plus-core/src/api/debugger.c b/libmupen64plus/mupen64plus-core/src/api/debugger.c
  40. index 4cddf33bb..92cd746cf 100644
  41. --- a/libmupen64plus/mupen64plus-core/src/api/debugger.c
  42. +++ b/libmupen64plus/mupen64plus-core/src/api/debugger.c
  43. @@ -37,6 +37,7 @@
  44. #include "debugger/dbg_memory.h"
  45. #include "debugger/debugger.h"
  46. #include "memory/memory.h"
  47. +#include "memory/pif.h"
  48. #include "r4300/r4300.h"
  49. #include "main/rom.h"
  50.  
  51. @@ -224,6 +225,10 @@ EXPORT void * CALL DebugMemGetPointer(m64p_dbg_memptr_type mem_ptr_type)
  52.  
  53. case EEPROM:
  54. return eeprom;
  55. + case M64P_DBG_PTR_SRAM:
  56. + return sram;
  57. + case M64P_DBG_PTR_FLASHRAM:
  58. + return flashram;
  59. case MEMPAK1:
  60. return mempack[0];
  61. case MEMPAK2:
  62. @@ -260,6 +265,10 @@ EXPORT int CALL MemGetSize(m64p_dbg_memptr_type mem_ptr_type)
  63.  
  64. case EEPROM:
  65. return 0x800;
  66. + case M64P_DBG_PTR_SRAM:
  67. + return 0x8000;
  68. + case M64P_DBG_PTR_FLASHRAM:
  69. + return 0x20000;
  70. case MEMPAK1:
  71. return 0x8000;
  72. case MEMPAK2:
  73. diff --git a/libmupen64plus/mupen64plus-core/src/api/m64p_types.h b/libmupen64plus/mupen64plus-core/src/api/m64p_types.h
  74. index ef1a19db7..37f2c278e 100644
  75. --- a/libmupen64plus/mupen64plus-core/src/api/m64p_types.h
  76. +++ b/libmupen64plus/mupen64plus-core/src/api/m64p_types.h
  77. @@ -266,6 +266,8 @@ typedef enum {
  78. M64P_DBG_PTR_AI_REG,
  79.  
  80. EEPROM = 100,
  81. + M64P_DBG_PTR_SRAM,
  82. + M64P_DBG_PTR_FLASHRAM,
  83. MEMPAK1,
  84. MEMPAK2,
  85. MEMPAK3,
  86. --
  87. 2.20.1.windows.1
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement