mirror of
https://github.com/ekeeke/Genesis-Plus-GX.git
synced 2024-11-13 06:15:07 +01:00
[Core/MD] fixed savestate when Boot ROM is running
This commit is contained in:
parent
32079418a9
commit
33328c7abb
@ -780,9 +780,14 @@ int md_cart_context_save(uint8 *state)
|
||||
/* SRAM */
|
||||
state[bufferptr++] = 0xff;
|
||||
}
|
||||
else if (base == boot_rom)
|
||||
{
|
||||
/* Boot ROM */
|
||||
state[bufferptr++] = 0xfe;
|
||||
}
|
||||
else
|
||||
{
|
||||
/* ROM */
|
||||
/* Cartridge ROM */
|
||||
state[bufferptr++] = ((base - cart.rom) >> 16) & 0xff;
|
||||
}
|
||||
}
|
||||
@ -839,7 +844,7 @@ int md_cart_context_load(uint8 *state)
|
||||
}
|
||||
|
||||
/* ROM */
|
||||
m68k.memory_map[i].base = cart.rom + (offset << 16);
|
||||
m68k.memory_map[i].base = (offset == 0xfe) ? boot_rom : (cart.rom + (offset << 16));
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user