From a4c910f1dea2d716576f1e3b53ddb62d72eb4482 Mon Sep 17 00:00:00 2001 From: Thomas Harte Date: Thu, 10 Aug 2017 11:12:53 -0400 Subject: [PATCH] =?UTF-8?q?This=20appears=20to=20be=20a=20more=20accurate?= =?UTF-8?q?=20take=20on=206845=20address=20advancement=20=E2=80=94=20it=20?= =?UTF-8?q?is=20necessary=20that=20character=20output=20has=20finished=20f?= =?UTF-8?q?or=20the=20line=20address=20to=20be=20updated.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Components/6845/CRTC6845.hpp | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/Components/6845/CRTC6845.hpp b/Components/6845/CRTC6845.hpp index 2e113ed9e..15a50e6ba 100644 --- a/Components/6845/CRTC6845.hpp +++ b/Components/6845/CRTC6845.hpp @@ -71,9 +71,6 @@ template class CRTC6845 { // check for end-of-line if(is_end_of_line) { - character_counter_ = 0; - character_is_visible_ = true; - // check for end of vertical sync if(vsync_down_counter_) { vsync_down_counter_--; @@ -94,7 +91,8 @@ template class CRTC6845 { } else { // advance vertical counter if(bus_state_.row_address == registers_[9]) { - line_address_ = bus_state_.refresh_address; + if(!character_is_visible_) + line_address_ = bus_state_.refresh_address; bus_state_.row_address = 0; bool is_at_end_of_frame = line_counter_ == registers_[4]; @@ -126,9 +124,12 @@ template class CRTC6845 { } } else { bus_state_.row_address++; - bus_state_.refresh_address = line_address_; } + bus_state_.refresh_address = line_address_; } + + character_counter_ = 0; + character_is_visible_ = true; } bus_state_.display_enable = character_is_visible_ && line_is_visible_;