From 344fec0683d0622639f5e67c25a44d8e6565d790 Mon Sep 17 00:00:00 2001 From: Thomas Harte Date: Mon, 1 Jan 2024 22:08:06 -0500 Subject: [PATCH] Fix Apple II inverse text errors. --- Machines/Apple/AppleII/VideoSwitches.hpp | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/Machines/Apple/AppleII/VideoSwitches.hpp b/Machines/Apple/AppleII/VideoSwitches.hpp index dd4845e2e..c6ba9adb1 100644 --- a/Machines/Apple/AppleII/VideoSwitches.hpp +++ b/Machines/Apple/AppleII/VideoSwitches.hpp @@ -39,7 +39,7 @@ template class VideoSwitches { set of potential flashing characters and alternate video modes. */ VideoSwitches(bool is_iie, TimeUnit delay, std::function &&target) : delay_(delay), deferrer_(std::move(target)) { - character_zones_[0].xor_mask = 0; + character_zones_[0].xor_mask = 0xff; character_zones_[0].address_mask = 0x3f; character_zones_[1].xor_mask = 0; character_zones_[1].address_mask = 0x3f; @@ -49,7 +49,7 @@ template class VideoSwitches { character_zones_[3].address_mask = 0x3f; if(is_iie) { - character_zones_[0].xor_mask = + character_zones_[1].xor_mask = character_zones_[2].xor_mask = character_zones_[3].xor_mask = 0xff; character_zones_[2].address_mask = @@ -88,7 +88,7 @@ template class VideoSwitches { if(alternative_character_set) { character_zones_[1].address_mask = 0xff; - character_zones_[1].xor_mask = 0; + character_zones_[1].xor_mask = 0xff; } else { character_zones_[1].address_mask = 0x3f; character_zones_[1].xor_mask = flash_mask(); @@ -286,7 +286,9 @@ template class VideoSwitches { // Update character set flashing; flashing is applied only when the alternative // character set is not selected. flash_ = (flash_ + 1) % (2 * flash_length); - character_zones_[1].xor_mask = flash_mask() * !internal_.alternative_character_set; + if(!internal_.alternative_character_set) { + character_zones_[1].xor_mask = flash_mask(); + } } private: