1
0
mirror of https://github.com/TomHarte/CLK.git synced 2024-11-22 12:33:29 +00:00

Deal with dangling TODO.

This commit is contained in:
Thomas Harte 2021-07-03 13:07:41 -04:00
parent 2a6fff2008
commit 6b46212a4e

View File

@ -114,14 +114,12 @@ Cycles Nick::get_time_until_z80_slot(Cycles after_period) const {
void Nick::run_for(Cycles duration) { void Nick::run_for(Cycles duration) {
constexpr int line_length = 912; constexpr int line_length = 912;
// TODO: test here for window < 57? Or maybe just nudge up left_/right_margin_ if they #define add_window(x) \
// exactly equal 57?
#define add_window(x) \
line_data_pointer_[0] += is_sync_or_pixels_ * line_data_per_column_increments_[0] * (x); \ line_data_pointer_[0] += is_sync_or_pixels_ * line_data_per_column_increments_[0] * (x); \
line_data_pointer_[1] += is_sync_or_pixels_ * line_data_per_column_increments_[1] * (x); \ line_data_pointer_[1] += is_sync_or_pixels_ * line_data_per_column_increments_[1] * (x); \
window += x; \ window += x; \
if(window == left_margin_) is_sync_or_pixels_ = true; \ if(window != 57 && window == left_margin_) is_sync_or_pixels_ = true; \
if(window == right_margin_) is_sync_or_pixels_ = false; if(window != 57 && window == right_margin_) is_sync_or_pixels_ = false;
int clocks_remaining = duration.as<int>(); int clocks_remaining = duration.as<int>();
while(clocks_remaining) { while(clocks_remaining) {