mirror of
https://github.com/TomHarte/CLK.git
synced 2025-01-11 08:30:55 +00:00
Improves commentary.
This commit is contained in:
parent
5651ef606d
commit
69d21daaa3
@ -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_);
|
||||
|
Loading…
x
Reference in New Issue
Block a user