From 2683f84fa2efb9d69f1037e9d38e5395b4f53bea Mon Sep 17 00:00:00 2001 From: retro-wertz Date: Sun, 14 Jul 2019 19:31:18 +0800 Subject: [PATCH] Allow access to main ram using retro_get_memory_data/size --- frontend/libretro.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/frontend/libretro.c b/frontend/libretro.c index a69ad02d..992da60f 100644 --- a/frontend/libretro.c +++ b/frontend/libretro.c @@ -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; } -- 2.39.5