diff options
author | Ian C <ianc@noddybox.co.uk> | 2023-01-02 22:45:18 +0000 |
---|---|---|
committer | Ian C <ianc@noddybox.co.uk> | 2023-01-02 22:45:18 +0000 |
commit | 5b9ffe70b622cee65ed5678163bee0e22fc0433d (patch) | |
tree | b93acc4b6a9063d8a9bb83536c1658b010389a0b /source/z80.c | |
parent | 933aa1be6910ef49023716a59f815e679f0b934a (diff) |
Updated Z80. Emulator still crashing on most TAP files.
Diffstat (limited to 'source/z80.c')
-rw-r--r-- | source/z80.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/source/z80.c b/source/z80.c index 790aeec..0f1293a 100644 --- a/source/z80.c +++ b/source/z80.c @@ -68,6 +68,7 @@ static void Z80_CheckInterrupt(Z80 *cpu) PRIV->nmi=FALSE; PUSH(cpu->PC); cpu->PC=0x66; + PRIV->memptr.w=cpu->PC; } else if (cpu->IFF1) { @@ -95,11 +96,13 @@ static void Z80_CheckInterrupt(Z80 *cpu) case 1: PUSH(cpu->PC); cpu->PC=0x38; + PRIV->memptr.w=cpu->PC; break; case 2: PUSH(cpu->PC); cpu->PC=(Z80Word)cpu->I*256+PRIV->devbyte; + PRIV->memptr.w=cpu->PC; break; } } @@ -198,6 +201,8 @@ void Z80Reset(Z80 *cpu) PRIV->raise=FALSE; PRIV->nmi=FALSE; + + PRIV->memptr.w = 0x0000; } |