1
0
mirror of https://github.com/TomHarte/CLK.git synced 2024-07-04 18:29:40 +00:00

Resolves fetch errors.

This commit is contained in:
Thomas Harte 2020-02-09 17:04:49 -05:00
parent 6ae42d07a7
commit 24340d1d4f
2 changed files with 2 additions and 3 deletions

View File

@ -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];

View File

@ -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;