From 43ac20cbd2ce9ca293a44e1749d741b8ac70f30c Mon Sep 17 00:00:00 2001 From: Thomas Harte Date: Mon, 7 Oct 2024 21:50:56 -0400 Subject: [PATCH] Fix non-interlaced frame length. --- Components/6845/CRTC6845.hpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Components/6845/CRTC6845.hpp b/Components/6845/CRTC6845.hpp index ccf8d0b05..dfe402eea 100644 --- a/Components/6845/CRTC6845.hpp +++ b/Components/6845/CRTC6845.hpp @@ -262,8 +262,9 @@ template cl } if(character_reset_history_ & 4 && eom_latched_) { - is_in_adjustment_period_ |= adjustment_counter_ != (layout_.vertical.adjust + (odd_field_ ? 1 : 0)); - eof_latched_ |= adjustment_counter_ == layout_.vertical.adjust; + const auto adjust_length = layout_.vertical.adjust + (layout_.interlace_mode_ != InterlaceMode::Off && odd_field_ ? 1 : 0); + is_in_adjustment_period_ |= adjustment_counter_ != adjust_length; + eof_latched_ |= adjustment_counter_ == adjust_length; } //