diff --git a/core/cd_hw/cd_cart.h b/core/cd_hw/cd_cart.h index 8a21ba2..6ee7cad 100644 --- a/core/cd_hw/cd_cart.h +++ b/core/cd_hw/cd_cart.h @@ -40,7 +40,8 @@ /* CD compatible ROM/RAM cartridge */ typedef struct { - uint8 area[0x840080]; /* cartridge ROM/RAM area (max. 8MB ROM + 64KB backup memory + Pro Action Replay 128KB ROM / 64KB RAM + cartridge infos) */ + uint8 reserved[0x80]; /* reserved for ROM cartridge infos (see md_cart.h) */ + uint8 area[0x840000]; /* cartridge ROM/RAM area (max. 8MB ROM + 64KB backup memory + Pro Action Replay 128KB ROM / 64KB RAM) */ uint8 boot; /* cartridge boot mode (0x00: boot from CD with ROM/RAM cartridge enabled, 0x40: boot from ROM cartridge with CD enabled) */ uint8 id; /* RAM cartridge ID (related to RAM size, 0 if disabled) */ uint8 prot; /* RAM cartridge write protection */ diff --git a/core/genesis.c b/core/genesis.c index 1d5d272..2a069e7 100644 --- a/core/genesis.c +++ b/core/genesis.c @@ -279,10 +279,18 @@ void gen_reset(int hard_reset) /* reset CD hardware */ scd_reset(1); } + + /* reset MD cartridge hardware (only when booting from cartridge) */ + if (scd.cartridge.boot) + { + md_cart_reset(hard_reset); + } + } + else + { + /* reset MD cartridge hardware */ + md_cart_reset(hard_reset); } - - /* reset MD cartridge hardware */ - md_cart_reset(hard_reset); /* Z80 bus is released & Z80 is reseted */ m68k.memory_map[0xa0].read8 = m68k_read_bus_8;