From ffa5b2684201291ed2d0ef5b9443afe9c1369ae8 Mon Sep 17 00:00:00 2001 From: Ian C Date: Sat, 16 Sep 2006 22:52:02 +0000 Subject: Fix to IN A,(N) --- src/z80_decode.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'src/z80_decode.c') 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; -- cgit v1.2.3