diff options
| author | 2009-06-23 15:36:21 +0000 | |
|---|---|---|
| committer | 2009-06-23 15:36:21 +0000 | |
| commit | 30f95d2ce255c27e4df8b7b435cfbdd05cd3861d (patch) | |
| tree | 5f9e52140ecdc55f58aaa9c22faa2233e061e16a | |
| parent | a671a003f1a2482cca5a2aab0890c5e45ee85368 (diff) | |
MC68HC11: Added STX INDX, STX INDY, STY INDY
| -rw-r--r-- | src/emu/cpu/mc68hc11/hc11ops.c | 43 | ||||
| -rw-r--r-- | src/emu/cpu/mc68hc11/hc11ops.h | 17 |
2 files changed, 49 insertions, 11 deletions
diff --git a/src/emu/cpu/mc68hc11/hc11ops.c b/src/emu/cpu/mc68hc11/hc11ops.c index f17cf84684b..c484034ff56 100644 --- a/src/emu/cpu/mc68hc11/hc11ops.c +++ b/src/emu/cpu/mc68hc11/hc11ops.c @@ -2921,7 +2921,6 @@ static void HC11OP(std_indy)(hc11_state *cpustate) } - /* STX EXT 0xFF */ static void HC11OP(stx_ext)(hc11_state *cpustate) { @@ -2935,6 +2934,35 @@ static void HC11OP(stx_ext)(hc11_state *cpustate) CYCLES(cpustate, 5); } + +/* STX INDX 0xEF */ +static void HC11OP(stx_indx)(hc11_state *cpustate) +{ + UINT16 adr = FETCH(cpustate); + UINT16 r = cpustate->ix; + CLEAR_NZV(cpustate); + WRITE8(cpustate, cpustate->ix + adr, (r & 0xff00) >> 8); + WRITE8(cpustate, cpustate->ix + adr + 1, (r & 0xff)); + SET_N16(r); + SET_Z16(r); + CYCLES(cpustate, 5); +} + + +/* STX INDY 0xCD 0xEF */ +static void HC11OP(stx_indy)(hc11_state *cpustate) +{ + UINT16 adr = FETCH(cpustate); + UINT16 r = cpustate->ix; + CLEAR_NZV(cpustate); + WRITE8(cpustate, cpustate->iy + adr, (r & 0xff00) >> 8); + WRITE8(cpustate, cpustate->iy + adr + 1, (r & 0xff)); + SET_N16(r); + SET_Z16(r); + CYCLES(cpustate, 6); +} + + /* STY EXT 0x18 0xFF */ static void HC11OP(sty_ext)(hc11_state *cpustate) { @@ -2961,6 +2989,19 @@ static void HC11OP(sty_indx)(hc11_state *cpustate) CYCLES(cpustate, 6); } +/* STY INDY 0x18 0xEF */ +static void HC11OP(sty_indy)(hc11_state *cpustate) +{ + UINT16 adr = FETCH(cpustate); + UINT16 r = cpustate->iy; + CLEAR_NZV(cpustate); + WRITE8(cpustate, cpustate->iy + adr, (r & 0xff00) >> 8); + WRITE8(cpustate, cpustate->iy + adr + 1, (r & 0xff)); + SET_N16(r); + SET_Z16(r); + CYCLES(cpustate, 6); +} + /* STOP 0xCF */ static void HC11OP(stop)(hc11_state *cpustate) { diff --git a/src/emu/cpu/mc68hc11/hc11ops.h b/src/emu/cpu/mc68hc11/hc11ops.h index b1db701d144..68acf514b4b 100644 --- a/src/emu/cpu/mc68hc11/hc11ops.h +++ b/src/emu/cpu/mc68hc11/hc11ops.h @@ -271,22 +271,19 @@ static const hc11_opcode_list_struct hc11_opcode_list[] = { 0, 0xfd, HC11OP(std_ext) }, { 0, 0xed, HC11OP(std_indx) }, { 0x18, 0xed, HC11OP(std_indy) }, - { 0, 0xff, HC11OP(stx_ext) }, - { 0x18, 0xff, HC11OP(sty_ext) }, - { 0x1a, 0xef, HC11OP(sty_indx) }, - { 0, 0xcf, HC11OP(stop) }, // { 0, 0x9f, HC11OP(sts_dir) }, // { 0, 0xbf, HC11OP(sts_ext) }, // { 0, 0xaf, HC11OP(sts_indx) }, // { 0x18, 0xaf, HC11OP(sts_indy) }, // { 0, 0xdf, HC11OP(stx_dir) }, -// { 0, 0xff, HC11OP(stx_ext) }, -// { 0, 0xef, HC11OP(stx_indx) }, -// { 0xcd, 0xef, HC11OP(stx_indy) }, + { 0, 0xff, HC11OP(stx_ext) }, + { 0, 0xef, HC11OP(stx_indx) }, + { 0xcd, 0xef, HC11OP(stx_indy) }, // { 0x18, 0xdf, HC11OP(sty_dir) }, -// { 0x18, 0xff, HC11OP(sty_ext) }, -// { 0x1a, 0xef, HC11OP(sty_indx) }, -// { 0x18, 0xef, HC11OP(sty_indy) }, + { 0x18, 0xff, HC11OP(sty_ext) }, + { 0x1a, 0xef, HC11OP(sty_indx) }, + { 0x18, 0xef, HC11OP(sty_indy) }, + { 0, 0xcf, HC11OP(stop) }, { 0, 0x80, HC11OP(suba_imm) }, { 0, 0x90, HC11OP(suba_dir) }, { 0, 0xb0, HC11OP(suba_ext) }, |
