diff --git a/Outputs/CRT/CRT.cpp b/Outputs/CRT/CRT.cpp index 637be7021..c7815bdb3 100644 --- a/Outputs/CRT/CRT.cpp +++ b/Outputs/CRT/CRT.cpp @@ -194,8 +194,8 @@ Outputs::Display::ScanTarget::Scan::EndPoint CRT::end_point(uint16_t data_offset end_point.y = uint16_t(vertical_flywheel_->get_current_output_position() / vertical_flywheel_output_divider_); end_point.data_offset = data_offset; - // TODO: this is a workaround for the limited precision that can be posted onwards; - // it'd be better to make time_multiplier_ an explicit modal and just not divide by it. + // Ensure .composite_angle is sampled at the location indicated by .cycles_since_end_of_horizontal_retrace. + // TODO: I could supply time_multiplier_ as a modal and just not round .cycles_since_end_of_horizontal_retrace. Would that be better? const auto lost_precision = cycles_since_horizontal_sync_ % time_multiplier_; end_point.composite_angle = int16_t(((phase_numerator_ - lost_precision * colour_cycle_numerator_) << 6) / phase_denominator_) * (is_alernate_line_ ? -1 : 1); end_point.cycles_since_end_of_horizontal_retrace = uint16_t(cycles_since_horizontal_sync_ / time_multiplier_);