diff --git a/src/emu/cpu/mc68hc11/hc11ops.c b/src/emu/cpu/mc68hc11/hc11ops.c index 320231a52c2..d67825c1360 100644 --- a/src/emu/cpu/mc68hc11/hc11ops.c +++ b/src/emu/cpu/mc68hc11/hc11ops.c @@ -2202,6 +2202,33 @@ static void HC11OP(tst_indy)(hc11_state *cpustate) CYCLES(cpustate, 6); } +/* TSX 0x30 */ +static void HC11OP(tsx)(hc11_state *cpustate) +{ + cpustate->ix = cpustate->sp + 1; + CYCLES(cpustate, 3); +} + +/* TSY 0x18 0x30 */ +static void HC11OP(tsy)(hc11_state *cpustate) +{ + cpustate->iy = cpustate->sp + 1; + CYCLES(cpustate, 4); +} + +/* TXS 0x35 */ +static void HC11OP(txs)(hc11_state *cpustate) +{ + cpustate->sp = cpustate->ix - 1; + CYCLES(cpustate, 3); +} + +/* TYS 0x18 0x35 */ +static void HC11OP(tys)(hc11_state *cpustate) +{ + cpustate->sp = cpustate->iy - 1; + CYCLES(cpustate, 4); +} /* XGDX 0x8F */ static void HC11OP(xgdx)(hc11_state *cpustate) diff --git a/src/emu/cpu/mc68hc11/hc11ops.h b/src/emu/cpu/mc68hc11/hc11ops.h index ef871578e06..c6c88ff3238 100644 --- a/src/emu/cpu/mc68hc11/hc11ops.h +++ b/src/emu/cpu/mc68hc11/hc11ops.h @@ -187,6 +187,10 @@ static const hc11_opcode_list_struct hc11_opcode_list[] = { 0, 0x7d, HC11OP(tst_ext) }, { 0, 0x6d, HC11OP(tst_indx) }, { 0x18, 0x6d, HC11OP(tst_indy) }, + { 0, 0x30, HC11OP(tsx) }, + { 0x18, 0x30, HC11OP(tsy) }, + { 0, 0x35, HC11OP(txs) }, + { 0x18, 0x35, HC11OP(tys) }, { 0, 0x8f, HC11OP(xgdx) }, { 0x18, 0x8f, HC11OP(xgdy) },