From bbccc5d6d62edc7b5ffa092d23725aa3b51472d6 Mon Sep 17 00:00:00 2001 From: Thomas Harte Date: Thu, 16 Feb 2023 22:07:18 -0500 Subject: [PATCH] Route other holdover TMS modes through the Yamaha logic. --- Components/9918/Implementation/9918.cpp | 6 +++++- Components/9918/Implementation/Draw.hpp | 5 ++++- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/Components/9918/Implementation/9918.cpp b/Components/9918/Implementation/9918.cpp index 6787a6ff6..743b43267 100644 --- a/Components/9918/Implementation/9918.cpp +++ b/Components/9918/Implementation/9918.cpp @@ -366,7 +366,11 @@ void TMS9918::run_for(const HalfCycles cycles) { break; default: // This covers both MultiColour and Graphics modes. - next_line_buffer.fetch_mode = FetchMode::Character; + if constexpr (is_yamaha_vdp(personality)) { + next_line_buffer.fetch_mode = FetchMode::Yamaha; + } else { + next_line_buffer.fetch_mode = FetchMode::Character; + } break; } diff --git a/Components/9918/Implementation/Draw.hpp b/Components/9918/Implementation/Draw.hpp index 1b013dd20..3ebcafe0f 100644 --- a/Components/9918/Implementation/Draw.hpp +++ b/Components/9918/Implementation/Draw.hpp @@ -338,9 +338,12 @@ void Base::draw_yamaha(int start, int end) { #define Dispatch(x) case ScreenMode::x: draw_yamaha(line_buffer, start, end); break; if constexpr (is_yamaha_vdp(personality)) { switch(line_buffer.screen_mode) { - // These modes look the same as on the TMS. + // Modes that are the same (or close enough) to those on the TMS. case ScreenMode::Text: draw_tms_text(start >> 2, end >> 2); break; case ScreenMode::YamahaText80: draw_tms_text(start >> 1, end >> 1); break; + case ScreenMode::MultiColour: + case ScreenMode::ColouredText: + case ScreenMode::Graphics: draw_tms_character(start >> 2, end >> 2); break; Dispatch(YamahaGraphics3); Dispatch(YamahaGraphics4);