From d70fed9e7a0be2bb3a38127c010c9b10d76a00fc Mon Sep 17 00:00:00 2001 From: kub Date: Mon, 16 Dec 2024 20:51:14 +0100 Subject: [PATCH] mcd, fix rom access in MD+ page --- pico/cd/megasd.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/pico/cd/megasd.c b/pico/cd/megasd.c index 76195461a..6f1ec7ea7 100644 --- a/pico/cd/megasd.c +++ b/pico/cd/megasd.c @@ -177,7 +177,7 @@ static void msd_init(void) Pico_msd.state = 1; Pico_msd.index = -1; - // enable CD drive + // CD LEDs s68k_write8(0xff8000, 0x2); PicoResetHook = msd_reset; @@ -201,10 +201,9 @@ static u32 msd_read16(u32 a) { u16 d = 0; - a = (u16)a; - if (a >= 0x0f800) { + if ((u16)a >= 0x0f800) { d = Pico_msd.data[(a&0x7ff)>>1]; - } else if (a >= 0xf7f0) { + } else if ((u16)a >= 0xf7f0) { switch (a&0xe) { case 0x6: d = 0x5241; break; // RA case 0x8: d = 0x5445; break; // TE