From dc37d61797c255c94dafc58f79f76783d79d0ac9 Mon Sep 17 00:00:00 2001 From: Adrian Conlon Date: Sun, 29 Dec 2019 13:03:44 +0000 Subject: [PATCH] Tidy up some shared code for the Z80 pushWord vs call timing. Signed-off-by: Adrian Conlon --- Z80/inc/Z80.h | 4 ++-- Z80/src/Z80.cpp | 1 - inc/LittleEndianProcessor.h | 4 ++-- 3 files changed, 4 insertions(+), 5 deletions(-) diff --git a/Z80/inc/Z80.h b/Z80/inc/Z80.h index d6b22d9..216aefe 100644 --- a/Z80/inc/Z80.h +++ b/Z80/inc/Z80.h @@ -113,9 +113,9 @@ namespace EightBit { void handleRESET() final; void handleINT() final; - void call(const register16_t destination) override { + void pushWord(const register16_t destination) override { tick(); - IntelProcessor::call(destination); + IntelProcessor::pushWord(destination); } void busWrite() final; diff --git a/Z80/src/Z80.cpp b/Z80/src/Z80.cpp index b4c964a..60365cd 100644 --- a/Z80/src/Z80.cpp +++ b/Z80/src/Z80.cpp @@ -1362,7 +1362,6 @@ void EightBit::Z80::executeOther(const int x, const int y, const int z, const in case 5: // PUSH & various ops switch (q) { case 0: // PUSH rp2[p] - tick(); pushWord(RP2(p)); break; case 1: diff --git a/inc/LittleEndianProcessor.h b/inc/LittleEndianProcessor.h index e52ceaf..edbb46f 100644 --- a/inc/LittleEndianProcessor.h +++ b/inc/LittleEndianProcessor.h @@ -23,7 +23,7 @@ namespace EightBit { register16_t fetchWord() final; - void pushWord(register16_t value) final; - register16_t popWord() final; + void pushWord(register16_t value) override; + register16_t popWord() override; }; }