From 4bf2e471e689f25c8ec8a4df755fbef013467c1f Mon Sep 17 00:00:00 2001 From: Thomas Harte Date: Mon, 6 Apr 2026 10:41:24 -0400 Subject: [PATCH] Tweak again. --- Machines/Thomson/MO5/CD90-640.cpp | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/Machines/Thomson/MO5/CD90-640.cpp b/Machines/Thomson/MO5/CD90-640.cpp index 831c7a83b..0a0fb75d1 100644 --- a/Machines/Thomson/MO5/CD90-640.cpp +++ b/Machines/Thomson/MO5/CD90-640.cpp @@ -40,7 +40,7 @@ CD90_640::CD90_640() : WD::WD1770(P1770) { // ; // a2a1 LDY #M09C4 ; 4 µs // a2a5 DEY ; 4 µs - // a2a7 BNE ZA2A5 ; 3 µs = net delay of 4 + 9C4*7 = 17,500 µs + // a2a7 BNE ZA2A5 ; 3 µs = net delay of 4 + 9C4*7 = 17,504 µs // // a2a9 PSHS CC ; 6 µs // a2ab SEIF ; 3 µs @@ -68,7 +68,7 @@ CD90_640::CD90_640() : WD::WD1770(P1770) { // If I've disassembled that correctly, then the process is: // // (1) wait for index hole, with up to 9 µs of latency; - // (2) spin in a loop for 17,500 µs; + // (2) spin in a loop for 17,504 µs; // (3) do minor stack/flag work for 9 µs; // (4) count time from here until next index hole, ending with Y = time/13; // (5) test that that is within the bounds 0x311b, 0x3357. @@ -76,18 +76,18 @@ CD90_640::CD90_640() : WD::WD1770(P1770) { // Ignoring minor potential latencies in loop exits, that's: // // (1) wait for index hole; - // (2) spend 17,509 µs doing something else; + // (2) spend 17,513 µs doing something else; // (3) get Y = [µs from there to next index hole] / 13. // // i.e. it's a test that the rotation it samples takes n µs, where: // - // 13 * 0x311b < n - 17,509 < 13 * 0x3357 - // 13 * 12,571 + 17,509 < n < 13 * 13,143 + 17,509 - // 180,932 < n < 188,368 + // 13 * 0x311b < n - 17,513 < 13 * 0x3357 + // 13 * 12,571 + 17,513 < n < 13 * 13,143 + 17,513 + // 180,936 < n < 188,372 // // i.e. // - // 331 >= RPM >= 319 RPM. + // ~331 >= RPM >= ~319 RPM. // // So 325 RPM is a really weird number but I can't currently say why it should be // wrong rather than merely unexpected. So here it is.