diff --git a/Machines/Atari/ST/AtariST.cpp b/Machines/Atari/ST/AtariST.cpp index 187ee2af1..16583a7f5 100644 --- a/Machines/Atari/ST/AtariST.cpp +++ b/Machines/Atari/ST/AtariST.cpp @@ -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(); diff --git a/Outputs/CRT/CRT.cpp b/Outputs/CRT/CRT.cpp index 84f30480d..a6e02aed9 100644 --- a/Outputs/CRT/CRT.cpp +++ b/Outputs/CRT/CRT.cpp @@ -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) {