[Core/MD] fixed regression in some unlicensed games mapper emulation (introduced by 7316507339)

This commit is contained in:
ekeeke 2024-04-20 18:26:32 +02:00
parent 6972a5b0d6
commit 351d052e84
2 changed files with 6 additions and 3 deletions

View File

@ -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++)

View File

@ -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/)