1
0
mirror of https://github.com/TomHarte/CLK.git synced 2024-06-25 18:30:07 +00:00

Route Yamaha 40-column text mode appropriately.

This commit is contained in:
Thomas Harte 2023-02-13 22:24:39 -05:00
parent c1457cc5e0
commit 5c7367b262
2 changed files with 8 additions and 1 deletions

View File

@ -321,7 +321,11 @@ void TMS9918<personality>::run_for(const HalfCycles cycles) {
this->mode_timing_.maximum_visible_sprites = 4;
switch(this->screen_mode_) {
case ScreenMode::Text:
next_line_buffer.fetch_mode = FetchMode::Text;
if constexpr (is_yamaha_vdp(personality)) {
next_line_buffer.fetch_mode = FetchMode::Yamaha;
} else {
next_line_buffer.fetch_mode = FetchMode::Text;
}
next_line_buffer.first_pixel_output_column = Timing<personality>::FirstTextCycle;
next_line_buffer.next_border_column = Timing<personality>::LastTextCycle;
next_line_buffer.pixel_count = 240;

View File

@ -323,6 +323,9 @@ void Base<personality>::draw_yamaha(int start, int end) {
#define Dispatch(x) case ScreenMode::x: draw_yamaha<ScreenMode::x>(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.
case ScreenMode::Text: draw_tms_text(start >> 2, end >> 2); break;
Dispatch(YamahaGraphics3);
Dispatch(YamahaGraphics4);
Dispatch(YamahaGraphics5);