diff --git a/Components/6845/CRTC6845.hpp b/Components/6845/CRTC6845.hpp index 57ede1dc7..d8d6e4eed 100644 --- a/Components/6845/CRTC6845.hpp +++ b/Components/6845/CRTC6845.hpp @@ -271,15 +271,25 @@ template cl // if(new_frame) { + line_address_ = layout_.start_address; + } else if(character_counter_ == layout_.horizontal.displayed && line_total_hit) { + line_address_ = bus_state_.refresh_address; + } + if(new_frame) { + bus_state_.refresh_address = layout_.start_address; + } else if(character_total_hit) { + layout_.start_address = line_address_; + } else { + layout_.start_address = (layout_.start_address + 1) & RefreshMask; } // Do bus work. -// bus_state_.refresh_address = (bus_state_.refresh_address + 1) & RefreshMask; -// // bus_state_.cursor = is_cursor_line_ && // bus_state_.refresh_address == layout_.cursor_address; + bus_state_.display_enable = character_is_visible_; + perform_bus_cycle_phase1(); perform_bus_cycle_phase2(); }