mirror of
https://github.com/holub/mame
synced 2025-05-24 14:56:21 +03:00
From: hoge hoge
Date: Sat, 25 Jul 2009 11:57:29 -0700 To: submit@mamedev.org<submit@mamedev.org> Subject: 68k cpu reset eat cycles fix Hello, Attached is a diff for 0133 that fixes a bug related to eating cycles during 68k cpu reset. Previously, initial_cycles had a wrong value after reset, and if cycles were < 0, it'd always return 0, .. check the diff to see what I mean. This change also happens to fix a scrolling bug in Fantasy Zone, introduced when that cycle eating thing was added. Greets, hap
This commit is contained in:
parent
422c6c0d60
commit
1fc576e72f
@ -540,15 +540,19 @@ static CPU_EXECUTE( m68k )
|
||||
{
|
||||
m68ki_cpu_core *m68k = get_safe_token(device);
|
||||
|
||||
m68k->initial_cycles = cycles;
|
||||
|
||||
/* eat up any reset cycles */
|
||||
cycles -= m68k->reset_cycles;
|
||||
m68k->reset_cycles = 0;
|
||||
if (cycles <= 0)
|
||||
return m68k->reset_cycles;
|
||||
if (m68k->reset_cycles) {
|
||||
int rc = m68k->reset_cycles;
|
||||
m68k->reset_cycles = 0;
|
||||
cycles -= rc;
|
||||
|
||||
if (cycles <= 0) return rc;
|
||||
}
|
||||
|
||||
/* Set our pool of clock cycles available */
|
||||
m68k->remaining_cycles = cycles;
|
||||
m68k->initial_cycles = cycles;
|
||||
|
||||
/* See if interrupts came in */
|
||||
m68ki_check_interrupts(m68k);
|
||||
|
Loading…
Reference in New Issue
Block a user