diff --git a/BizHawk.Emulation.Cores/BizHawk.Emulation.Cores.csproj b/BizHawk.Emulation.Cores/BizHawk.Emulation.Cores.csproj
index ba9b60e17b..8f97a3ffc5 100644
--- a/BizHawk.Emulation.Cores/BizHawk.Emulation.Cores.csproj
+++ b/BizHawk.Emulation.Cores/BizHawk.Emulation.Cores.csproj
@@ -988,6 +988,7 @@
+
diff --git a/BizHawk.Emulation.Cores/Consoles/Nintendo/NDS/MelonDS_SaveRam.cs b/BizHawk.Emulation.Cores/Consoles/Nintendo/NDS/MelonDS_SaveRam.cs
new file mode 100644
index 0000000000..6d689e1a99
--- /dev/null
+++ b/BizHawk.Emulation.Cores/Consoles/Nintendo/NDS/MelonDS_SaveRam.cs
@@ -0,0 +1,45 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using System.Runtime.InteropServices;
+
+using BizHawk.Emulation.Common;
+
+namespace BizHawk.Emulation.Cores.Consoles.Nintendo.NDS
+{
+ unsafe partial class MelonDS : ISaveRam
+ {
+ public bool SaveRamModified => IsSRAMModified();
+
+ public byte[] CloneSaveRam()
+ {
+ int length = GetSRAMLength();
+ byte[] data = new byte[length];
+ fixed (byte* dst = data)
+ {
+ GetSRAM(dst, length);
+ }
+ return data;
+ }
+
+ public void StoreSaveRam(byte[] data)
+ {
+ fixed (byte* src = data)
+ {
+ SetSRAM(src, data.Length);
+ }
+ }
+
+ [DllImport(dllPath)]
+ private static extern int GetSRAMLength();
+ [DllImport(dllPath)]
+ private static extern bool IsSRAMModified();
+ [DllImport(dllPath)]
+ private static extern void GetSRAM(byte* dst, int length);
+ [DllImport(dllPath)]
+ private static extern void SetSRAM(byte* src, int length);
+
+ }
+}