mirror of
https://github.com/ekeeke/Genesis-Plus-GX.git
synced 2024-11-20 17:49:22 +01:00
[Core/MCD] removed redundant checking on CPU sync
This commit is contained in:
parent
11b427faaa
commit
aef1b342fb
@ -232,7 +232,7 @@ static void s68k_poll_sync(unsigned int reg_mask)
|
|||||||
unsigned int cycles = (s68k.cycles * MCYCLES_PER_LINE) / SCYCLES_PER_LINE;
|
unsigned int cycles = (s68k.cycles * MCYCLES_PER_LINE) / SCYCLES_PER_LINE;
|
||||||
|
|
||||||
/* sync MAIN-CPU with SUB-CPU */
|
/* sync MAIN-CPU with SUB-CPU */
|
||||||
if (!m68k.stopped && (m68k.cycles < cycles))
|
if (!m68k.stopped)
|
||||||
{
|
{
|
||||||
m68k_run(cycles);
|
m68k_run(cycles);
|
||||||
}
|
}
|
||||||
@ -432,13 +432,13 @@ static unsigned int scd_read_word(unsigned int address)
|
|||||||
|
|
||||||
/* MAIN-CPU communication words */
|
/* MAIN-CPU communication words */
|
||||||
if ((address & 0x1f0) == 0x10)
|
if ((address & 0x1f0) == 0x10)
|
||||||
|
{
|
||||||
|
if (!m68k.stopped)
|
||||||
{
|
{
|
||||||
/* relative MAIN-CPU cycle counter */
|
/* relative MAIN-CPU cycle counter */
|
||||||
unsigned int cycles = (s68k.cycles * MCYCLES_PER_LINE) / SCYCLES_PER_LINE;
|
unsigned int cycles = (s68k.cycles * MCYCLES_PER_LINE) / SCYCLES_PER_LINE;
|
||||||
|
|
||||||
/* sync MAIN-CPU with SUB-CPU (Mighty Morphin Power Rangers) */
|
/* sync MAIN-CPU with SUB-CPU (Mighty Morphin Power Rangers) */
|
||||||
if (!m68k.stopped && (m68k.cycles < cycles))
|
|
||||||
{
|
|
||||||
m68k_run(cycles);
|
m68k_run(cycles);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -269,7 +269,7 @@ static void m68k_poll_sync(unsigned int reg_mask)
|
|||||||
unsigned int cycles = (m68k.cycles * SCYCLES_PER_LINE) / MCYCLES_PER_LINE;
|
unsigned int cycles = (m68k.cycles * SCYCLES_PER_LINE) / MCYCLES_PER_LINE;
|
||||||
|
|
||||||
/* sync SUB-CPU with MAIN-CPU */
|
/* sync SUB-CPU with MAIN-CPU */
|
||||||
if (!s68k.stopped && (s68k.cycles < cycles))
|
if (!s68k.stopped)
|
||||||
{
|
{
|
||||||
s68k_run(cycles);
|
s68k_run(cycles);
|
||||||
}
|
}
|
||||||
@ -344,13 +344,13 @@ unsigned int ctrl_io_read_byte(unsigned int address)
|
|||||||
|
|
||||||
/* SUB-CPU communication flags */
|
/* SUB-CPU communication flags */
|
||||||
if (index == 0x0f)
|
if (index == 0x0f)
|
||||||
|
{
|
||||||
|
if (!s68k.stopped)
|
||||||
{
|
{
|
||||||
/* relative SUB-CPU cycle counter */
|
/* relative SUB-CPU cycle counter */
|
||||||
unsigned int cycles = (m68k.cycles * SCYCLES_PER_LINE) / MCYCLES_PER_LINE;
|
unsigned int cycles = (m68k.cycles * SCYCLES_PER_LINE) / MCYCLES_PER_LINE;
|
||||||
|
|
||||||
/* sync SUB-CPU with MAIN-CPU (Dracula Unleashed w/ Sega CD Model 2 Boot ROM) */
|
/* sync SUB-CPU with MAIN-CPU (Dracula Unleashed w/ Sega CD Model 2 Boot ROM) */
|
||||||
if (!s68k.stopped && (s68k.cycles < cycles))
|
|
||||||
{
|
|
||||||
s68k_run(cycles);
|
s68k_run(cycles);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -497,19 +497,19 @@ unsigned int ctrl_io_read_word(unsigned int address)
|
|||||||
|
|
||||||
/* default registers */
|
/* default registers */
|
||||||
if (index < 0x30)
|
if (index < 0x30)
|
||||||
|
{
|
||||||
|
/* SUB-CPU communication words */
|
||||||
|
if (index >= 0x20)
|
||||||
|
{
|
||||||
|
if (!s68k.stopped)
|
||||||
{
|
{
|
||||||
/* relative SUB-CPU cycle counter */
|
/* relative SUB-CPU cycle counter */
|
||||||
unsigned int cycles = (m68k.cycles * SCYCLES_PER_LINE) / MCYCLES_PER_LINE;
|
unsigned int cycles = (m68k.cycles * SCYCLES_PER_LINE) / MCYCLES_PER_LINE;
|
||||||
|
|
||||||
/* sync SUB-CPU with MAIN-CPU (Soul Star) */
|
/* sync SUB-CPU with MAIN-CPU (Soul Star) */
|
||||||
if (!s68k.stopped && (s68k.cycles < cycles))
|
|
||||||
{
|
|
||||||
s68k_run(cycles);
|
s68k_run(cycles);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* SUB-CPU communication words */
|
|
||||||
if (index >= 0x20)
|
|
||||||
{
|
|
||||||
m68k_poll_detect(3 << (index - 0x10));
|
m68k_poll_detect(3 << (index - 0x10));
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -619,13 +619,13 @@ void ctrl_io_write_byte(unsigned int address, unsigned int data)
|
|||||||
{
|
{
|
||||||
/* level 2 interrupt enabled ? */
|
/* level 2 interrupt enabled ? */
|
||||||
if (scd.regs[0x32>>1].byte.l & 0x04)
|
if (scd.regs[0x32>>1].byte.l & 0x04)
|
||||||
|
{
|
||||||
|
if (!s68k.stopped)
|
||||||
{
|
{
|
||||||
/* relative SUB-CPU cycle counter */
|
/* relative SUB-CPU cycle counter */
|
||||||
unsigned int cycles = (m68k.cycles * SCYCLES_PER_LINE) / MCYCLES_PER_LINE;
|
unsigned int cycles = (m68k.cycles * SCYCLES_PER_LINE) / MCYCLES_PER_LINE;
|
||||||
|
|
||||||
/* sync SUB-CPU with MAIN-CPU (Earnest Evans, Fhey Area) */
|
/* sync SUB-CPU with MAIN-CPU (Earnest Evans, Fhey Area) */
|
||||||
if (!s68k.stopped && (s68k.cycles < cycles))
|
|
||||||
{
|
|
||||||
s68k_run(cycles);
|
s68k_run(cycles);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user