{Core/CD] improved Sub-CPU synchronization with Main-CPU (fixes Dune regression)

This commit is contained in:
ekeeke
2025-08-02 01:45:16 +02:00
parent 9bcf7c29b1
commit a80e3b3b95
6 changed files with 4 additions and 4 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: 3.8 MiB

After

Width:  |  Height:  |  Size: 3.8 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.2 MiB

After

Width:  |  Height:  |  Size: 4.2 MiB

+3 -3
View File
@@ -3,7 +3,7 @@
* Main 68k bus handlers
*
* Copyright (C) 1998-2003 Charles Mac Donald (original code)
* Copyright (C) 2007-2024 Eke-Eke (Genesis Plus GX)
* Copyright (C) 2007-2025 Eke-Eke (Genesis Plus GX)
*
* Redistribution and use of this code or any derivative works are permitted
* provided that the following conditions are met:
@@ -288,8 +288,8 @@ static void m68k_poll_sync(unsigned int reg_mask)
/* SUB-CPU idle on register polling ? */
if (s68k.stopped & reg_mask)
{
/* sync SUB-CPU with MAIN-CPU */
s68k.cycles = cycles;
/* sync SUB-CPU with MAIN-CPU (taking into account current instruction execution time) */
s68k.cycles = cycles + ((m68k_cycles()* SCYCLES_PER_LINE) / MCYCLES_PER_LINE);
/* restart SUB-CPU */
s68k.stopped = 0;
+1 -1
View File
@@ -3,7 +3,7 @@
* Main 68k bus handlers
*
* Copyright (C) 1998-2003 Charles Mac Donald (original code)
* Copyright (C) 2007-2024 Eke-Eke (Genesis Plus GX)
* Copyright (C) 2007-2025 Eke-Eke (Genesis Plus GX)
*
* Redistribution and use of this code or any derivative works are permitted
* provided that the following conditions are met: