summaryrefslogtreecommitdiff
path: root/source/z80.c
diff options
context:
space:
mode:
authorIan C <ianc@noddybox.co.uk>2023-01-11 21:40:13 +0000
committerIan C <ianc@noddybox.co.uk>2023-01-11 21:40:13 +0000
commit0ef7445dc7fb7b283a480b98ebbe873c7bd04bf1 (patch)
tree9477a7239dff12da489d201d5b525d296088f67e /source/z80.c
parent61ee8852d771cbb735366757e24130803c8d9762 (diff)
Added debug screens. Fixed the emulation of IM 2 which fixes the bad TAPs.
Diffstat (limited to 'source/z80.c')
-rw-r--r--source/z80.c5
1 files changed, 4 insertions, 1 deletions
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;
}