[Core/MCD] removed redundant checking on CPU sync

This commit is contained in:
EkeEke 2013-10-30 00:37:10 +01:00 committed by twinaphex
parent f4e5694ae4
commit 587a6dca1b
2 changed files with 26 additions and 26 deletions

View File

@ -232,7 +232,7 @@ static void s68k_poll_sync(unsigned int reg_mask)
unsigned int cycles = (s68k.cycles * MCYCLES_PER_LINE) / SCYCLES_PER_LINE;
/* sync MAIN-CPU with SUB-CPU */
if (!m68k.stopped && (m68k.cycles < cycles))
if (!m68k.stopped)
{
m68k_run(cycles);
}
@ -433,12 +433,12 @@ static unsigned int scd_read_word(unsigned int address)
/* MAIN-CPU communication words */
if ((address & 0x1f0) == 0x10)
{
/* relative MAIN-CPU cycle counter */
unsigned int cycles = (s68k.cycles * MCYCLES_PER_LINE) / SCYCLES_PER_LINE;
/* sync MAIN-CPU with SUB-CPU (Mighty Morphin Power Rangers) */
if (!m68k.stopped && (m68k.cycles < cycles))
if (!m68k.stopped)
{
/* relative MAIN-CPU cycle counter */
unsigned int cycles = (s68k.cycles * MCYCLES_PER_LINE) / SCYCLES_PER_LINE;
/* sync MAIN-CPU with SUB-CPU (Mighty Morphin Power Rangers) */
m68k_run(cycles);
}

View File

@ -269,7 +269,7 @@ static void m68k_poll_sync(unsigned int reg_mask)
unsigned int cycles = (m68k.cycles * SCYCLES_PER_LINE) / MCYCLES_PER_LINE;
/* sync SUB-CPU with MAIN-CPU */
if (!s68k.stopped && (s68k.cycles < cycles))
if (!s68k.stopped)
{
s68k_run(cycles);
}
@ -345,12 +345,12 @@ unsigned int ctrl_io_read_byte(unsigned int address)
/* SUB-CPU communication flags */
if (index == 0x0f)
{
/* relative SUB-CPU cycle counter */
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) */
if (!s68k.stopped && (s68k.cycles < cycles))
if (!s68k.stopped)
{
/* relative SUB-CPU cycle counter */
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) */
s68k_run(cycles);
}
@ -498,18 +498,18 @@ unsigned int ctrl_io_read_word(unsigned int address)
/* default registers */
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 */
if (index >= 0x20)
{
if (!s68k.stopped)
{
/* relative SUB-CPU cycle counter */
unsigned int cycles = (m68k.cycles * SCYCLES_PER_LINE) / MCYCLES_PER_LINE;
/* sync SUB-CPU with MAIN-CPU (Soul Star) */
s68k_run(cycles);
}
m68k_poll_detect(3 << (index - 0x10));
}
@ -620,12 +620,12 @@ void ctrl_io_write_byte(unsigned int address, unsigned int data)
/* level 2 interrupt enabled ? */
if (scd.regs[0x32>>1].byte.l & 0x04)
{
/* relative SUB-CPU cycle counter */
unsigned int cycles = (m68k.cycles * SCYCLES_PER_LINE) / MCYCLES_PER_LINE;
/* sync SUB-CPU with MAIN-CPU (Earnest Evans, Fhey Area) */
if (!s68k.stopped && (s68k.cycles < cycles))
if (!s68k.stopped)
{
/* relative SUB-CPU cycle counter */
unsigned int cycles = (m68k.cycles * SCYCLES_PER_LINE) / MCYCLES_PER_LINE;
/* sync SUB-CPU with MAIN-CPU (Earnest Evans, Fhey Area) */
s68k_run(cycles);
}