From 89e311b489170fdce5e2cf5b186c0a3f6b054336 Mon Sep 17 00:00:00 2001 From: Sven Date: Sat, 11 Aug 2018 14:35:49 -0400 Subject: add memory hooks for cheat/rumble --- gpsp_libretro.so | Bin 0 -> 1167074 bytes libretro.c | 7 ++++++- 2 files changed, 6 insertions(+), 1 deletion(-) create mode 100755 gpsp_libretro.so diff --git a/gpsp_libretro.so b/gpsp_libretro.so new file mode 100755 index 0000000..56dd5f1 Binary files /dev/null and b/gpsp_libretro.so differ diff --git a/libretro.c b/libretro.c index 444c31c..f35599b 100644 --- a/libretro.c +++ b/libretro.c @@ -532,6 +532,8 @@ unsigned retro_get_region(void) void* retro_get_memory_data(unsigned id) { + if ( id == RETRO_MEMORY_SYSTEM_RAM ) + return ewram ; // switch (id) // { // case RETRO_MEMORY_SAVE_RAM: @@ -543,7 +545,10 @@ void* retro_get_memory_data(unsigned id) size_t retro_get_memory_size(unsigned id) { - // switch (id) + + if ( id == RETRO_MEMORY_SYSTEM_RAM ) + return 1024 * 256 * 2 ; + // switch (id) // { // case RETRO_MEMORY_SAVE_RAM: // switch(backup_type) -- cgit v1.2.3