mirror of
https://github.com/TomHarte/CLK.git
synced 2024-11-26 23:52:26 +00:00
Sought to ensure that communicating a colour burst in multiple parts doesn't ruin the phase.
This commit is contained in:
parent
6bcf95042c
commit
fcf8cafb5d
@ -222,6 +222,7 @@ void CRT::advance_cycles(unsigned int number_of_cycles, bool hsync_requested, bo
|
|||||||
(*(uint16_t *)&input_buffer[position + SourceVertexOffsetOfOutputStart + 2]) = output_y;
|
(*(uint16_t *)&input_buffer[position + SourceVertexOffsetOfOutputStart + 2]) = output_y;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
colour_burst_amplitude_ = 0;
|
||||||
}
|
}
|
||||||
is_writing_composite_run_ ^= true;
|
is_writing_composite_run_ ^= true;
|
||||||
}
|
}
|
||||||
@ -284,7 +285,7 @@ void CRT::output_scan(const Scan *const scan)
|
|||||||
// simplified colour burst logic: if it's within the back porch we'll take it
|
// simplified colour burst logic: if it's within the back porch we'll take it
|
||||||
if(scan->type == Scan::Type::ColourBurst)
|
if(scan->type == Scan::Type::ColourBurst)
|
||||||
{
|
{
|
||||||
if(horizontal_flywheel_->get_current_time() < (horizontal_flywheel_->get_standard_period() * 12) >> 6)
|
if(!colour_burst_amplitude_ && horizontal_flywheel_->get_current_time() < (horizontal_flywheel_->get_standard_period() * 12) >> 6)
|
||||||
{
|
{
|
||||||
unsigned int position_phase = (horizontal_flywheel_->get_current_time() * colour_cycle_numerator_ * 256) / phase_denominator_;
|
unsigned int position_phase = (horizontal_flywheel_->get_current_time() * colour_cycle_numerator_ * 256) / phase_denominator_;
|
||||||
colour_burst_phase_ = (position_phase + scan->phase) & 255;
|
colour_burst_phase_ = (position_phase + scan->phase) & 255;
|
||||||
|
Loading…
Reference in New Issue
Block a user