From 10e440875759c191b55e8ff8c57c585726c36ead Mon Sep 17 00:00:00 2001 From: Ramiro Polla Date: Sun, 2 Nov 2014 23:14:49 +0100 Subject: [PATCH] upd7810: treat NMI like other interrupts --- src/emu/cpu/upd7810/upd7810.c | 21 +++++++++------------ 1 file changed, 9 insertions(+), 12 deletions(-) diff --git a/src/emu/cpu/upd7810/upd7810.c b/src/emu/cpu/upd7810/upd7810.c index 589e1a093ae..ec7e136f5e4 100644 --- a/src/emu/cpu/upd7810/upd7810.c +++ b/src/emu/cpu/upd7810/upd7810.c @@ -709,6 +709,14 @@ void upd7810_device::upd7810_take_irq() return; /* check the interrupts in priority sequence */ + if (IRR & INTNMI) + { + /* Nonmaskable interrupt */ + irqline = INPUT_LINE_NMI; + vector = 0x0004; + IRR &= ~INTNMI; + } + else if ((IRR & INTFT0) && 0 == (MKL & 0x02)) { vector = 0x0008; @@ -1968,18 +1976,7 @@ void upd7810_device::execute_set_input(int irqline, int state) { /* no nested NMIs ? */ // if (0 == (IRR & INTNMI)) - { - IRR |= INTNMI; - SP--; - WM( SP, PSW ); - SP--; - WM( SP, PCH ); - SP--; - WM( SP, PCL ); - IFF = 0; - PSW &= ~(SK|L0|L1); - PC = 0x0004; - } + IRR |= INTNMI; } else if (irqline == UPD7810_INTF1)