diff --git a/core/cart_hw/sms_cart.c b/core/cart_hw/sms_cart.c index 5cf7e11..a4f7a8c 100644 --- a/core/cart_hw/sms_cart.c +++ b/core/cart_hw/sms_cart.c @@ -777,11 +777,45 @@ int sms_cart_context_load(uint8 *state) { /* load Boot ROM mapper settings */ load_param(bios_rom.fcr, 4); + + /* set default cartridge ROM paging */ + switch (cart_rom.mapper) + { + case MAPPER_SEGA: + case MAPPER_SEGA_X: + cart_rom.fcr[0] = 0; + cart_rom.fcr[1] = 0; + cart_rom.fcr[2] = 1; + cart_rom.fcr[3] = 2; + break; + + case MAPPER_KOREA_8K: + case MAPPER_MSX: + case MAPPER_MSX_NEMESIS: + cart_rom.fcr[0] = 0; + cart_rom.fcr[1] = 0; + cart_rom.fcr[2] = 0; + cart_rom.fcr[3] = 0; + break; + + default: + cart_rom.fcr[0] = 0; + cart_rom.fcr[1] = 0; + cart_rom.fcr[2] = 1; + cart_rom.fcr[3] = 0; + break; + } } else { /* load cartridge mapper settings */ load_param(cart_rom.fcr, 4); + + /* set default BIOS ROM paging (SEGA mapper by default) */ + bios_rom.fcr[0] = 0; + bios_rom.fcr[1] = 0; + bios_rom.fcr[2] = 1; + bios_rom.fcr[3] = 2; } /* support for SG-1000 games with extra RAM */