From 894269aa067e3f990dfd7821ec3dfb8e5e33d4ae Mon Sep 17 00:00:00 2001 From: Thomas Harte Date: Thu, 17 Sep 2020 18:12:21 -0400 Subject: [PATCH] Allows for permitted 1/32nd timing error in `time_multiplier_`. --- Outputs/CRT/CRT.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Outputs/CRT/CRT.cpp b/Outputs/CRT/CRT.cpp index 7d9acee7d..c2af216c2 100644 --- a/Outputs/CRT/CRT.cpp +++ b/Outputs/CRT/CRT.cpp @@ -27,7 +27,7 @@ void CRT::set_new_timing(int cycles_per_line, int height_of_display, Outputs::Di // 7 microseconds for horizontal retrace and 500 to 750 microseconds for vertical retrace // in NTSC and PAL TV." - time_multiplier_ = 65535 / cycles_per_line; + time_multiplier_ = 63487 / cycles_per_line; // 63475 = 65535 * 31/32, i.e. the same 1/32 error as below is permitted. phase_denominator_ = int64_t(cycles_per_line) * int64_t(colour_cycle_denominator) * int64_t(time_multiplier_); phase_numerator_ = 0; colour_cycle_numerator_ = int64_t(colour_cycle_numerator);