diff --git a/Components/9918/Implementation/9918.cpp b/Components/9918/Implementation/9918.cpp index 61a227235..bb59af32b 100644 --- a/Components/9918/Implementation/9918.cpp +++ b/Components/9918/Implementation/9918.cpp @@ -44,8 +44,11 @@ Base::Base() : } if constexpr (is_yamaha_vdp(personality)) { - // TODO: start of sync, or end of sync? - mode_timing_.line_interrupt_position = 0;//Timing::StartOfSync; + // TODO: start of sync, or end of sync? Or elsewhere. + // Note that there's a bug elsewhere if the proper value of this is zero in the + // "if started before but reached this count" logic — that is boxed into considering + // a single line only so never sees starts before 0. + mode_timing_.line_interrupt_position = LineLayout::EndOfSync; } // Establish that output is delayed after reading by `output_lag` cycles, @@ -1110,7 +1113,7 @@ uint8_t Base::read_register() { // Reset upon read. const uint8_t result = (personality == Personality::V9938 ? 0x0 : 0x4) | - (line_interrupt_pending_ ? 0x01 : 0x00); + ((line_interrupt_pending_ && enable_line_interrupts_) ? 0x01 : 0x00); line_interrupt_pending_ = false; return result;