1
0
mirror of https://github.com/TomHarte/CLK.git synced 2024-12-01 11:49:58 +00:00

Attempts to complete handling of VRES.

This commit is contained in:
Thomas Harte 2021-06-19 22:00:19 -04:00
parent fadb04f3f3
commit 23e26e0333

View File

@ -336,7 +336,7 @@ void Nick::run_for(Cycles duration) {
} }
} }
// TODO: logic below is very incomplete. // Deal with VRES and other address reloading, dependant upon mode.
switch(mode_) { switch(mode_) {
default: break; default: break;
case Mode::CH64: case Mode::CH64:
@ -352,6 +352,14 @@ void Nick::run_for(Cycles duration) {
line_data_pointer_[0] = uint16_t(line_parameters_[4] | (line_parameters_[5] << 8)); line_data_pointer_[0] = uint16_t(line_parameters_[4] | (line_parameters_[5] << 8));
} }
break; break;
case Mode::Pixel:
case Mode::LPixel:
// If VRES is clear, reload the pixel address.
if(!(line_parameters_[1] & 0x10)) {
line_data_pointer_[0] = uint16_t(line_parameters_[4] | (line_parameters_[5] << 8));
}
break;
} }
} }
} }