summaryrefslogtreecommitdiffstatshomepage
path: root/src
diff options
context:
space:
mode:
author Angelo Salese <angelosa@users.noreply.github.com>2009-06-19 15:21:23 +0000
committer Angelo Salese <angelosa@users.noreply.github.com>2009-06-19 15:21:23 +0000
commit318d6bfd3cef707b727088f08413c6e0f21888ef (patch)
tree73ec0adf9d4dbdad1af8ffbd240d6da352b7fcda /src
parente3fab21720943abbd3e72e9d65431a46c52aaf0a (diff)
mc68hc11: Added JMP INDX, JMP INDY, changed a reg_w assert to a logerror since this game writes 0xff to 0x00-0x3f I/O ports.
Fixed CMPA INDY wrong opcode bug.
Diffstat (limited to 'src')
-rw-r--r--src/emu/cpu/mc68hc11/hc11ops.c15
-rw-r--r--src/emu/cpu/mc68hc11/hc11ops.h4
-rw-r--r--src/emu/cpu/mc68hc11/mc68hc11.c3
3 files changed, 20 insertions, 2 deletions
diff --git a/src/emu/cpu/mc68hc11/hc11ops.c b/src/emu/cpu/mc68hc11/hc11ops.c
index d67825c1360..91a00e8379e 100644
--- a/src/emu/cpu/mc68hc11/hc11ops.c
+++ b/src/emu/cpu/mc68hc11/hc11ops.c
@@ -1388,6 +1388,21 @@ static void HC11OP(iny)(hc11_state *cpustate)
CYCLES(cpustate, 4);
}
+/* JMP IND X 0x6E */
+static void HC11OP(jmp_indx)(hc11_state *cpustate)
+{
+ UINT16 adr = FETCH(cpustate);
+ SET_PC(cpustate, cpustate->ix + adr);
+ CYCLES(cpustate, 3);
+}
+
+/* JMP IND Y 0x18 0x6E */
+static void HC11OP(jmp_indy)(hc11_state *cpustate)
+{
+ UINT16 adr = FETCH(cpustate);
+ SET_PC(cpustate, cpustate->iy + adr);
+ CYCLES(cpustate, 4);
+}
/* JMP EXT 0x7E */
static void HC11OP(jmp_ext)(hc11_state *cpustate)
diff --git a/src/emu/cpu/mc68hc11/hc11ops.h b/src/emu/cpu/mc68hc11/hc11ops.h
index c6c88ff3238..c069b5cc3cb 100644
--- a/src/emu/cpu/mc68hc11/hc11ops.h
+++ b/src/emu/cpu/mc68hc11/hc11ops.h
@@ -79,7 +79,7 @@ static const hc11_opcode_list_struct hc11_opcode_list[] =
{ 0, 0x91, HC11OP(cmpa_dir) },
{ 0, 0xb1, HC11OP(cmpa_ext) },
{ 0, 0xa1, HC11OP(cmpa_indx) },
- { 0x18, 0x81, HC11OP(cmpa_indy) },
+ { 0x18, 0xa1, HC11OP(cmpa_indy) },
{ 0, 0xc1, HC11OP(cmpb_imm) },
{ 0, 0xd1, HC11OP(cmpb_dir) },
{ 0, 0xf1, HC11OP(cmpb_ext) },
@@ -111,6 +111,8 @@ static const hc11_opcode_list_struct hc11_opcode_list[] =
{ 0, 0x4c, HC11OP(inca) },
{ 0, 0x08, HC11OP(inx) },
{ 0x18, 0x08, HC11OP(iny) },
+ { 0, 0x6e, HC11OP(jmp_indx) },
+ { 0x18, 0x6e, HC11OP(jmp_indy) },
{ 0, 0x7e, HC11OP(jmp_ext) },
{ 0, 0x9d, HC11OP(jsr_dir) },
{ 0, 0xbd, HC11OP(jsr_ext) },
diff --git a/src/emu/cpu/mc68hc11/mc68hc11.c b/src/emu/cpu/mc68hc11/mc68hc11.c
index c5ced5d9020..4c6813e26da 100644
--- a/src/emu/cpu/mc68hc11/mc68hc11.c
+++ b/src/emu/cpu/mc68hc11/mc68hc11.c
@@ -256,7 +256,8 @@ static void hc11_regs_w(hc11_state *cpustate, UINT32 address, UINT8 value)
return;
}
- fatalerror("HC11: regs_w %02X, %02X", reg, value);
+
+ logerror("HC11: regs_w %02X, %02X\n", reg, value);
}
/*****************************************************************************/