From 24340d1d4f5356cef7c9fcb02296d7656412f604 Mon Sep 17 00:00:00 2001 From: Thomas Harte Date: Sun, 9 Feb 2020 17:04:49 -0500 Subject: [PATCH] Resolves fetch errors. --- Machines/Atari/ST/Video.cpp | 4 ++-- Machines/Atari/ST/Video.hpp | 1 - 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/Machines/Atari/ST/Video.cpp b/Machines/Atari/ST/Video.cpp index ca84ed3c2..030c8a41e 100644 --- a/Machines/Atari/ST/Video.cpp +++ b/Machines/Atari/ST/Video.cpp @@ -194,8 +194,8 @@ void Video::run_for(HalfCycles duration) { // There will be pixels this line, subject to the shifter pipeline. // Divide into 8-[half-]cycle windows; at the start of each window fetch a word, // and during the rest of the window, shift out. - int start_column = since_load >> 3; - const int end_column = (since_load + run_length) >> 3; + int start_column = (since_load - 1) >> 3; + const int end_column = (since_load + run_length - 1) >> 3; while(start_column != end_column) { data_latch_[data_latch_position_] = ram_[current_address_ & 262143]; diff --git a/Machines/Atari/ST/Video.hpp b/Machines/Atari/ST/Video.hpp index a13ad8af1..34a0f94c0 100644 --- a/Machines/Atari/ST/Video.hpp +++ b/Machines/Atari/ST/Video.hpp @@ -133,7 +133,6 @@ class Video { int current_address_ = 0; uint16_t *ram_ = nullptr; - uint16_t line_buffer_[256]; int x_ = 0, y_ = 0, next_y_ = 0; bool load_ = false;