From 9b71f423752ff0512df130490f9187c82b9a18bb Mon Sep 17 00:00:00 2001 From: Thomas Harte Date: Tue, 14 Feb 2023 21:18:10 -0500 Subject: [PATCH] Collect colours. --- Components/9918/Implementation/Fetch.hpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/Components/9918/Implementation/Fetch.hpp b/Components/9918/Implementation/Fetch.hpp index 8e12daf08..886cbf8a7 100644 --- a/Components/9918/Implementation/Fetch.hpp +++ b/Components/9918/Implementation/Fetch.hpp @@ -501,9 +501,11 @@ template void Base::fetch_yamaha(LineBuffer &line_ case Type::Colour: switch(mode) { - case ScreenMode::YamahaText80: - // TODO: read a single 'colour' (i.e. a bitfield, governing colour [/flashing?] selection for eight characters). - break; + case ScreenMode::YamahaText80: { + const auto column = AddressT(Storage::data_block_ >> 3); + const AddressT address = colour_table_address_ & (0x1fe00 | size_t(y >> 3) * 10); + line_buffer.characters.flags[column] = ram_[address]; + } break; default: break; }