diff --git a/core/cd_hw/scd.c b/core/cd_hw/scd.c index 3cb1f1a..975de03 100644 --- a/core/cd_hw/scd.c +++ b/core/cd_hw/scd.c @@ -703,13 +703,8 @@ static void scd_write_byte(unsigned int address, unsigned int data) return; } - case 0x0e: /* MAIN-CPU communication flags, normally read-only (Space Ace, Dragon's Lair) */ - { - /* ROR8 operation */ - data = (data >> 1) | ((data << 7) & 1); - } - - case 0x0f: /* SUB-CPU communication flags */ + case 0x0e: /* SUB-CPU communication flags */ + case 0x0f: /* !LWR is ignored (Space Ace, Dragon's Lair) */ { s68k_poll_sync(1<<0x0f); scd.regs[0x0f>>1].byte.l = data; @@ -990,12 +985,12 @@ static void scd_write_word(unsigned int address, unsigned int data) return; } - case 0x0e: /* SUB-CPU communication flags */ + case 0x0e: /* CPU Communication flags */ { s68k_poll_sync(1<<0x0f); - /* MSB is read-only */ - scd.regs[0x0f>>1].byte.l = data; + /* D8-D15 ignored -> only SUB-CPU flags are updated */ + scd.regs[0x0f>>1].byte.l = data & 0xff; return; } diff --git a/core/mem68k.c b/core/mem68k.c index 60f0763..0a31466 100644 --- a/core/mem68k.c +++ b/core/mem68k.c @@ -730,13 +730,8 @@ void ctrl_io_write_byte(unsigned int address, unsigned int data) return; } - case 0x0f: /* SUB-CPU communication flags, normally read-only (Space Ace, Dragon's Lair) */ - { - /* ROL8 operation */ - data = (data << 1) | ((data >> 7) & 1); - } - - case 0x0e: /* MAIN-CPU communication flags */ + case 0x0e: /* MAIN-CPU communication flags */ + case 0x0f: /* !LWR is ignored (Space Ace, Dragon's Lair) */ { m68k_poll_sync(1<<0x0e); scd.regs[0x0e>>1].byte.h = data; @@ -949,12 +944,12 @@ void ctrl_io_write_word(unsigned int address, unsigned int data) return; } - case 0x0e: /* MAIN-CPU communication flags */ + case 0x0e: /* CPU communication flags */ { m68k_poll_sync(1<<0x0e); - /* LSB is read-only (Mortal Kombat) */ - scd.regs[0x0e>>1].byte.h = data; + /* D8-D15 ignored -> only MAIN-CPU flags are updated (Mortal Kombat) */ + scd.regs[0x0e>>1].byte.h = data & 0xff; return; }