From 0ef7445dc7fb7b283a480b98ebbe873c7bd04bf1 Mon Sep 17 00:00:00 2001 From: Ian C Date: Wed, 11 Jan 2023 21:40:13 +0000 Subject: Added debug screens. Fixed the emulation of IM 2 which fixes the bad TAPs. --- source/z80.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'source/z80.c') diff --git a/source/z80.c b/source/z80.c index 0f1293a..d18640a 100644 --- a/source/z80.c +++ b/source/z80.c @@ -50,6 +50,8 @@ static void InitTables() static void Z80_CheckInterrupt(Z80 *cpu) { + Z80Word vector; + /* Check interrupts */ if (PRIV->raise) @@ -101,7 +103,8 @@ static void Z80_CheckInterrupt(Z80 *cpu) case 2: PUSH(cpu->PC); - cpu->PC=(Z80Word)cpu->I*256+PRIV->devbyte; + vector=(Z80Word)cpu->I*256+PRIV->devbyte; + cpu->PC=PEEKW(vector); PRIV->memptr.w=cpu->PC; break; } -- cgit v1.2.3