1
0
mirror of https://github.com/TomHarte/CLK.git synced 2024-12-28 07:29:45 +00:00

Adds some debugging `asserts.

This commit is contained in:
Thomas Harte 2020-01-29 22:45:44 -05:00
parent ee16095863
commit f9ce50d2bb
2 changed files with 3 additions and 0 deletions

View File

@ -469,6 +469,7 @@ class ConcreteMachine:
length -= cycles_until_video_event_;
video_ += cycles_until_video_event_;
cycles_until_video_event_ = video_->get_next_sequence_point();
assert(cycles_until_video_event_ > HalfCycles(0));
mfp_->set_timer_event_input(1, video_->display_enabled());
update_interrupt_input();

View File

@ -294,6 +294,8 @@ void CRT::advance_cycles(int number_of_cycles, bool hsync_requested, bool vsync_
// MARK: - stream feeding methods
void CRT::output_scan(const Scan *const scan) {
assert(scan->number_of_cycles >= 0);
// Simplified colour burst logic: if it's within the back porch we'll take it.
if(scan->type == Scan::Type::ColourBurst) {
if(!colour_burst_amplitude_ && horizontal_flywheel_->get_current_time() < (horizontal_flywheel_->get_standard_period() * 12) >> 6) {