mirror of
https://github.com/TomHarte/CLK.git
synced 2024-11-26 08:49:37 +00:00
Slightly relaxed vertical sync testing.
This commit is contained in:
parent
ba4f2d8917
commit
55fd9122d0
@ -36,7 +36,10 @@ void CRT::set_new_timing(unsigned int cycles_per_line, unsigned int height_of_di
|
||||
cycles_per_line_ = cycles_per_line;
|
||||
unsigned int multiplied_cycles_per_line = cycles_per_line * time_multiplier_;
|
||||
|
||||
sync_capacitor_charge_threshold_ = (vertical_sync_half_lines * cycles_per_line) >> 1;
|
||||
// allow sync to be detected (and acted upon) a line earlier than the specified requirement,
|
||||
// as a simple way of avoiding not-quite-exact comparison issues while still being true enough to
|
||||
// the gist for simple debugging
|
||||
sync_capacitor_charge_threshold_ = ((vertical_sync_half_lines - 2) * cycles_per_line) >> 1;
|
||||
|
||||
// create the two flywheels
|
||||
horizontal_flywheel_.reset(new Flywheel(multiplied_cycles_per_line, (millisecondsHorizontalRetraceTime * multiplied_cycles_per_line) >> 6, multiplied_cycles_per_line >> 6));
|
||||
|
Loading…
Reference in New Issue
Block a user