From: negativeExponent Date: Sat, 14 Dec 2019 17:54:30 +0000 (+0800) Subject: Access psx main memory using retro_memory_map X-Git-Tag: r24l~689^2 X-Git-Url: https://notaz.gp2x.de/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b5926d18036e9b3afd462a1222daa9f7bd64b742;p=pcsx_rearmed.git Access psx main memory using retro_memory_map --- diff --git a/frontend/libretro.c b/frontend/libretro.c index 987f90de..7d6d8d48 100644 --- a/frontend/libretro.c +++ b/frontend/libretro.c @@ -1052,6 +1052,20 @@ strcasestr(const char *s, const char*find) } #endif +static void set_retro_memmap(void) +{ + struct retro_memory_map retromap = { 0 }; + struct retro_memory_descriptor mmap = + { + 0, psxM, 0, 0, 0, 0, 0x200000 + }; + + retromap.descriptors = &mmap; + retromap.num_descriptors = 1; + + environ_cb(RETRO_ENVIRONMENT_SET_MEMORY_MAPS, &retromap); +} + bool retro_load_game(const struct retro_game_info *info) { size_t i; @@ -1313,6 +1327,8 @@ bool retro_load_game(const struct retro_game_info *info) } } + set_retro_memmap(); + return true; }