From afc38b67753cc184e0d777f708310206d3922757 Mon Sep 17 00:00:00 2001 From: edmccard Date: Thu, 5 Apr 2012 03:36:17 -0400 Subject: [PATCH] Timing fixes --- src/d6502/cmos.d | 4 ++++ src/d6502/nmosundoc.d | 1 - 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/src/d6502/cmos.d b/src/d6502/cmos.d index 0972594..f736676 100644 --- a/src/d6502/cmos.d +++ b/src/d6502/cmos.d @@ -51,6 +51,8 @@ class Cmos(bool strict, bool cumulative) : Cpu!(strict, cumulative) { super.dec_addWithCarry(val); peek(programCounter); + // TODO: fix this + static if (cumulative) tick(1); flag.zero_ = flag.negative_ = accumulator; } @@ -71,6 +73,8 @@ class Cmos(bool strict, bool cumulative) : Cpu!(strict, cumulative) flag.carry = (diff < 0x100); peek(programCounter); + // TODO: fix this + static if (cumulative) tick(1); flag.zero_ = flag.negative_ = accumulator = cast(ubyte)a; } diff --git a/src/d6502/nmosundoc.d b/src/d6502/nmosundoc.d index 5340abb..abea573 100644 --- a/src/d6502/nmosundoc.d +++ b/src/d6502/nmosundoc.d @@ -38,7 +38,6 @@ class NmosUndoc(bool strict, bool cumulative) : NmosBase!(strict, cumulative) /* TODO: check with the timer how many ticks until it would * stop me? */ static if (cumulative) tick(totalCycles); - else tick(); } final void addrImplied()