all repos — mgba @ f6523e2c0111710fa79823331eff360f73f5641e

mGBA Game Boy Advance Emulator

libretro: Fix cheevos memory map for GB games using external RAM
negativeExponent negativeExponent@users.noreply.github.com
Sun, 10 May 2020 19:03:04 +0800
commit

f6523e2c0111710fa79823331eff360f73f5641e

parent

274a97a5f0908a68a4e072f918b80b3f66aae382

1 files changed, 3 insertions(+), 3 deletions(-)

jump to
M src/platform/libretro/libretro.csrc/platform/libretro/libretro.c

@@ -463,7 +463,7 @@

/* Map VRAM */ descs[i].ptr = gb->video.vram; descs[i].start = GB_BASE_VRAM; - descs[i].len = GB_SIZE_VRAM; + descs[i].len = GB_SIZE_VRAM_BANK0; i++; /* Map working RAM */

@@ -505,8 +505,8 @@ descs[i].len = 1;

i++; /* Map External RAM */ - if (savedataSize) { - descs[i].ptr = savedata; + if (gb->memory.sram) { + descs[i].ptr = gb->memory.sram; descs[i].start = GB_BASE_EXTERNAL_RAM; descs[i].len = savedataSize; i++;