From a6617e57a1a34621a3db5eab43b39cb6b846fbae Mon Sep 17 00:00:00 2001 From: AJR Date: Tue, 2 Jul 2024 19:49:12 -0400 Subject: nx8_500s disassembler: Correct decoding of some DP/USP-based addressing modes where documentation appears to be wrong --- src/devices/cpu/olms66k/nx8dasm.cpp | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/devices/cpu/olms66k/nx8dasm.cpp b/src/devices/cpu/olms66k/nx8dasm.cpp index 33456aaeb99..bca54820c01 100644 --- a/src/devices/cpu/olms66k/nx8dasm.cpp +++ b/src/devices/cpu/olms66k/nx8dasm.cpp @@ -734,10 +734,11 @@ offs_t nx8_500s_disassembler::disassemble(std::ostream &stream, offs_t pc, const { const u8 byte2 = opcodes.r8(pc + 1); util::stream_format(stream, "%-8sA,%d", BIT(byte1, 4) ? "LB" : "L", util::sext(byte2, 7)); + // Documentation has these the other way around, but actual code suggests otherwise if (BIT(byte2, 7)) - stream << "[DP]"; - else stream << "[USP]"; + else + stream << "[DP]"; return 2 | SUPPORTED; } @@ -880,10 +881,11 @@ offs_t nx8_500s_disassembler::disassemble(std::ostream &stream, offs_t pc, const { const u8 byte2 = opcodes.r8(pc + 1); util::stream_format(stream, "%-8sA,%d", BIT(m_psw, 12) ? "ST" : "STB", util::sext(byte2, 7)); + // Documentation has these the other way around, but actual code suggests otherwise if (BIT(byte2, 7)) - stream << "[DP]"; - else stream << "[USP]"; + else + stream << "[DP]"; return 2 | SUPPORTED; } -- cgit v1.2.3