From a8c0abadea40f6f65a4ac55583d678aa5be31993 Mon Sep 17 00:00:00 2001 From: Robbbert Date: Thu, 26 Mar 2020 22:15:09 +1100 Subject: (nw) minx cpu: fixed disassembly of jump and call instructions; added notes. --- src/devices/cpu/minx/minx.cpp | 1 + src/devices/cpu/minx/minxd.cpp | 4 ++-- src/devices/cpu/minx/minxopce.h | 2 +- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/devices/cpu/minx/minx.cpp b/src/devices/cpu/minx/minx.cpp index a78ee20a92c..dcf11c24f25 100644 --- a/src/devices/cpu/minx/minx.cpp +++ b/src/devices/cpu/minx/minx.cpp @@ -41,6 +41,7 @@ TODO: - Add support for O and C flags in NEG8 instruction - Verify MUL (CE D8) and DIV (CE D9) - Doublecheck behaviour of CMPN instructions ( CF 60 .. CF 63 ) +- DIV (CE D9) division by zero handling - is supposed to raise a EX4 exception. A real Pokemini unit will freeze. MAME currently will crash. */ diff --git a/src/devices/cpu/minx/minxd.cpp b/src/devices/cpu/minx/minxd.cpp index 413f588369f..21fd398c782 100644 --- a/src/devices/cpu/minx/minxd.cpp +++ b/src/devices/cpu/minx/minxd.cpp @@ -317,13 +317,13 @@ case I_16: /* 16 bit immediate */ \ break; \ case D_8: /* PC + 8 bit displacement (signed) */ \ ofs8 = opcodes.r8(pos++); \ - util::stream_format(stream, "%c$%04X", fill, pc + pos - 1 + ofs8); \ + util::stream_format(stream, "%c$%04X", fill, pos - 1 + ofs8); \ break; \ case D_16: /* PC + 16 bit displacement */ \ ea = opcodes.r8(pos++); \ ea += opcodes.r8(pos++) << 8; \ ea = ea - 1; \ - util::stream_format(stream, "%c$%04X", fill, pc + pos + ea); \ + util::stream_format(stream, "%c$%04X", fill, pos + ea); \ break; \ case S_8: /* SP + 8 bit displacement (signed) */ \ ea = opcodes.r8(pos++); \ diff --git a/src/devices/cpu/minx/minxopce.h b/src/devices/cpu/minx/minxopce.h index 2d44decf802..ee322d668cb 100644 --- a/src/devices/cpu/minx/minxopce.h +++ b/src/devices/cpu/minx/minxopce.h @@ -367,7 +367,7 @@ void minx_cpu_device::execute_one_ce() break; case 0xAE: { /* HALT */ m_halted = 1; } break; - case 0xAF: { } + case 0xAF: { /* STOP */ } break; case 0xB0: { m_BA = ( m_BA & 0x00FF ) | ( AND8( ( m_BA >> 8 ), rdop() ) << 8 ); } -- cgit v1.2.3