Allow access to main ram using retro_get_memory_data/size
authorretro-wertz <retro-wertz@users.noreply.github.com>
Sun, 14 Jul 2019 11:31:18 +0000 (19:31 +0800)
committerretro-wertz <retro-wertz@users.noreply.github.com>
Sun, 14 Jul 2019 11:31:18 +0000 (19:31 +0800)
frontend/libretro.c

index a69ad02..992da60 100644 (file)
@@ -1364,6 +1364,8 @@ void *retro_get_memory_data(unsigned id)
 {
        if (id == RETRO_MEMORY_SAVE_RAM)
                return Mcd1Data;
+       else if (id == RETRO_MEMORY_SYSTEM_RAM)
+               return psxM;
        else
                return NULL;
 }
@@ -1372,6 +1374,8 @@ size_t retro_get_memory_size(unsigned id)
 {
        if (id == RETRO_MEMORY_SAVE_RAM)
                return MCD_SIZE;
+       else if (id == RETRO_MEMORY_SYSTEM_RAM)
+               return 0x210000;
        else
                return 0;
 }