summaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
author Robbbert <Robbbert@users.noreply.github.com>2020-03-26 22:15:09 +1100
committer Robbbert <Robbbert@users.noreply.github.com>2020-03-26 22:15:09 +1100
commita8c0abadea40f6f65a4ac55583d678aa5be31993 (patch)
tree6f730d7abda12a1eb549d8f8629f009e6cdce718
parentee3207cb2e8dd194f0edf1c312b9c4fa97b3f083 (diff)
(nw) minx cpu: fixed disassembly of jump and call instructions; added notes.
-rw-r--r--src/devices/cpu/minx/minx.cpp1
-rw-r--r--src/devices/cpu/minx/minxd.cpp4
-rw-r--r--src/devices/cpu/minx/minxopce.h2
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 ); }