summaryrefslogtreecommitdiffstatshomepage
path: root/src/emu/cpu
diff options
context:
space:
mode:
author Angelo Salese <angelosa@users.noreply.github.com>2009-06-26 18:41:04 +0000
committer Angelo Salese <angelosa@users.noreply.github.com>2009-06-26 18:41:04 +0000
commit604e49b30325450e2bef760920de85e29c8cc3be (patch)
tree1642f7caa56517f19dbfaca014b43a3889bf89c7 /src/emu/cpu
parentb05ddea7569127e6d1ea463efb32bcf4dbed40eb (diff)
mc68hc11: added STX DIR, STY DIR opcodes
Diffstat (limited to 'src/emu/cpu')
-rw-r--r--src/emu/cpu/mc68hc11/hc11ops.c25
-rw-r--r--src/emu/cpu/mc68hc11/hc11ops.h4
2 files changed, 27 insertions, 2 deletions
diff --git a/src/emu/cpu/mc68hc11/hc11ops.c b/src/emu/cpu/mc68hc11/hc11ops.c
index 56ee70af433..b23830ad47a 100644
--- a/src/emu/cpu/mc68hc11/hc11ops.c
+++ b/src/emu/cpu/mc68hc11/hc11ops.c
@@ -2920,6 +2920,18 @@ static void HC11OP(std_indy)(hc11_state *cpustate)
CYCLES(cpustate, 6);
}
+/* STX DIR 0xDF */
+static void HC11OP(stx_dir)(hc11_state *cpustate)
+{
+ UINT8 adr = FETCH(cpustate);
+ UINT16 r = cpustate->ix;
+ CLEAR_NZV(cpustate);
+ WRITE8(cpustate, adr, (r & 0xff00) >> 8);
+ WRITE8(cpustate, adr + 1, (r & 0xff));
+ SET_N16(r);
+ SET_Z16(r);
+ CYCLES(cpustate, 4);
+}
/* STX EXT 0xFF */
static void HC11OP(stx_ext)(hc11_state *cpustate)
@@ -2962,6 +2974,19 @@ static void HC11OP(stx_indy)(hc11_state *cpustate)
CYCLES(cpustate, 6);
}
+/* STY DIR 0x18 0xDF */
+static void HC11OP(sty_dir)(hc11_state *cpustate)
+{
+ UINT8 adr = FETCH(cpustate);
+ UINT16 r = cpustate->iy;
+ CLEAR_NZV(cpustate);
+ WRITE8(cpustate, adr, (r & 0xff00) >> 8);
+ WRITE8(cpustate, adr + 1, (r & 0xff));
+ SET_N16(r);
+ SET_Z16(r);
+ CYCLES(cpustate, 5);
+}
+
/* STY EXT 0x18 0xFF */
static void HC11OP(sty_ext)(hc11_state *cpustate)
diff --git a/src/emu/cpu/mc68hc11/hc11ops.h b/src/emu/cpu/mc68hc11/hc11ops.h
index e6a94d00de1..f3c9a18e49b 100644
--- a/src/emu/cpu/mc68hc11/hc11ops.h
+++ b/src/emu/cpu/mc68hc11/hc11ops.h
@@ -275,11 +275,11 @@ static const hc11_opcode_list_struct hc11_opcode_list[] =
// { 0, 0xbf, HC11OP(sts_ext) },
// { 0, 0xaf, HC11OP(sts_indx) },
// { 0x18, 0xaf, HC11OP(sts_indy) },
-// { 0, 0xdf, HC11OP(stx_dir) },
+ { 0, 0xdf, HC11OP(stx_dir) },
{ 0, 0xff, HC11OP(stx_ext) },
{ 0, 0xef, HC11OP(stx_indx) },
{ 0xcd, 0xef, HC11OP(stx_indy) },
-// { 0x18, 0xdf, HC11OP(sty_dir) },
+ { 0x18, 0xdf, HC11OP(sty_dir) },
{ 0x18, 0xff, HC11OP(sty_ext) },
{ 0x1a, 0xef, HC11OP(sty_indx) },
{ 0x18, 0xef, HC11OP(sty_indy) },