[Core/CD] fixed memory mode register bits masking when read from MAIN-CPU and SUB-CPU (verified on real hardware, cf. Krikzz's mcd-verificator)

This commit is contained in:
ekeeke 2023-11-19 16:02:33 +01:00
parent 6cc8bbc277
commit 6669d25948
3 changed files with 13 additions and 4 deletions

View File

@ -49,6 +49,7 @@ Genesis Plus GX 1.7.5 (xx/xx/xxxx) (Eke-Eke)
* fixed access to Sub-CPU "read-only" communication registers (fixes Round 5 Boss freeze in Streets of Rage / Sega Classics Arcade Collection)
* fixed byte access to memory mode, timer and font color registers at even address (verified on real hardware, cf. Krikzz's mcd-verificator)
* fixed byte access to font data registers
* fixed memory mode register bits masking when read from MAIN-CPU and SUB-CPU (verified on real hardware, cf. Krikzz's mcd-verificator)
* fixed pending level 1 interrupts when GFX interrupt is disabled (fixes random freezes when exiting "Batman Returns" option menu)
* fixed CDD seek command again (Final Fight CD freeze with model 2 BIOS)
* fixed CDD status reported during seek/access time (fixes sound effect synchronization issue in Bari Arm)

View File

@ -558,7 +558,9 @@ static unsigned int scd_read_byte(unsigned int address)
if (address == 0x03)
{
s68k_poll_detect(1<<0x03);
return scd.regs[0x03>>1].byte.l;
/* mask BK0 and BK1 bits on SUB-CPU side */
return scd.regs[0x03>>1].byte.l & 0x1f;
}
/* MAIN-CPU communication flags */
@ -674,7 +676,9 @@ static unsigned int scd_read_word(unsigned int address)
if (address == 0x02)
{
s68k_poll_detect(1<<0x03);
return scd.regs[0x03>>1].w;
/* mask BK0 and BK1 bits on SUB-CPU side */
return scd.regs[0x03>>1].w & 0xff1f;
}
/* CDC host data (word access only ?) */

View File

@ -363,7 +363,9 @@ unsigned int ctrl_io_read_byte(unsigned int address)
if (index == 0x03)
{
m68k_poll_detect(1<<0x03);
return scd.regs[0x03>>1].byte.l;
/* mask PM0 and PM1 bits on MAIN-CPU side */
return scd.regs[0x03>>1].byte.l & 0xc7;
}
/* SUB-CPU communication flags */
@ -504,7 +506,9 @@ unsigned int ctrl_io_read_word(unsigned int address)
if (index == 0x02)
{
m68k_poll_detect(1<<0x03);
return scd.regs[0x03>>1].w;
/* mask PM0 and PM1 bits on MAIN-CPU side */
return scd.regs[0x03>>1].w & 0xffc7;
}
/* CDC host data (word access only ?) */