From 4ec462e79ad18d138b782e2c4c1b179602018b82 Mon Sep 17 00:00:00 2001 From: Adrian Conlon Date: Sat, 2 Jan 2021 11:04:38 +0000 Subject: [PATCH] Z80: Tidy the M1 activation sequence a little (start moving towards ZX Spectrum memory contention model) Signed-off-by: Adrian Conlon --- Z80/src/Z80.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Z80/src/Z80.cpp b/Z80/src/Z80.cpp index 5072c38..7716135 100644 --- a/Z80/src/Z80.cpp +++ b/Z80/src/Z80.cpp @@ -69,6 +69,8 @@ uint8_t EightBit::Z80::memoryRead() { public: _Reader(Z80& parent) : m_parent(parent) { m_parent.ReadingMemory.fire(EventArgs::empty()); + if (lowered(m_parent.M1())) + m_parent.tick(); m_parent.tick(2); m_parent.lowerMREQ(); } @@ -750,7 +752,6 @@ void EightBit::Z80::fetchDisplacement() { // CPU.The HALT acknowledge signal is active during this time indicating that the processor // is in the HALT state uint8_t EightBit::Z80::fetchOpCode() { - tick(); uint8_t returned; { _ActivateM1 m1(*this);