From: kub Date: Fri, 27 Sep 2024 07:16:50 +0000 (+0200) Subject: mcd, fix crash if no bios with msu X-Git-Url: https://notaz.gp2x.de/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=8f0952ae7a85193a33dcde60ede25fcb1d131841;p=picodrive.git mcd, fix crash if no bios with msu --- diff --git a/pico/cd/memory.c b/pico/cd/memory.c index 7699df29..72a64e4c 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