From 233a627c9fe7ed3fad8827791a8b0ad6aa545ed6 Mon Sep 17 00:00:00 2001 From: Thomas Harte Date: Tue, 31 Dec 2024 08:25:05 -0500 Subject: [PATCH] Correct longstanding confusion over character fetch. --- Machines/Commodore/Plus4/Video.hpp | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/Machines/Commodore/Plus4/Video.hpp b/Machines/Commodore/Plus4/Video.hpp index 5427204f4..45a9bb09b 100644 --- a/Machines/Commodore/Plus4/Video.hpp +++ b/Machines/Commodore/Plus4/Video.hpp @@ -290,14 +290,13 @@ public: const uint16_t address = video_matrix_base_ + video_counter_; if(bad_line2_) { shifter_.write<1>(pager_.read(address)); - } else { - const auto data = pager_.read(address + 0x400); - shifter_.write<0>(data); - if(bad_line()) next_character_.write(data); + } else if(bad_line()) { + next_character_.write(shifter_.read<0>()); + shifter_.write<0>(pager_.read(address + 0x400)); } - next_attribute_.write(shifter_.read<1>()); if(!bad_line()) next_character_.write(shifter_.read<0>()); + next_attribute_.write(shifter_.read<1>()); next_cursor_.write( (flash_count_ & 0x10) && (