[Core/CD] improved accuracy of CDC data transfer to Main-CPU and Sub-CPU when writing to CDC data register (verified on real hardware, cf. Krikzz's mcd-verificator)

This commit is contained in:
ekeeke 2024-01-22 01:02:42 +01:00
parent 2c1a2d0def
commit 64d3e08e7d
5 changed files with 14 additions and 0 deletions

Binary file not shown.

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.8 MiB

After

Width:  |  Height:  |  Size: 3.8 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.0 MiB

After

Width:  |  Height:  |  Size: 4.0 MiB

View File

@ -1405,6 +1405,13 @@ static void scd_write_word(unsigned int address, unsigned int data)
return; return;
} }
case 0x08: /* CDC host data */
{
/* CDC data is also read (although unused) on write access (verified on real hardware, cf. Krikzz's mcd-verificator) */
cdc_host_r(CDC_SUB_CPU_ACCESS);
return;
}
case 0x0c: /* Stopwatch (word access only) */ case 0x0c: /* Stopwatch (word access only) */
{ {
/* synchronize the counter with SUB-CPU */ /* synchronize the counter with SUB-CPU */

View File

@ -1261,6 +1261,13 @@ void ctrl_io_write_word(unsigned int address, unsigned int data)
return; return;
} }
case 0x08: /* CDC host data */
{
/* CDC data is also read (although unused) on write access (verified on real hardware, cf. Krikzz's mcd-verificator) */
cdc_host_r(CDC_MAIN_CPU_ACCESS);
return;
}
case 0x0e: /* CPU communication flags */ case 0x0e: /* CPU communication flags */
{ {
m68k_poll_sync(1<<0x0e); m68k_poll_sync(1<<0x0e);