diff options
Diffstat (limited to 'src/z80_decode.c')
-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; |