From d61fa5349e9949b0ceabeacb44d3567edc83db7c Mon Sep 17 00:00:00 2001 From: "R. Belmont" Date: Thu, 13 Mar 2014 02:54:41 +0000 Subject: [PATCH] m6502: fixed some unofficial opcodes [R. Belmont] nw: the 6510 version of lxa may be wrong in the same way (on 6502 it loads A and X with the immediate value, no AND occurs), someone C= savvy please check. --- src/emu/cpu/m6502/om6502.lst | 9 ++++----- src/emu/cpu/m6502/on2a03.lst | 2 +- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/src/emu/cpu/m6502/om6502.lst b/src/emu/cpu/m6502/om6502.lst index 56c37475771..f76884b554f 100644 --- a/src/emu/cpu/m6502/om6502.lst +++ b/src/emu/cpu/m6502/om6502.lst @@ -1881,7 +1881,7 @@ sre_zpx # undocumented unreliable instructions anc_imm - read_pc(); + A &= read_pc(); set_nz(A); if(A & 0x80) P |= F_C; @@ -1896,12 +1896,12 @@ ane_imm prefetch(); asr_imm - read_pc(); + A &= read_pc(); A = do_lsr(A); prefetch(); arr_imm - read_pc(); + A &= read_pc(); do_arr(); prefetch(); @@ -1918,8 +1918,7 @@ las_aby prefetch(); lxa_imm - TMP2 = read_pc(); - A = X = A & TMP2; + A = X = read_pc(); set_nz(A); prefetch(); diff --git a/src/emu/cpu/m6502/on2a03.lst b/src/emu/cpu/m6502/on2a03.lst index 7d505cbf17c..7d8a72c8d62 100644 --- a/src/emu/cpu/m6502/on2a03.lst +++ b/src/emu/cpu/m6502/on2a03.lst @@ -66,7 +66,7 @@ adc_nd_zpx prefetch(); arr_nd_imm - read_pc(); + A &= read_pc(); do_arr_nd(); prefetch();