diff --git a/core/cart_hw/md_cart.c b/core/cart_hw/md_cart.c index 7753f4e..a5fdb0f 100644 --- a/core/cart_hw/md_cart.c +++ b/core/cart_hw/md_cart.c @@ -2,7 +2,7 @@ * Genesis Plus * Mega Drive cartridge hardware support * - * Copyright (C) 2007-2023 Eke-Eke (Genesis Plus GX) + * Copyright (C) 2007-2024 Eke-Eke (Genesis Plus GX) * * Many cartridge protections were initially documented by Haze * (http://haze.mameworld.info/) @@ -465,7 +465,10 @@ void md_cart_init(void) memset(&cart.hw, 0, sizeof(cart.hw)); /* initialize default $200000-$20ffff mapping (for games using SRAM & ROM bankswitching) */ - cart.hw.regs[0] = (0x200000 & cart.mask) >> 16; + if (m68k.memory_map[0x20].base == sram.sram) + { + cart.hw.regs[0] = (0x200000 & cart.mask) >> 16; + } /* search for game into database */ for (i=0; i<(sizeof(rom_database)/sizeof(md_entry_t)); i++) diff --git a/core/cart_hw/md_cart.h b/core/cart_hw/md_cart.h index ad8b985..943f8e8 100644 --- a/core/cart_hw/md_cart.h +++ b/core/cart_hw/md_cart.h @@ -2,7 +2,7 @@ * Genesis Plus * Mega Drive cartridge hardware support * - * Copyright (C) 2007-2023 Eke-Eke (Genesis Plus GX) + * Copyright (C) 2007-2024 Eke-Eke (Genesis Plus GX) * * Most cartridge protections were initially documented by Haze * (http://haze.mameworld.info/)