summaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
author smf- <smf-@users.noreply.github.com>2018-01-13 23:03:23 +0000
committer smf- <smf-@users.noreply.github.com>2018-01-13 23:04:42 +0000
commit05e59cf6aa66da9d707e53ae21971ab75879a94a (patch)
treea3bb4c83c757fd4ba18d320ffcbc87fa1a9aefc5
parent32156813c026e09090c279d11cb0803dd723f688 (diff)
fix disassembly when $ed, $dd & $fd prefixes are used but the instruction is not valid. [smf]
-rw-r--r--src/devices/cpu/z80/z80dasm.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/devices/cpu/z80/z80dasm.cpp b/src/devices/cpu/z80/z80dasm.cpp
index b59b3a38eb6..f579fd6d62d 100644
--- a/src/devices/cpu/z80/z80dasm.cpp
+++ b/src/devices/cpu/z80/z80dasm.cpp
@@ -416,6 +416,8 @@ offs_t z80_disassembler::disassemble(std::ostream &stream, offs_t pc, const data
break;
case 0xed:
d = &mnemonic_ed[opcodes.r8(pos++)];
+ if (d->mnemonic == zDB)
+ pos--;
break;
case 0xdd:
{
@@ -428,7 +430,11 @@ offs_t z80_disassembler::disassemble(std::ostream &stream, offs_t pc, const data
d = &mnemonic_xx_cb[op1];
}
else
+ {
d = &mnemonic_xx[op1];
+ if (d->mnemonic == zDB)
+ pos--;
+ }
break;
}
case 0xfd:
@@ -442,7 +448,11 @@ offs_t z80_disassembler::disassemble(std::ostream &stream, offs_t pc, const data
d = &mnemonic_xx_cb[op1];
}
else
+ {
d = &mnemonic_xx[op1];
+ if (d->mnemonic == zDB)
+ pos--;
+ }
break;
}
default: