From 7e14c8fbe8e757cac36c8ab0f06c6a18079eeeda Mon Sep 17 00:00:00 2001 From: Olivier Galibert Date: Tue, 31 Oct 2023 21:54:27 +0100 Subject: evo: Some more stuff --- src/devices/cpu/evolution/evod.cpp | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/src/devices/cpu/evolution/evod.cpp b/src/devices/cpu/evolution/evod.cpp index 7c2aaffa61e..35aa4ae8020 100644 --- a/src/devices/cpu/evolution/evod.cpp +++ b/src/devices/cpu/evolution/evod.cpp @@ -18,10 +18,13 @@ const char *const evolution_disassembler::regs[4] = { "a", "b", "c", "d" }; const evolution_disassembler::instruction evolution_disassembler::instructions[] = { { 0x9100, 0xff00, 1, [](std::ostream &stream, u16 opcode, u16 arg, u32 pc) { util::stream_format(stream, "bne %06x", (pc + 1 + s8(opcode)) & 0x1fffff); }}, { 0x9000, 0xf000, 1, [](std::ostream &stream, u16 opcode, u16 arg, u32 pc) { util::stream_format(stream, "bxx %x, %06x", (opcode >> 8) & 0xf, (pc + 1 + s8(opcode)) & 0x1fffff); }}, - { 0xa000, 0xf900, 1, [](std::ostream &stream, u16 opcode, u16 arg, u32 pc) { util::stream_format(stream, "move %s, %02x", regs[(opcode >> 9) & 3], opcode & 0xff); }}, - { 0xb000, 0xf900, 1, [](std::ostream &stream, u16 opcode, u16 arg, u32 pc) { util::stream_format(stream, "move %02x, %s", opcode & 0xff, regs[(opcode >> 9) & 3]); }}, - { 0xc000, 0xf900, 1, [](std::ostream &stream, u16 opcode, u16 arg, u32 pc) { util::stream_format(stream, "moveh #%02x, %s", opcode & 0xff, regs[(opcode >> 9) & 3]); }}, - { 0xd800, 0xf900, 1, [](std::ostream &stream, u16 opcode, u16 arg, u32 pc) { util::stream_format(stream, "movel #%02x, %s", opcode & 0xff, regs[(opcode >> 9) & 3]); }}, + { 0xa000, 0xf900, 1, [](std::ostream &stream, u16 opcode, u16 arg, u32 pc) { util::stream_format(stream, "%02x = %s", opcode & 0xff, regs[(opcode >> 9) & 3]); }}, + { 0xb000, 0xf900, 1, [](std::ostream &stream, u16 opcode, u16 arg, u32 pc) { util::stream_format(stream, "%s = %02x", regs[(opcode >> 9) & 3], opcode & 0xff); }}, + { 0xc000, 0xf900, 1, [](std::ostream &stream, u16 opcode, u16 arg, u32 pc) { util::stream_format(stream, "%s.h = #%02x", regs[(opcode >> 9) & 3], opcode & 0xff); }}, + { 0xc100, 0xf900, 1, [](std::ostream &stream, u16 opcode, u16 arg, u32 pc) { util::stream_format(stream, "%s = %s & #%02x", regs[(opcode >> 9) & 3], regs[(opcode >> 9) & 3], opcode & 0xff); }}, + { 0xd800, 0xf900, 1, [](std::ostream &stream, u16 opcode, u16 arg, u32 pc) { util::stream_format(stream, "%s = #%02x", regs[(opcode >> 9) & 3], opcode & 0xff); }}, + { 0xd900, 0xf900, 1, [](std::ostream &stream, u16 opcode, u16 arg, u32 pc) { util::stream_format(stream, "%s = %s ^ #%02x", regs[(opcode >> 9) & 3], regs[(opcode >> 9) & 3], opcode & 0xff); }}, + { 0xe000, 0xf900, 1, [](std::ostream &stream, u16 opcode, u16 arg, u32 pc) { util::stream_format(stream, "%02x <> %s", opcode & 0xff, regs[(opcode >> 9) & 3]); }}, { 0xe804, 0xf93f, 1, [](std::ostream &stream, u16 opcode, u16 arg, u32 pc) { util::stream_format(stream, "%s = %s - 1", regs[(opcode >> 9) & 3], regs[(opcode >> 6) & 3]); }}, { 0xfc8d, 0xffff, 1, [](std::ostream &stream, u16 opcode, u16 arg, u32 pc) { util::stream_format(stream, "push b"); }}, { 0xfccd, 0xffff, 1, [](std::ostream &stream, u16 opcode, u16 arg, u32 pc) { util::stream_format(stream, "pull b"); }}, @@ -31,7 +34,7 @@ const evolution_disassembler::instruction evolution_disassembler::instructions[] { 0xff42, 0xffff, 1, [](std::ostream &stream, u16 opcode, u16 arg, u32 pc) { util::stream_format(stream, "rts"); }}, { 0xffff, 0xffff, 1, [](std::ostream &stream, u16 opcode, u16 arg, u32 pc) { util::stream_format(stream, "nop"); }}, - { 0x0000, 0x0000, 1, [](std::ostream &stream, u16 opcode, u16 arg, u32 pc) { util::stream_format(stream, "? %04x", opcode); }} + { 0x0000, 0x0000, 1, [](std::ostream &stream, u16 opcode, u16 arg, u32 pc) { util::stream_format(stream, "? %04x (%s %s)", opcode, regs[(opcode >> 9) & 3], regs[(opcode >> 6) & 3]); }} }; offs_t evolution_disassembler::disassemble(std::ostream &stream, offs_t pc, const data_buffer &opcodes, const data_buffer ¶ms) -- cgit v1.2.3