From: retro-wertz Date: Sun, 14 Jul 2019 11:31:18 +0000 (+0800) Subject: Allow access to main ram using retro_get_memory_data/size X-Git-Tag: r24l~717^2 X-Git-Url: https://notaz.gp2x.de/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=2683f84fa2efb9d69f1037e9d38e5395b4f53bea;p=pcsx_rearmed.git Allow access to main ram using retro_get_memory_data/size --- 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; }