From 71069bef0f162c6d659b0365b268be75177e6637 Mon Sep 17 00:00:00 2001 From: Thomas Harte Date: Thu, 7 Dec 2023 12:17:19 -0500 Subject: [PATCH] Correct get_scaled_scan_status. --- Machines/PCCompatible/CGA.hpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Machines/PCCompatible/CGA.hpp b/Machines/PCCompatible/CGA.hpp index b73744ac9..5bddbec10 100644 --- a/Machines/PCCompatible/CGA.hpp +++ b/Machines/PCCompatible/CGA.hpp @@ -89,9 +89,10 @@ class CGA { void set_scan_target(Outputs::Display::ScanTarget *scan_target) { outputter_.crt.set_scan_target(scan_target); } - Outputs::Display::ScanStatus get_scaled_scan_status() const { - return outputter_.crt.get_scaled_scan_status() * float(outputter_.clock_divider) / (3.0f * 4.0f); + // The CRT is always handed data at the full CGA pixel clock rate, so just + // divide by 12 to get back to the rate that run_for is being called at. + return outputter_.crt.get_scaled_scan_status() / 12.0f; } private: