mirror of
https://github.com/ekeeke/Genesis-Plus-GX.git
synced 2024-11-20 17:49:22 +01:00
[Core/MCD] improved Sub-CPU synchronization with Main-CPU (fixes "Soul Star")
This commit is contained in:
parent
14d4074f11
commit
2fe81791ef
@ -498,6 +498,15 @@ unsigned int ctrl_io_read_word(unsigned int address)
|
|||||||
/* default registers */
|
/* default registers */
|
||||||
if (index < 0x30)
|
if (index < 0x30)
|
||||||
{
|
{
|
||||||
|
/* relative SUB-CPU cycle counter */
|
||||||
|
unsigned int cycles = (m68k.cycles * SCYCLES_PER_LINE) / MCYCLES_PER_LINE;
|
||||||
|
|
||||||
|
/* sync SUB-CPU with MAIN-CPU (Soul Star) */
|
||||||
|
if (!s68k.stopped && (s68k.cycles < cycles))
|
||||||
|
{
|
||||||
|
s68k_run(cycles);
|
||||||
|
}
|
||||||
|
|
||||||
/* SUB-CPU communication words */
|
/* SUB-CPU communication words */
|
||||||
if (index >= 0x20)
|
if (index >= 0x20)
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user