From f8244c8119b2d1adef28ce6932d3a1432771b8de Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rapha=C3=ABl=20Zumer?= Date: Mon, 15 Apr 2019 16:39:14 -0400 Subject: [PATCH] Update libretro GBC memory map --- libretro/libretro.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/libretro/libretro.c b/libretro/libretro.c index 937c6e8..15ea093 100644 --- a/libretro/libretro.c +++ b/libretro/libretro.c @@ -414,7 +414,7 @@ static void init_for_current_model(unsigned id) descs[2].start = 0xC000; descs[2].len = 0x1000; - descs[3].ptr = descs[2].ptr + (bank * 0x1000); + descs[3].ptr = descs[2].ptr + 0x1000; /* GB RAM/GBC RAM bank 1 */ descs[3].start = 0xD000; descs[3].len = 0x1000; @@ -440,9 +440,9 @@ static void init_for_current_model(unsigned id) descs[8].start = 0xFE00; descs[8].len = 0x00A0; - descs[9].ptr = descs[2].ptr + 0x1000; + descs[9].ptr = descs[2].ptr + 0x2000; /* GBC RAM bank 2 */ descs[9].start = 0x10000; - descs[9].len = GB_is_cgb(&gameboy[i]) ? 0x7000 : 0; + descs[9].len = GB_is_cgb(&gameboy[i]) ? 0x6000 : 0; /* 0x1000 per bank (2-7), unmapped on GB */ struct retro_memory_map mmaps; mmaps.descriptors = descs;