diff options
Diffstat (limited to 'src/devices/cpu/z8000/8000dasm.cpp')
-rw-r--r-- | src/devices/cpu/z8000/8000dasm.cpp | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/src/devices/cpu/z8000/8000dasm.cpp b/src/devices/cpu/z8000/8000dasm.cpp index 5a6d6c51596..a84d5d285e8 100644 --- a/src/devices/cpu/z8000/8000dasm.cpp +++ b/src/devices/cpu/z8000/8000dasm.cpp @@ -11,10 +11,12 @@ #include "emu.h" #include "z8000.h" #include "z8000cpu.h" + #include "debugger.h" #include "debug/debugvw.h" #include "debug/debugcon.h" + static int n[16]; /* opcode nibbles */ static int b[8]; /* opcode bytes */ static int w[4]; /* opcode words */ @@ -52,13 +54,11 @@ CPU_DISASSEMBLE(z8000) { int new_pc = pc, i, j, tmp; const char *src; - Z8000_exec *o; + z8002_device::Z8000_dasm o; uint32_t flags = 0; uint32_t old_w; - /* already initialized? */ - if(z8000_exec == nullptr) - z8000_init_tables(); + z8002_device::init_tables(); GET_OP(oprom, 0, new_pc - pc); new_pc += 2; @@ -74,11 +74,11 @@ CPU_DISASSEMBLE(z8000) util::stream_format(stream, ".word #%%%04x ;RST PC", w[0]); break; default: - o = &z8000_exec[w[0]]; - if (o->size > 1) { GET_OP(oprom, 1, new_pc - pc); new_pc += 2; } - if (o->size > 2) { GET_OP(oprom, 2, new_pc - pc); new_pc += 2; } - src = o->dasm; - flags = o->dasmflags; + o = z8002_device::dasm(w[0]); + if (o.size > 1) { GET_OP(oprom, 1, new_pc - pc); new_pc += 2; } + if (o.size > 2) { GET_OP(oprom, 2, new_pc - pc); new_pc += 2; } + src = o.dasm; + flags = o.flags; while (*src) { @@ -198,9 +198,9 @@ CPU_DISASSEMBLE(z8000) if (z8k_segm) { if (w[i] & 0x8000) { old_w = w[i]; - for (j = i; j < o->size; j++) + for (j = i; j < o.size; j++) w[j] = w[j + 1]; - GET_OP(oprom, o->size - 1, new_pc - pc); + GET_OP(oprom, o.size - 1, new_pc - pc); new_pc += 2; w[i] = ((old_w & 0x7f00) << 16) | (w[i] & 0xffff); } |