Timing fixes

This commit is contained in:
edmccard 2012-04-05 03:36:17 -04:00
parent 9642b19154
commit afc38b6775
2 changed files with 4 additions and 1 deletions

View File

@ -51,6 +51,8 @@ class Cmos(bool strict, bool cumulative) : Cpu!(strict, cumulative)
{ {
super.dec_addWithCarry(val); super.dec_addWithCarry(val);
peek(programCounter); peek(programCounter);
// TODO: fix this
static if (cumulative) tick(1);
flag.zero_ = flag.negative_ = accumulator; flag.zero_ = flag.negative_ = accumulator;
} }
@ -71,6 +73,8 @@ class Cmos(bool strict, bool cumulative) : Cpu!(strict, cumulative)
flag.carry = (diff < 0x100); flag.carry = (diff < 0x100);
peek(programCounter); peek(programCounter);
// TODO: fix this
static if (cumulative) tick(1);
flag.zero_ = flag.negative_ = accumulator = cast(ubyte)a; flag.zero_ = flag.negative_ = accumulator = cast(ubyte)a;
} }

View File

@ -38,7 +38,6 @@ class NmosUndoc(bool strict, bool cumulative) : NmosBase!(strict, cumulative)
/* TODO: check with the timer how many ticks until it would /* TODO: check with the timer how many ticks until it would
* stop me? */ * stop me? */
static if (cumulative) tick(totalCycles); static if (cumulative) tick(totalCycles);
else tick();
} }
final void addrImplied() final void addrImplied()