1
0
mirror of https://github.com/TomHarte/CLK.git synced 2024-11-26 23:52:26 +00:00

Experimented with going back to horizontal sync on leading edge; not sure so (temporarily?) disabled.

This commit is contained in:
Thomas Harte 2016-03-08 22:54:05 -05:00
parent 68da673a95
commit 7255408313
2 changed files with 9 additions and 6 deletions

View File

@ -274,14 +274,17 @@ void CRT::advance_cycles(unsigned int number_of_cycles, unsigned int source_divi
#pragma mark - stream feeding methods
void CRT::output_scan(Scan *scan)
void CRT::output_scan(const Scan *const scan)
{
bool this_is_sync = (scan->type == Scan::Type::Sync);
bool is_trailing_edge = (_is_receiving_sync && !this_is_sync);
bool hsync_requested = is_trailing_edge && (_sync_period < (_horizontal_flywheel->get_scan_period() >> 2));
bool vsync_requested = is_trailing_edge && (_sync_capacitor_charge_level >= _sync_capacitor_charge_threshold);
const bool this_is_sync = (scan->type == Scan::Type::Sync);
const bool is_trailing_edge = (_is_receiving_sync && !this_is_sync);
// const bool is_leading_edge = (!_is_receiving_sync && this_is_sync);
_is_receiving_sync = this_is_sync;
// const bool hsync_requested = is_leading_edge;
const bool hsync_requested = is_trailing_edge && (_sync_period < (_horizontal_flywheel->get_scan_period() >> 2));
const bool vsync_requested = is_trailing_edge && (_sync_capacitor_charge_level >= _sync_capacitor_charge_threshold);
// simplified colour burst logic: if it's within the back porch we'll take it
if(scan->type == Scan::Type::ColourBurst)
{

View File

@ -61,7 +61,7 @@ class CRT {
};
};
};
void output_scan(Scan *scan);
void output_scan(const Scan *scan);
uint8_t _colour_burst_phase, _colour_burst_amplitude;
uint16_t _colour_burst_time;