From 8f0952ae7a85193a33dcde60ede25fcb1d131841 Mon Sep 17 00:00:00 2001 From: kub Date: Fri, 27 Sep 2024 09:16:50 +0200 Subject: [PATCH] mcd, fix crash if no bios with msu --- pico/cd/memory.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/pico/cd/memory.c b/pico/cd/memory.c index 7699df296..72a64e4c8 100644 --- a/pico/cd/memory.c +++ b/pico/cd/memory.c @@ -1220,6 +1220,13 @@ static void m68k_mem_setup_cd(void); PICO_INTERNAL void PicoMemSetupCD(void) { + if (Pico_mcd == NULL) { + static u8 bios_id[4] = "SEGA"; + PicoCreateMCD(NULL, 0); + // BIOS faking for MSU-MD, checks for "SEGA" at 0x400100 to detect CD drive + memcpy(Pico_mcd->bios+0x100, bios_id, 4); + } + pcd_base_address = (Pico.romsize ? 0x400000 : 0x000000); // setup default main68k map