diff options
author | Ian C <ianc@noddybox.co.uk> | 2006-09-16 22:52:02 +0000 |
---|---|---|
committer | Ian C <ianc@noddybox.co.uk> | 2006-09-16 22:52:02 +0000 |
commit | ffa5b2684201291ed2d0ef5b9443afe9c1369ae8 (patch) | |
tree | 7010d8899dfc7ca91ca0898c075dca5351efd1f5 /src | |
parent | 01d6960d6d6d980e2ca3919c5b231705f3f3f6db (diff) |
Fix to IN A,(N)
Diffstat (limited to 'src')
-rw-r--r-- | src/z80_decode.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/z80_decode.c b/src/z80_decode.c index e78206c..ced7fbd 100644 --- a/src/z80_decode.c +++ b/src/z80_decode.c @@ -2329,7 +2329,13 @@ void Z80_Decode(Z80 *cpu, Z80Byte opcode) case 0xdb: /* IN A,(n) */ TSTATE(11); if (cpu->pread) - cpu->AF.b[HI]=cpu->pread(cpu,FETCH_BYTE); + { + Z80Word port; + + port=FETCH_BYTE; + port|=(Z80Word)cpu->AF.b[HI]<<8; + cpu->AF.b[HI]=cpu->pread(cpu,port); + } else cpu->PC++; break; |