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.
This commit is contained in:
R. Belmont 2014-03-13 02:54:41 +00:00
parent f594c84b09
commit d61fa5349e
2 changed files with 5 additions and 6 deletions

View File

@ -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();

View File

@ -66,7 +66,7 @@ adc_nd_zpx
prefetch();
arr_nd_imm
read_pc();
A &= read_pc();
do_arr_nd();
prefetch();