diff options
Diffstat (limited to 'src/devices/cpu/m6800/6800ops.inc')
-rw-r--r-- | src/devices/cpu/m6800/6800ops.inc | 26 |
1 files changed, 25 insertions, 1 deletions
diff --git a/src/devices/cpu/m6800/6800ops.inc b/src/devices/cpu/m6800/6800ops.inc index cf0360c7538..078529d16ab 100644 --- a/src/devices/cpu/m6800/6800ops.inc +++ b/src/devices/cpu/m6800/6800ops.inc @@ -2073,11 +2073,12 @@ OP_HANDLER( ldd_ix ) } /* $ec ADCX immediate -**** NSC8105 only. Flags are a guess - copied from addb_im() */ +// actually this is ADDX, causes garbage in nightgal.cpp otherwise OP_HANDLER( adcx_im ) { UINT16 t,r; IMMBYTE(t); - r = X+t+(CC&0x01); + r = X+t; CLR_HNZVC; SET_FLAGS8(X,t,r); SET_H(X,t,r); @@ -2282,3 +2283,26 @@ OP_HANDLER( stx_ex ) EXTENDED; WM16(EAD,&m_x); } + +/* NSC8105 specific, guessed opcodes (tested by Night Gal Summer) */ +// $bb - $mask & [X + $disp8] +OP_HANDLER( btst_ix ) +{ + UINT8 val; + UINT8 mask = M_RDOP_ARG(PCD); + {EA=X+(M_RDOP_ARG(PCD+1));PC+=2;} + val = RM(EAD) & mask; + CLR_NZVC; SET_NZ8(val); +} + +// $b2 - assuming correct, store first byte to (X + $disp8) +OP_HANDLER( stx_nsc ) +{ + IMM8; + UINT8 val = RM(EAD); + IMM8; + EA = X + RM(EAD); + CLR_NZV; + SET_NZ8(val); + WM(EAD,val); +}
\ No newline at end of file |