diff options
author | Ian C <ianc@noddybox.co.uk> | 2023-01-11 21:43:58 +0000 |
---|---|---|
committer | Ian C <ianc@noddybox.co.uk> | 2023-01-11 21:43:58 +0000 |
commit | d42634ec2748926eed6ce277f0c5046e73f682cf (patch) | |
tree | 6c1952dd89ba25dd23927a0cfb9fd3b6a94ff575 | |
parent | d1ca8a0f91d15e192e9c5f218524769d91e19a54 (diff) |
Fixed emulation of IM 2
-rw-r--r-- | z80.c | 5 |
1 files changed, 4 insertions, 1 deletions
@@ -48,6 +48,8 @@ static void InitTables() static void Z80_CheckInterrupt(Z80 *cpu) { + Z80Word vector; + /* Check interrupts */ if (PRIV->raise) @@ -99,7 +101,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; } |