From d8b9cdf7a218137ffd7c413b8daa00d28da108be Mon Sep 17 00:00:00 2001 From: Thomas Harte Date: Sun, 20 Jun 2021 14:25:37 -0400 Subject: [PATCH] Correct multiplier. --- Machines/Enterprise/Enterprise.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/Machines/Enterprise/Enterprise.cpp b/Machines/Enterprise/Enterprise.cpp index cf6674bdd..cb62888fd 100644 --- a/Machines/Enterprise/Enterprise.cpp +++ b/Machines/Enterprise/Enterprise.cpp @@ -46,6 +46,12 @@ namespace Enterprise { => one cycle = 45440000 / 709379*912 = 45440000 / 646953648 = 2840000 / 40434603 µs => clock rate of 40434603 / 2840000 Mhz + And, therefore, the ratio to a 4Mhz Z80 clock is: + + 40434603 / (2840000 * 4) + = 40434603 / 11360000 + i.e. roughly 3.55 Nick cycles per Z80 cycle. + If that's true then the 6-cycle window is around 1.69 Z80 cycles long. Given that the Z80 clock in an Enterprise can be stopped in half-cycle increments only, the Z80 can only be guaranteed to have around a 1.19 cycle minimum for its actual access. I'm therefore further @@ -373,7 +379,7 @@ class ConcreteMachine: // MARK: - Chips. CPU::Z80::Processor z80_; - JustInTimeActor nick_; + JustInTimeActor nick_; bool previous_nick_interrupt_line_ = false; // Cf. timing guesses above. };