1
0
mirror of https://github.com/TomHarte/CLK.git synced 2025-01-12 15:31:09 +00:00

Merge pull request #1131 from TomHarte/MSXLineInterrupts

Restrict disabled MSX line interrupt signalling.
This commit is contained in:
Thomas Harte 2023-05-08 09:55:52 -04:00 committed by GitHub
commit 54f5bae59e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -44,8 +44,11 @@ Base<personality>::Base() :
}
if constexpr (is_yamaha_vdp(personality)) {
// TODO: start of sync, or end of sync?
mode_timing_.line_interrupt_position = 0;//Timing<personality>::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<personality>::EndOfSync;
}
// Establish that output is delayed after reading by `output_lag` cycles,
@ -1110,7 +1113,7 @@ uint8_t Base<personality>::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;