mirror of
https://github.com/ekeeke/Genesis-Plus-GX.git
synced 2024-11-04 01:45:08 +01:00
[Core/MCD] fixed access to "write-only" communication flags from Main-CPU & SUB-CPU (verified on real hardware by Notaz)
This commit is contained in:
parent
20dd11e558
commit
5fbde4e187
@ -703,13 +703,8 @@ static void scd_write_byte(unsigned int address, unsigned int data)
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
case 0x0e: /* MAIN-CPU communication flags, normally read-only (Space Ace, Dragon's Lair) */
|
case 0x0e: /* SUB-CPU communication flags */
|
||||||
{
|
case 0x0f: /* !LWR is ignored (Space Ace, Dragon's Lair) */
|
||||||
/* ROR8 operation */
|
|
||||||
data = (data >> 1) | ((data << 7) & 1);
|
|
||||||
}
|
|
||||||
|
|
||||||
case 0x0f: /* SUB-CPU communication flags */
|
|
||||||
{
|
{
|
||||||
s68k_poll_sync(1<<0x0f);
|
s68k_poll_sync(1<<0x0f);
|
||||||
scd.regs[0x0f>>1].byte.l = data;
|
scd.regs[0x0f>>1].byte.l = data;
|
||||||
@ -990,12 +985,12 @@ static void scd_write_word(unsigned int address, unsigned int data)
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
case 0x0e: /* SUB-CPU communication flags */
|
case 0x0e: /* CPU Communication flags */
|
||||||
{
|
{
|
||||||
s68k_poll_sync(1<<0x0f);
|
s68k_poll_sync(1<<0x0f);
|
||||||
|
|
||||||
/* MSB is read-only */
|
/* D8-D15 ignored -> only SUB-CPU flags are updated */
|
||||||
scd.regs[0x0f>>1].byte.l = data;
|
scd.regs[0x0f>>1].byte.l = data & 0xff;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -730,13 +730,8 @@ void ctrl_io_write_byte(unsigned int address, unsigned int data)
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
case 0x0f: /* SUB-CPU communication flags, normally read-only (Space Ace, Dragon's Lair) */
|
case 0x0e: /* MAIN-CPU communication flags */
|
||||||
{
|
case 0x0f: /* !LWR is ignored (Space Ace, Dragon's Lair) */
|
||||||
/* ROL8 operation */
|
|
||||||
data = (data << 1) | ((data >> 7) & 1);
|
|
||||||
}
|
|
||||||
|
|
||||||
case 0x0e: /* MAIN-CPU communication flags */
|
|
||||||
{
|
{
|
||||||
m68k_poll_sync(1<<0x0e);
|
m68k_poll_sync(1<<0x0e);
|
||||||
scd.regs[0x0e>>1].byte.h = data;
|
scd.regs[0x0e>>1].byte.h = data;
|
||||||
@ -949,12 +944,12 @@ void ctrl_io_write_word(unsigned int address, unsigned int data)
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
case 0x0e: /* MAIN-CPU communication flags */
|
case 0x0e: /* CPU communication flags */
|
||||||
{
|
{
|
||||||
m68k_poll_sync(1<<0x0e);
|
m68k_poll_sync(1<<0x0e);
|
||||||
|
|
||||||
/* LSB is read-only (Mortal Kombat) */
|
/* D8-D15 ignored -> only MAIN-CPU flags are updated (Mortal Kombat) */
|
||||||
scd.regs[0x0e>>1].byte.h = data;
|
scd.regs[0x0e>>1].byte.h = data & 0xff;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user