1
0
mirror of https://github.com/TomHarte/CLK.git synced 2024-07-09 06:29:33 +00:00

Extends correct text handling to 80-column mode.

This commit is contained in:
Thomas Harte 2018-08-04 22:25:29 -04:00
parent 101fb5d7bf
commit 55f2fccf5e

View File

@ -292,15 +292,19 @@ template <class BusHandler, bool is_iie> class Video: public VideoBase {
case GraphicsMode::DoubleText: {
const uint8_t inverses[] = {
0xff,
static_cast<uint8_t>((flash_ / flash_length) * 0xff),
alternative_character_set_ ? static_cast<uint8_t>(0xff) : static_cast<uint8_t>((flash_ / flash_length) * 0xff),
0x00,
0x00
};
const uint8_t masks[] = {
alternative_character_set_ ? static_cast<uint8_t>(0x7f) : static_cast<uint8_t>(0x3f),
is_iie ? 0x7f : 0x3f,
};
for(int c = column_; c < pixel_end; ++c) {
const uint16_t characters = bus_handler_.perform_aux_read(static_cast<uint16_t>(text_address + c));
const std::size_t character_addresses[2] = {
static_cast<std::size_t>((((characters >> 8) & 0x3f) << 3) + pixel_row),
static_cast<std::size_t>(((characters & 0x3f) << 3) + pixel_row),
static_cast<std::size_t>((((characters >> 8) & masks[characters >> 15]) << 3) + pixel_row),
static_cast<std::size_t>(((characters & masks[(characters >> 7)&1]) << 3) + pixel_row),
};
const uint8_t character_patterns[2] = {