From 55f2fccf5e19895d0339fdaf7482654e80efd62d Mon Sep 17 00:00:00 2001 From: Thomas Harte Date: Sat, 4 Aug 2018 22:25:29 -0400 Subject: [PATCH] Extends correct text handling to 80-column mode. --- Machines/AppleII/Video.hpp | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/Machines/AppleII/Video.hpp b/Machines/AppleII/Video.hpp index 92d94bdb4..ecf357905 100644 --- a/Machines/AppleII/Video.hpp +++ b/Machines/AppleII/Video.hpp @@ -292,15 +292,19 @@ template class Video: public VideoBase { case GraphicsMode::DoubleText: { const uint8_t inverses[] = { 0xff, - static_cast((flash_ / flash_length) * 0xff), + alternative_character_set_ ? static_cast(0xff) : static_cast((flash_ / flash_length) * 0xff), 0x00, 0x00 }; + const uint8_t masks[] = { + alternative_character_set_ ? static_cast(0x7f) : static_cast(0x3f), + is_iie ? 0x7f : 0x3f, + }; for(int c = column_; c < pixel_end; ++c) { const uint16_t characters = bus_handler_.perform_aux_read(static_cast(text_address + c)); const std::size_t character_addresses[2] = { - static_cast((((characters >> 8) & 0x3f) << 3) + pixel_row), - static_cast(((characters & 0x3f) << 3) + pixel_row), + static_cast((((characters >> 8) & masks[characters >> 15]) << 3) + pixel_row), + static_cast(((characters & masks[(characters >> 7)&1]) << 3) + pixel_row), }; const uint8_t character_patterns[2] = {