diff --git a/Components/6845/CRTC6845.hpp b/Components/6845/CRTC6845.hpp index 959f7f8a0..011b00b13 100644 --- a/Components/6845/CRTC6845.hpp +++ b/Components/6845/CRTC6845.hpp @@ -153,17 +153,17 @@ template class CRTC6845 { } else { line_counter_ = (line_counter_ + 1) & 0x7f; - // check for end of visible lines - if(line_counter_ == registers_[6]) { - line_is_visible_ = false; - } - // check for start of vertical sync if(line_counter_ == registers_[7]) { bus_state_.vsync = true; vsync_down_counter_ = registers_[3] >> 4; if(!vsync_down_counter_) vsync_down_counter_ = 16; } + + // check for end of visible lines + if(line_counter_ == registers_[6]) { + line_is_visible_ = false; + } } } else { bus_state_.row_address = (bus_state_.row_address + 1) & 0x1f;