From 4741ad3a7e46eb169fa714a4b62814651878053c Mon Sep 17 00:00:00 2001 From: Aaron Giles Date: Thu, 28 Feb 2008 05:48:21 +0000 Subject: [PATCH] From: Robert [mailto:pac0446@bigpond.net.au] Subject: A fix for the z80pio Hi there, Here is a one-line fix for the z80pio. At the moment when the interrupt control word is sent (with interrupts enabled), an interrupt occurs. In reality, interrupts are disabled until the interrupt mask byte is sent. --- src/emu/machine/z80pio.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/emu/machine/z80pio.c b/src/emu/machine/z80pio.c index 1a74dbac07d..ab9f43ba65a 100644 --- a/src/emu/machine/z80pio.c +++ b/src/emu/machine/z80pio.c @@ -109,7 +109,7 @@ static void update_irq_state(z80pio *pio, int ch) int old_state = pio->int_state[ch]; int irq = 0; int data; - if (pio->mode[ch] == 0x13) return; + if (pio->mode[ch] == 0x13 || (pio->enable[ch] & PIO_INT_MASK)) return; /* only check if interrupts are enabled */ if (pio->enable[ch] & PIO_INT_ENABLE)