aboutsummaryrefslogtreecommitdiff
path: root/frontend
diff options
context:
space:
mode:
authorretro-wertz2019-07-14 19:31:18 +0800
committerretro-wertz2019-07-14 19:31:18 +0800
commit2683f84fa2efb9d69f1037e9d38e5395b4f53bea (patch)
treeacb8d701e830acc6c82cf16477bb6eba07b3542c /frontend
parent5382d2a652a74e3844afa68a510a5ab612e115e0 (diff)
downloadpcsx_rearmed-2683f84fa2efb9d69f1037e9d38e5395b4f53bea.tar.gz
pcsx_rearmed-2683f84fa2efb9d69f1037e9d38e5395b4f53bea.tar.bz2
pcsx_rearmed-2683f84fa2efb9d69f1037e9d38e5395b4f53bea.zip
Allow access to main ram using retro_get_memory_data/size
Diffstat (limited to 'frontend')
-rw-r--r--frontend/libretro.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/frontend/libretro.c b/frontend/libretro.c
index a69ad02..992da60 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;
}