mirror of
https://github.com/ekeeke/Genesis-Plus-GX.git
synced 2024-11-10 21:05:12 +01:00
[Core/MD] fixed ROM size detection when enabling/disabling SRAM on power-on (fixes SRAM support in Hardball 95, NBA Hang Time and other 3MB games with SRAM mapped at 0x300000)
This commit is contained in:
parent
77f1529661
commit
5f8156ef72
Binary file not shown.
Binary file not shown.
Before Width: | Height: | Size: 3.7 MiB After Width: | Height: | Size: 3.7 MiB |
Binary file not shown.
Before Width: | Height: | Size: 3.9 MiB After Width: | Height: | Size: 3.9 MiB |
@ -380,7 +380,7 @@ void md_cart_init(void)
|
|||||||
if (sram.on && !sram.custom)
|
if (sram.on && !sram.custom)
|
||||||
{
|
{
|
||||||
/* SRAM is mapped by default unless it overlaps with ROM area (Phantasy Star 4, Beyond Oasis/Legend of Thor, World Series Baseball 9x, Duke Nukem 3D,...) */
|
/* SRAM is mapped by default unless it overlaps with ROM area (Phantasy Star 4, Beyond Oasis/Legend of Thor, World Series Baseball 9x, Duke Nukem 3D,...) */
|
||||||
if (sram.start >= size)
|
if (sram.start >= cart.romsize)
|
||||||
{
|
{
|
||||||
m68k.memory_map[sram.start >> 16].base = sram.sram;
|
m68k.memory_map[sram.start >> 16].base = sram.sram;
|
||||||
m68k.memory_map[sram.start >> 16].read8 = sram_read_byte;
|
m68k.memory_map[sram.start >> 16].read8 = sram_read_byte;
|
||||||
|
Loading…
Reference in New Issue
Block a user