1
0
mirror of https://github.com/TomHarte/CLK.git synced 2025-04-09 00:37:27 +00:00

CLRVBLINT calls it 3.75Hz. Which makes the arithmetic nicer.

This commit is contained in:
Thomas Harte 2020-11-29 21:25:06 -05:00
parent 4bdbca64b2
commit 46c1c9b5ee

View File

@ -155,8 +155,10 @@ void Video::advance(Cycles cycles) {
// Check for Mega II-style interrupt sources, prior to updating cycles_into_frame_.
if(cycles_into_frame_ < megaii_interrupt_point && next_cycles_into_frame >= megaii_interrupt_point) {
++megaii_frame_counter_;
megaii_interrupt_state_ |= 0x08 | ((megaii_frame_counter_ / 15) * 0x10);
megaii_frame_counter_ %= 15;
megaii_interrupt_state_ |= 0x08 | (megaii_frame_counter_ & 0x10);
megaii_frame_counter_ &= 15;
// The "quarter second interrupt" is also called the "3.75Hz interrupt" elsewhere.
// So trigger it every 16 frames.
}
// Update video output.