summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAutechre2020-04-05 12:01:35 +0200
committerGitHub2020-04-05 12:01:35 +0200
commit514cb1e66b24a5935eb17a5f918a13ec631a1959 (patch)
tree68a50587c1960836b92f5fcfbcc68af0d83f9230
parentd8cf63b9c6b277c347e8e7babc9214d25d17b768 (diff)
parentfea026fec4f6c528ef325c1ea8a38eaf0089f9ed (diff)
downloadpicogpsp-514cb1e66b24a5935eb17a5f918a13ec631a1959.tar.gz
picogpsp-514cb1e66b24a5935eb17a5f918a13ec631a1959.tar.bz2
picogpsp-514cb1e66b24a5935eb17a5f918a13ec631a1959.zip
Merge pull request #67 from negativeExponent/fix_cheevos_support
Fix cheevos support
-rw-r--r--libretro.c23
1 files changed, 23 insertions, 0 deletions
diff --git a/libretro.c b/libretro.c
index 6018d87..3aacfec 100644
--- a/libretro.c
+++ b/libretro.c
@@ -514,6 +514,27 @@ static void frame_time_cb(retro_usec_t usec)
frame_time = usec / 1000000.0;
}
+static void set_memory_descriptors(void)
+{
+ const uint64_t mem = RETRO_MEMORY_SYSTEM_RAM;
+ struct retro_memory_descriptor desc[9] = {
+ { mem, iwram, 0x00000 + 0x8000, 0x3000000, 0, 0, 0x8000, NULL },
+ { mem, ewram, 0x00000 + 0x8000, 0x2000000, 0, 0, 0x8000, NULL },
+ { mem, ewram, 0x10000 + 0x8000, 0x2008000, 0, 0, 0x8000, NULL },
+ { mem, ewram, 0x20000 + 0x8000, 0x2010000, 0, 0, 0x8000, NULL },
+ { mem, ewram, 0x30000 + 0x8000, 0x2018000, 0, 0, 0x8000, NULL },
+ { mem, ewram, 0x40000 + 0x8000, 0x2020000, 0, 0, 0x8000, NULL },
+ { mem, ewram, 0x50000 + 0x8000, 0x2028000, 0, 0, 0x8000, NULL },
+ { mem, ewram, 0x60000 + 0x8000, 0x2030000, 0, 0, 0x8000, NULL },
+ { mem, ewram, 0x70000 + 0x8000, 0x2038000, 0, 0, 0x8000, NULL }
+ };
+ struct retro_memory_map retromap = {
+ desc,
+ sizeof(desc) / sizeof(desc[0])
+ };
+ environ_cb(RETRO_ENVIRONMENT_SET_MEMORY_MAPS, &retromap);
+}
+
bool retro_load_game(const struct retro_game_info* info)
{
if (!info)
@@ -604,6 +625,8 @@ bool retro_load_game(const struct retro_game_info* info)
init_context_switch();
+ set_memory_descriptors();
+
return true;
}