I fiddled and fiddled and couldn't get the ap2000 to go past the initialization. It was totally baffling. I put in delays and delays and hit the NMI multiple times.
Then I read the datasheet over and over again and I got a clue:
![[Linked Image from i.imgur.com]](https://i.imgur.com/g4uiJZZ.png)
It says that you can sample the NMI input by using SKIT and SKNIT.
So it hits the SKIT NMI at $011E and never skips past the JMP $0000.
010A: 48 48 SKIT FAD
010C: 48 48 SKIT FAD
010E: FD JR $010C
010F: 53 DCR C
0110: FB JR $010C
0111: 4C E1 MOV A,CR1
0113: 74 4A 02 ONI B,$02
0116: C5 JR $011C
0117: 37 CA LTI A,$CA
0119: 6A FD MVI B,$FD
011B: E8 JR $0104
011C: 37 CA LTI A,$CA
011E: 48 40 SKIT NMI
0120: 54 00 00 JMP $0000
--- a/src/devices/cpu/upd7810/upd7810_opcodes.cpp
+++ b/src/devices/cpu/upd7810/upd7810_opcodes.cpp
@@ -343,7 +343,7 @@ void upd7810_device::DIV_C()
/* 48 40: 0100 1000 0100 0000 */
void upd7810_device::SKIT_NMI()
{
- if (IRR & INTNMI)
+ if (IRR & INTNMI || m_nmi)
PSW |= SK;
IRR &= ~INTNMI;
}
@@ -487,7 +487,7 @@ void upd7810_device::SKIT_SB()
/* 48 60: 0100 1000 0110 0000 */
void upd7810_device::SKNIT_NMI()
{
- if (0 == (IRR & INTNMI))
+ if (0 == (IRR & INTNMI) || !m_nmi)
PSW |= SK;
IRR &= ~INTNMI;
}
So I think that would be right, setting the skip flag if m_nmi is set for SKIT_NMI and if m_nmi is not set.
This gets it past this spot so it will start up.