From 4b47c9f10218f306b11f2bea07623728574a625e Mon Sep 17 00:00:00 2001 From: AJR Date: Mon, 19 Apr 2021 15:44:17 -0400 Subject: [PATCH] mn1860: Identify another 2 opcodes in disassembly --- src/devices/cpu/mn1880/mn1880d.cpp | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/src/devices/cpu/mn1880/mn1880d.cpp b/src/devices/cpu/mn1880/mn1880d.cpp index bce7217b362..1064137f86a 100644 --- a/src/devices/cpu/mn1880/mn1880d.cpp +++ b/src/devices/cpu/mn1880/mn1880d.cpp @@ -157,8 +157,8 @@ const char *const mn1860_disassembler::s_inst_names[256] = "call", "call", "call", "call", "call", "call", "call", "call", "br", "br", "br", "br", "br", "br", "br", "br", "br", "br", "br", "br", "br", "br", "br", "br", - nullptr, "pop", nullptr, "pop", "pop", "pop", "pop", "pop", - nullptr, "push", nullptr, "push", "push", "push", "push", "push", + nullptr, "pop", "divl", "pop", "pop", "pop", "pop", "pop", + nullptr, "push", "mull", "push", "push", "push", "push", "push", "subcl", "div", "subcl", "subcl", "xch", "xch", "xch", "xch", "addcl", "mul", "addcl", "addcl", "mov", "mov", "mov", "mov", "cmp", "cmp", "cmp", "cmp", "xch", "xch", nullptr, "xch", @@ -303,7 +303,7 @@ void mn1880_disassembler::dasm_operands(std::ostream &stream, u8 opcode, offs_t stream << ", "; format_imm(stream, opcodes.r8(pc++)); } - else if (opcode < 0x50 || (opcode & 0xf7) == 0xb5 || ((opcode & 0xf7) == 0xc3 && m_inst_names[opcode][4] == 0)) + else if (opcode < 0x50 || (opcode & 0xf7) == 0xb5 || ((opcode & 0xf7) == 0xc3 && m_inst_names[opcode][4] == '\0')) { // Unary operations if (BIT(opcode, 0)) @@ -428,7 +428,7 @@ void mn1880_disassembler::dasm_operands(std::ostream &stream, u8 opcode, offs_t { if (BIT(opcode, 0)) stream << "fs"; - else + else if (m_inst_names[opcode][0] == 't' || m_inst_names[opcode][3] == '\0') { // CLR, SET, T1BNZ, T1BZ indirect (MN1870 only) format_indirect_bp(stream, "xp", opcodes.r8(pc++) & 0x07); @@ -439,6 +439,16 @@ void mn1880_disassembler::dasm_operands(std::ostream &stream, u8 opcode, offs_t ++pc; } } + else + { + // 3 direct operands? (MN1880 only) + format_direct(stream, opcodes.r8(pc + 2)); + stream << ", "; + format_direct(stream, opcodes.r8(pc)); + stream << ", "; + format_direct(stream, opcodes.r8(pc + 1)); + pc += 3; + } } else if (opcode < 0xc0 || (opcode & 0xfc) == 0xe4 || (opcode & 0xfe) == 0xfc) {