Libretro: Update GBC memory map
This commit is contained in:
parent
fa45ccdfcd
commit
c5e6a3409a
|
@ -1463,7 +1463,7 @@ bool retro_load_game(const struct retro_game_info *game)
|
||||||
gb_init();
|
gb_init();
|
||||||
|
|
||||||
unsigned addr, i;
|
unsigned addr, i;
|
||||||
struct retro_memory_descriptor desc[16];
|
struct retro_memory_descriptor desc[17];
|
||||||
struct retro_memory_map retromap;
|
struct retro_memory_map retromap;
|
||||||
|
|
||||||
memset(desc, 0, sizeof(desc));
|
memset(desc, 0, sizeof(desc));
|
||||||
|
@ -1495,6 +1495,15 @@ bool retro_load_game(const struct retro_game_info *game)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (gbCgbMode) { // banks 2-7 of GBC work ram banks at $10000
|
||||||
|
desc[i].ptr = (void*)gbWram;
|
||||||
|
desc[i].offset = 0x2000;
|
||||||
|
desc[i].start = 0x10000;
|
||||||
|
desc[i].select = 0xFFFF0000;
|
||||||
|
desc[i].len = 0x6000;
|
||||||
|
i++;
|
||||||
|
}
|
||||||
|
|
||||||
retromap.descriptors = desc;
|
retromap.descriptors = desc;
|
||||||
retromap.num_descriptors = i;
|
retromap.num_descriptors = i;
|
||||||
environ_cb(RETRO_ENVIRONMENT_SET_MEMORY_MAPS, &retromap);
|
environ_cb(RETRO_ENVIRONMENT_SET_MEMORY_MAPS, &retromap);
|
||||||
|
|
Loading…
Reference in New Issue