From: kub Date: Thu, 1 Jul 2021 19:26:57 +0000 (+0200) Subject: mcd, fix pulldowns only there if cd attached X-Git-Tag: v2.00~501 X-Git-Url: https://notaz.gp2x.de/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=5c73f9d050ee46cb5efe7f76c35efd99a6124834;p=picodrive.git mcd, fix pulldowns only there if cd attached --- diff --git a/pico/memory.c b/pico/memory.c index 72b7a909..fab46c21 100644 --- a/pico/memory.c +++ b/pico/memory.c @@ -116,13 +116,13 @@ void cpu68k_map_all_ram(int start_addr, int end_addr, void *ptr, int is_sub) static u32 m68k_unmapped_read8(u32 a) { elprintf(EL_UIO, "m68k unmapped r8 [%06x] @%06x", a, SekPc); - return 0; // assume pulldown, as if MegaCD2 was attached + return (PicoIn.AHW & PAHW_MCD) ? 0x00 : 0xff; // pulldown if MegaCD2 attached } static u32 m68k_unmapped_read16(u32 a) { elprintf(EL_UIO, "m68k unmapped r16 [%06x] @%06x", a, SekPc); - return 0; + return (PicoIn.AHW & PAHW_MCD) ? 0x00 : 0xffff; } static void m68k_unmapped_write8(u32 a, u32 d)