mirror of
https://github.com/ekeeke/Genesis-Plus-GX.git
synced 2024-12-26 19:21:49 +01:00
[Core/CD] improved MAIN-CPU/SUB-CPU synchronization when reading CDC host data and CDC transfer status from MAIN-CPU (fixes MCD-verificator CDC INIT Test #4 and CDC DMA3 Test #2)
This commit is contained in:
parent
6669d25948
commit
b330eb85cf
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 |
@ -368,6 +368,14 @@ unsigned int ctrl_io_read_byte(unsigned int address)
|
||||
return scd.regs[0x03>>1].byte.l & 0xc7;
|
||||
}
|
||||
|
||||
/* CDC Mode */
|
||||
if (index == 0x04)
|
||||
{
|
||||
/* sync SUB-CPU with MAIN-CPU (fixes MCD-verificator CDC DMA3 Test #2) */
|
||||
s68k_sync();
|
||||
return scd.regs[0x04>>1].byte.h & 0xc7;
|
||||
}
|
||||
|
||||
/* SUB-CPU communication flags */
|
||||
if (index == 0x0f)
|
||||
{
|
||||
@ -514,6 +522,11 @@ unsigned int ctrl_io_read_word(unsigned int address)
|
||||
/* CDC host data (word access only ?) */
|
||||
if (index == 0x08)
|
||||
{
|
||||
/* sync SUB-CPU with MAIN-CPU if CDC data transfer is not yet enabled (fixes MCD-verificator CDC INIT Test #4) */
|
||||
if (!(scd.regs[0x04>>1].byte.h & 0x40))
|
||||
{
|
||||
s68k_sync();
|
||||
}
|
||||
return cdc_host_r();
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user