mirror of
https://github.com/ekeeke/Genesis-Plus-GX.git
synced 2024-12-27 19:51:48 +01:00
[Core/MD] fixed SRAM bankswitching for games also using ROM bankswitching (fixes Astebros)
This commit is contained in:
parent
95bde804a6
commit
4bb149ba0b
Binary file not shown.
Binary file not shown.
Before Width: | Height: | Size: 3.8 MiB After Width: | Height: | Size: 3.8 MiB |
Binary file not shown.
Before Width: | Height: | Size: 4.0 MiB After Width: | Height: | Size: 4.0 MiB |
@ -999,7 +999,6 @@ static void mapper_sega_w(uint32 data)
|
|||||||
if (sram.on)
|
if (sram.on)
|
||||||
{
|
{
|
||||||
/* Backup RAM mapped to $200000-$20ffff (normally mirrored up to $3fffff but this breaks Sonic Megamix and no game need it) */
|
/* Backup RAM mapped to $200000-$20ffff (normally mirrored up to $3fffff but this breaks Sonic Megamix and no game need it) */
|
||||||
m68k.memory_map[0x20].base = sram.sram;
|
|
||||||
m68k.memory_map[0x20].read8 = sram_read_byte;
|
m68k.memory_map[0x20].read8 = sram_read_byte;
|
||||||
m68k.memory_map[0x20].read16 = sram_read_word;
|
m68k.memory_map[0x20].read16 = sram_read_word;
|
||||||
zbank_memory_map[0x20].read = sram_read_byte;
|
zbank_memory_map[0x20].read = sram_read_byte;
|
||||||
@ -1031,17 +1030,13 @@ static void mapper_sega_w(uint32 data)
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
/* cartridge ROM mapped to $200000-$3fffff */
|
/* cartridge ROM mapped to $200000-$20ffff */
|
||||||
for (i=0x20; i<0x40; i++)
|
m68k.memory_map[0x20].read8 = NULL;
|
||||||
{
|
m68k.memory_map[0x20].read16 = NULL;
|
||||||
m68k.memory_map[i].base = cart.rom + ((i<<16) & cart.mask);
|
zbank_memory_map[0x20].read = NULL;
|
||||||
m68k.memory_map[i].read8 = NULL;
|
m68k.memory_map[0x20].write8 = m68k_unused_8_w;
|
||||||
m68k.memory_map[i].read16 = NULL;
|
m68k.memory_map[0x20].write16 = m68k_unused_16_w;
|
||||||
zbank_memory_map[i].read = NULL;
|
zbank_memory_map[0x20].write = zbank_unused_w;
|
||||||
m68k.memory_map[i].write8 = m68k_unused_8_w;
|
|
||||||
m68k.memory_map[i].write16 = m68k_unused_16_w;
|
|
||||||
zbank_memory_map[i].write = zbank_unused_w;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user