INLINE void abx(m68_state_t *m68_state);
INLINE void adca_di(m68_state_t *m68_state);
INLINE void adca_ex(m68_state_t *m68_state);
INLINE void adca_im(m68_state_t *m68_state);
INLINE void adca_ix(m68_state_t *m68_state);
INLINE void adcb_di(m68_state_t *m68_state);
INLINE void adcb_ex(m68_state_t *m68_state);
INLINE void adcb_im(m68_state_t *m68_state);
INLINE void adcb_ix(m68_state_t *m68_state);
INLINE void adda_di(m68_state_t *m68_state);
INLINE void adda_ex(m68_state_t *m68_state);
INLINE void adda_im(m68_state_t *m68_state);
INLINE void adda_ix(m68_state_t *m68_state);
INLINE void addb_di(m68_state_t *m68_state);
INLINE void addb_ex(m68_state_t *m68_state);
INLINE void addb_im(m68_state_t *m68_state);
INLINE void addb_ix(m68_state_t *m68_state);
INLINE void addd_di(m68_state_t *m68_state);
INLINE void addd_ex(m68_state_t *m68_state);
INLINE void addd_im(m68_state_t *m68_state);
INLINE void addd_ix(m68_state_t *m68_state);
INLINE void anda_di(m68_state_t *m68_state);
INLINE void anda_ex(m68_state_t *m68_state);
INLINE void anda_im(m68_state_t *m68_state);
INLINE void anda_ix(m68_state_t *m68_state);
INLINE void andb_di(m68_state_t *m68_state);
INLINE void andb_ex(m68_state_t *m68_state);
INLINE void andb_im(m68_state_t *m68_state);
INLINE void andb_ix(m68_state_t *m68_state);
INLINE void andcc(m68_state_t *m68_state);
INLINE void asla(m68_state_t *m68_state);
INLINE void aslb(m68_state_t *m68_state);
INLINE void asl_di(m68_state_t *m68_state);
INLINE void asl_ex(m68_state_t *m68_state);
INLINE void asl_ix(m68_state_t *m68_state);
INLINE void asra(m68_state_t *m68_state);
INLINE void asrb(m68_state_t *m68_state);
INLINE void asr_di(m68_state_t *m68_state);
INLINE void asr_ex(m68_state_t *m68_state);
INLINE void asr_ix(m68_state_t *m68_state);
INLINE void bcc(m68_state_t *m68_state);
INLINE void bcs(m68_state_t *m68_state);
INLINE void beq(m68_state_t *m68_state);
INLINE void bge(m68_state_t *m68_state);
INLINE void bgt(m68_state_t *m68_state);
INLINE void bhi(m68_state_t *m68_state);
INLINE void bita_di(m68_state_t *m68_state);
INLINE void bita_ex(m68_state_t *m68_state);
INLINE void bita_im(m68_state_t *m68_state);
INLINE void bita_ix(m68_state_t *m68_state);
INLINE void bitb_di(m68_state_t *m68_state);
INLINE void bitb_ex(m68_state_t *m68_state);
INLINE void bitb_im(m68_state_t *m68_state);
INLINE void bitb_ix(m68_state_t *m68_state);
INLINE void ble(m68_state_t *m68_state);
INLINE void bls(m68_state_t *m68_state);
INLINE void blt(m68_state_t *m68_state);
INLINE void bmi(m68_state_t *m68_state);
INLINE void bne(m68_state_t *m68_state);
INLINE void bpl(m68_state_t *m68_state);
INLINE void bra(m68_state_t *m68_state);
INLINE void brn(m68_state_t *m68_state);
INLINE void bsr(m68_state_t *m68_state);
INLINE void bvc(m68_state_t *m68_state);
INLINE void bvs(m68_state_t *m68_state);
INLINE void clra(m68_state_t *m68_state);
INLINE void clrb(m68_state_t *m68_state);
INLINE void clr_di(m68_state_t *m68_state);
INLINE void clr_ex(m68_state_t *m68_state);
INLINE void clr_ix(m68_state_t *m68_state);
INLINE void cmpa_di(m68_state_t *m68_state);
INLINE void cmpa_ex(m68_state_t *m68_state);
INLINE void cmpa_im(m68_state_t *m68_state);
INLINE void cmpa_ix(m68_state_t *m68_state);
INLINE void cmpb_di(m68_state_t *m68_state);
INLINE void cmpb_ex(m68_state_t *m68_state);
INLINE void cmpb_im(m68_state_t *m68_state);
INLINE void cmpb_ix(m68_state_t *m68_state);
INLINE void cmpd_di(m68_state_t *m68_state);
INLINE void cmpd_ex(m68_state_t *m68_state);
INLINE void cmpd_im(m68_state_t *m68_state);
INLINE void cmpd_ix(m68_state_t *m68_state);
INLINE void cmps_di(m68_state_t *m68_state);
INLINE void cmps_ex(m68_state_t *m68_state);
INLINE void cmps_im(m68_state_t *m68_state);
INLINE void cmps_ix(m68_state_t *m68_state);
INLINE void cmpu_di(m68_state_t *m68_state);
INLINE void cmpu_ex(m68_state_t *m68_state);
INLINE void cmpu_im(m68_state_t *m68_state);
INLINE void cmpu_ix(m68_state_t *m68_state);
INLINE void cmpx_di(m68_state_t *m68_state);
INLINE void cmpx_ex(m68_state_t *m68_state);
INLINE void cmpx_im(m68_state_t *m68_state);
INLINE void cmpx_ix(m68_state_t *m68_state);
INLINE void cmpy_di(m68_state_t *m68_state);
INLINE void cmpy_ex(m68_state_t *m68_state);
INLINE void cmpy_im(m68_state_t *m68_state);
INLINE void cmpy_ix(m68_state_t *m68_state);
INLINE void coma(m68_state_t *m68_state);
INLINE void comb(m68_state_t *m68_state);
INLINE void com_di(m68_state_t *m68_state);
INLINE void com_ex(m68_state_t *m68_state);
INLINE void com_ix(m68_state_t *m68_state);
INLINE void cwai(m68_state_t *m68_state);
INLINE void daa(m68_state_t *m68_state);
INLINE void deca(m68_state_t *m68_state);
INLINE void decb(m68_state_t *m68_state);
INLINE void dec_di(m68_state_t *m68_state);
INLINE void dec_ex(m68_state_t *m68_state);
INLINE void dec_ix(m68_state_t *m68_state);
INLINE void eora_di(m68_state_t *m68_state);
INLINE void eora_ex(m68_state_t *m68_state);
INLINE void eora_im(m68_state_t *m68_state);
INLINE void eora_ix(m68_state_t *m68_state);
INLINE void eorb_di(m68_state_t *m68_state);
INLINE void eorb_ex(m68_state_t *m68_state);
INLINE void eorb_im(m68_state_t *m68_state);
INLINE void eorb_ix(m68_state_t *m68_state);
INLINE void exg(m68_state_t *m68_state);
INLINE void illegal(m68_state_t *m68_state);
INLINE void inca(m68_state_t *m68_state);
INLINE void incb(m68_state_t *m68_state);
INLINE void inc_di(m68_state_t *m68_state);
INLINE void inc_ex(m68_state_t *m68_state);
INLINE void inc_ix(m68_state_t *m68_state);
INLINE void jmp_di(m68_state_t *m68_state);
INLINE void jmp_ex(m68_state_t *m68_state);
INLINE void jmp_ix(m68_state_t *m68_state);
INLINE void jsr_di(m68_state_t *m68_state);
INLINE void jsr_ex(m68_state_t *m68_state);
INLINE void jsr_ix(m68_state_t *m68_state);
INLINE void lbcc(m68_state_t *m68_state);
INLINE void lbcs(m68_state_t *m68_state);
INLINE void lbeq(m68_state_t *m68_state);
INLINE void lbge(m68_state_t *m68_state);
INLINE void lbgt(m68_state_t *m68_state);
INLINE void lbhi(m68_state_t *m68_state);
INLINE void lble(m68_state_t *m68_state);
INLINE void lbls(m68_state_t *m68_state);
INLINE void lblt(m68_state_t *m68_state);
INLINE void lbmi(m68_state_t *m68_state);
INLINE void lbne(m68_state_t *m68_state);
INLINE void lbpl(m68_state_t *m68_state);
INLINE void lbra(m68_state_t *m68_state);
INLINE void lbrn(m68_state_t *m68_state);
INLINE void lbsr(m68_state_t *m68_state);
INLINE void lbvc(m68_state_t *m68_state);
INLINE void lbvs(m68_state_t *m68_state);
INLINE void lda_di(m68_state_t *m68_state);
INLINE void lda_ex(m68_state_t *m68_state);
INLINE void lda_im(m68_state_t *m68_state);
INLINE void lda_ix(m68_state_t *m68_state);
INLINE void ldb_di(m68_state_t *m68_state);
INLINE void ldb_ex(m68_state_t *m68_state);
INLINE void ldb_im(m68_state_t *m68_state);
INLINE void ldb_ix(m68_state_t *m68_state);
INLINE void ldd_di(m68_state_t *m68_state);
INLINE void ldd_ex(m68_state_t *m68_state);
INLINE void ldd_im(m68_state_t *m68_state);
INLINE void ldd_ix(m68_state_t *m68_state);
INLINE void lds_di(m68_state_t *m68_state);
INLINE void lds_ex(m68_state_t *m68_state);
INLINE void lds_im(m68_state_t *m68_state);
INLINE void lds_ix(m68_state_t *m68_state);
INLINE void ldu_di(m68_state_t *m68_state);
INLINE void ldu_ex(m68_state_t *m68_state);
INLINE void ldu_im(m68_state_t *m68_state);
INLINE void ldu_ix(m68_state_t *m68_state);
INLINE void ldx_di(m68_state_t *m68_state);
INLINE void ldx_ex(m68_state_t *m68_state);
INLINE void ldx_im(m68_state_t *m68_state);
INLINE void ldx_ix(m68_state_t *m68_state);
INLINE void ldy_di(m68_state_t *m68_state);
INLINE void ldy_ex(m68_state_t *m68_state);
INLINE void ldy_im(m68_state_t *m68_state);
INLINE void ldy_ix(m68_state_t *m68_state);
INLINE void leas(m68_state_t *m68_state);
INLINE void leau(m68_state_t *m68_state);
INLINE void leax(m68_state_t *m68_state);
INLINE void leay(m68_state_t *m68_state);
INLINE void lsra(m68_state_t *m68_state);
INLINE void lsrb(m68_state_t *m68_state);
INLINE void lsr_di(m68_state_t *m68_state);
INLINE void lsr_ex(m68_state_t *m68_state);
INLINE void lsr_ix(m68_state_t *m68_state);
INLINE void mul(m68_state_t *m68_state);
INLINE void nega(m68_state_t *m68_state);
INLINE void negb(m68_state_t *m68_state);
INLINE void neg_di(m68_state_t *m68_state);
INLINE void neg_ex(m68_state_t *m68_state);
INLINE void neg_ix(m68_state_t *m68_state);
INLINE void nop(m68_state_t *m68_state);
INLINE void ora_di(m68_state_t *m68_state);
INLINE void ora_ex(m68_state_t *m68_state);
INLINE void ora_im(m68_state_t *m68_state);
INLINE void ora_ix(m68_state_t *m68_state);
INLINE void orb_di(m68_state_t *m68_state);
INLINE void orb_ex(m68_state_t *m68_state);
INLINE void orb_im(m68_state_t *m68_state);
INLINE void orb_ix(m68_state_t *m68_state);
INLINE void orcc(m68_state_t *m68_state);
INLINE void pref10(m68_state_t *m68_state);
INLINE void pref11(m68_state_t *m68_state);
INLINE void pshs(m68_state_t *m68_state);
INLINE void pshu(m68_state_t *m68_state);
INLINE void puls(m68_state_t *m68_state);
INLINE void pulu(m68_state_t *m68_state);
INLINE void rola(m68_state_t *m68_state);
INLINE void rolb(m68_state_t *m68_state);
INLINE void rol_di(m68_state_t *m68_state);
INLINE void rol_ex(m68_state_t *m68_state);
INLINE void rol_ix(m68_state_t *m68_state);
INLINE void rora(m68_state_t *m68_state);
INLINE void rorb(m68_state_t *m68_state);
INLINE void ror_di(m68_state_t *m68_state);
INLINE void ror_ex(m68_state_t *m68_state);
INLINE void ror_ix(m68_state_t *m68_state);
INLINE void rti(m68_state_t *m68_state);
INLINE void rts(m68_state_t *m68_state);
INLINE void sbca_di(m68_state_t *m68_state);
INLINE void sbca_ex(m68_state_t *m68_state);
INLINE void sbca_im(m68_state_t *m68_state);
INLINE void sbca_ix(m68_state_t *m68_state);
INLINE void sbcb_di(m68_state_t *m68_state);
INLINE void sbcb_ex(m68_state_t *m68_state);
INLINE void sbcb_im(m68_state_t *m68_state);
INLINE void sbcb_ix(m68_state_t *m68_state);
INLINE void sex(m68_state_t *m68_state);
INLINE void sta_di(m68_state_t *m68_state);
INLINE void sta_ex(m68_state_t *m68_state);
INLINE void sta_im(m68_state_t *m68_state);
INLINE void sta_ix(m68_state_t *m68_state);
INLINE void stb_di(m68_state_t *m68_state);
INLINE void stb_ex(m68_state_t *m68_state);
INLINE void stb_im(m68_state_t *m68_state);
INLINE void stb_ix(m68_state_t *m68_state);
INLINE void std_di(m68_state_t *m68_state);
INLINE void std_ex(m68_state_t *m68_state);
INLINE void std_im(m68_state_t *m68_state);
INLINE void std_ix(m68_state_t *m68_state);
INLINE void sts_di(m68_state_t *m68_state);
INLINE void sts_ex(m68_state_t *m68_state);
INLINE void sts_im(m68_state_t *m68_state);
INLINE void sts_ix(m68_state_t *m68_state);
INLINE void stu_di(m68_state_t *m68_state);
INLINE void stu_ex(m68_state_t *m68_state);
INLINE void stu_im(m68_state_t *m68_state);
INLINE void stu_ix(m68_state_t *m68_state);
INLINE void stx_di(m68_state_t *m68_state);
INLINE void stx_ex(m68_state_t *m68_state);
INLINE void stx_im(m68_state_t *m68_state);
INLINE void stx_ix(m68_state_t *m68_state);
INLINE void sty_di(m68_state_t *m68_state);
INLINE void sty_ex(m68_state_t *m68_state);
INLINE void sty_im(m68_state_t *m68_state);
INLINE void sty_ix(m68_state_t *m68_state);
INLINE void suba_di(m68_state_t *m68_state);
INLINE void suba_ex(m68_state_t *m68_state);
INLINE void suba_im(m68_state_t *m68_state);
INLINE void suba_ix(m68_state_t *m68_state);
INLINE void subb_di(m68_state_t *m68_state);
INLINE void subb_ex(m68_state_t *m68_state);
INLINE void subb_im(m68_state_t *m68_state);
INLINE void subb_ix(m68_state_t *m68_state);
INLINE void subd_di(m68_state_t *m68_state);
INLINE void subd_ex(m68_state_t *m68_state);
INLINE void subd_im(m68_state_t *m68_state);
INLINE void subd_ix(m68_state_t *m68_state);
INLINE void swi2(m68_state_t *m68_state);
INLINE void swi3(m68_state_t *m68_state);
INLINE void swi(m68_state_t *m68_state);
INLINE void sync(m68_state_t *m68_state);
INLINE void tfr(m68_state_t *m68_state);
INLINE void tsta(m68_state_t *m68_state);
INLINE void tstb(m68_state_t *m68_state);
INLINE void tst_di(m68_state_t *m68_state);
INLINE void tst_ex(m68_state_t *m68_state);
INLINE void tst_ix(m68_state_t *m68_state);

static const UINT8 flags8i[256]=	 /* increment */
{
CC_Z,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
CC_N|CC_V,CC_N,CC_N,CC_N,CC_N,CC_N,CC_N,CC_N,CC_N,CC_N,CC_N,CC_N,CC_N,CC_N,CC_N,CC_N,
CC_N,CC_N,CC_N,CC_N,CC_N,CC_N,CC_N,CC_N,CC_N,CC_N,CC_N,CC_N,CC_N,CC_N,CC_N,CC_N,
CC_N,CC_N,CC_N,CC_N,CC_N,CC_N,CC_N,CC_N,CC_N,CC_N,CC_N,CC_N,CC_N,CC_N,CC_N,CC_N,
CC_N,CC_N,CC_N,CC_N,CC_N,CC_N,CC_N,CC_N,CC_N,CC_N,CC_N,CC_N,CC_N,CC_N,CC_N,CC_N,
CC_N,CC_N,CC_N,CC_N,CC_N,CC_N,CC_N,CC_N,CC_N,CC_N,CC_N,CC_N,CC_N,CC_N,CC_N,CC_N,
CC_N,CC_N,CC_N,CC_N,CC_N,CC_N,CC_N,CC_N,CC_N,CC_N,CC_N,CC_N,CC_N,CC_N,CC_N,CC_N,
CC_N,CC_N,CC_N,CC_N,CC_N,CC_N,CC_N,CC_N,CC_N,CC_N,CC_N,CC_N,CC_N,CC_N,CC_N,CC_N,
CC_N,CC_N,CC_N,CC_N,CC_N,CC_N,CC_N,CC_N,CC_N,CC_N,CC_N,CC_N,CC_N,CC_N,CC_N,CC_N
};
static const UINT8 flags8d[256]= /* decrement */
{
CC_Z,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,CC_V,
CC_N,CC_N,CC_N,CC_N,CC_N,CC_N,CC_N,CC_N,CC_N,CC_N,CC_N,CC_N,CC_N,CC_N,CC_N,CC_N,
CC_N,CC_N,CC_N,CC_N,CC_N,CC_N,CC_N,CC_N,CC_N,CC_N,CC_N,CC_N,CC_N,CC_N,CC_N,CC_N,
CC_N,CC_N,CC_N,CC_N,CC_N,CC_N,CC_N,CC_N,CC_N,CC_N,CC_N,CC_N,CC_N,CC_N,CC_N,CC_N,
CC_N,CC_N,CC_N,CC_N,CC_N,CC_N,CC_N,CC_N,CC_N,CC_N,CC_N,CC_N,CC_N,CC_N,CC_N,CC_N,
CC_N,CC_N,CC_N,CC_N,CC_N,CC_N,CC_N,CC_N,CC_N,CC_N,CC_N,CC_N,CC_N,CC_N,CC_N,CC_N,
CC_N,CC_N,CC_N,CC_N,CC_N,CC_N,CC_N,CC_N,CC_N,CC_N,CC_N,CC_N,CC_N,CC_N,CC_N,CC_N,
CC_N,CC_N,CC_N,CC_N,CC_N,CC_N,CC_N,CC_N,CC_N,CC_N,CC_N,CC_N,CC_N,CC_N,CC_N,CC_N,
CC_N,CC_N,CC_N,CC_N,CC_N,CC_N,CC_N,CC_N,CC_N,CC_N,CC_N,CC_N,CC_N,CC_N,CC_N,CC_N
};

/* FIXME: Cycles differ slighly from hd6309 emulation */
static const UINT8 index_cycle_em[256] = {        /* Index Loopup cycle counts */
/*           0xX0, 0xX1, 0xX2, 0xX3, 0xX4, 0xX5, 0xX6, 0xX7, 0xX8, 0xX9, 0xXA, 0xXB, 0xXC, 0xXD, 0xXE, 0xXF */

/* 0x0X */      1,    1,    1,    1,    1,    1,    1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
/* 0x1X */      1,    1,    1,    1,    1,    1,    1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
/* 0x2X */      1,    1,    1,    1,    1,    1,    1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
/* 0x3X */      1,    1,    1,    1,    1,    1,    1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
/* 0x4X */      1,    1,    1,    1,    1,    1,    1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
/* 0x5X */      1,    1,    1,    1,    1,    1,    1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
/* 0x6X */      1,    1,    1,    1,    1,    1,    1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
/* 0x7X */      1,    1,    1,    1,    1,    1,    1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
/* 0x8X */      2,    3,    2,    3,    0,    1,    1,    0,    1,    4,    0,    4,    1,    5,    0,    5,
/* 0x9X */      5,    6,    5,    6,    3,    4,    4,    0,    4,    7,    0,    7,    4,    8,    0,    8,
/* 0xAX */      2,    3,    2,    3,    0,    1,    1,    0,    1,    4,    0,    4,    1,    5,    0,    5,
/* 0xBX */      5,    6,    5,    6,    3,    4,    4,    0,    4,    7,    0,    7,    4,    8,    0,    8,
/* 0xCX */      2,    3,    2,    3,    0,    1,    1,    0,    1,    4,    0,    4,    1,    5,    0,    3,
/* 0xDX */      5,    6,    5,    6,    3,    4,    4,    0,    4,    7,    0,    7,    4,    8,    0,    8,
/* 0xEX */      2,    3,    2,    3,    0,    1,    1,    0,    1,    4,    0,    4,    1,    5,    0,    5,
/* 0xFX */      4,    6,    5,    6,    3,    4,    4,    0,    4,    7,    0,    7,    4,    8,    0,    8
};

/* timings for 1-byte opcodes */
static const UINT8 cycles1[] =
{
	/*   0  1  2  3  4  5  6  7  8  9  A  B  C  D  E  F */
  /*0*/  6, 6, 2, 6, 6, 2, 6, 6, 6, 6, 6, 2, 6, 6, 3, 6,
  /*1*/  0, 0, 2, 4, 2, 2, 5, 9, 2, 2, 3, 2, 3, 2, 8, 6,
  /*2*/  3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
  /*3*/  4, 4, 4, 4, 5, 5, 5, 5, 2, 5, 3, 6,20,11, 2,19,
  /*4*/  2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
  /*5*/  2, 0, 0, 2, 2, 0, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
  /*6*/  6, 2, 2, 6, 6, 2, 6, 6, 6, 6, 6, 2, 6, 6, 3, 6,
  /*7*/  7, 2, 2, 7, 7, 2, 7, 7, 7, 7, 7, 2, 7, 7, 4, 7,
  /*8*/  2, 2, 2, 4, 2, 2, 2, 2, 2, 2, 2, 2, 4, 7, 3, 2,
  /*9*/  4, 4, 4, 6, 4, 4, 4, 4, 4, 4, 4, 4, 6, 7, 5, 5,
  /*A*/  4, 4, 4, 6, 4, 4, 4, 4, 4, 4, 4, 4, 6, 7, 5, 5,
  /*B*/  5, 5, 5, 7, 5, 5, 5, 5, 5, 5, 5, 5, 7, 8, 6, 6,
  /*C*/  2, 2, 2, 4, 2, 2, 2, 2, 2, 2, 2, 2, 3, 2, 3, 3,
  /*D*/  4, 4, 4, 6, 4, 4, 4, 4, 4, 4, 4, 4, 5, 5, 5, 5,
  /*E*/  4, 4, 4, 6, 4, 4, 4, 4, 4, 4, 4, 4, 5, 5, 5, 5,
  /*F*/  5, 5, 5, 7, 5, 5, 5, 5, 5, 5, 5, 5, 6, 6, 6, 6
};

#if (BIG_SWITCH==0)
static void (*const m6809_main[0x100])(m68_state_t *) = {
/*          0xX0,   0xX1,     0xX2,    0xX3,    0xX4,    0xX5,    0xX6,    0xX7,
            0xX8,   0xX9,     0xXA,    0xXB,    0xXC,    0xXD,    0xXE,    0xXF   */

/* 0x0X */  neg_di, neg_di, illegal,com_di, lsr_di, illegal,ror_di, asr_di,
            asl_di, rol_di, dec_di, illegal,inc_di, tst_di, jmp_di, clr_di,

/* 0x1X */  pref10, pref11, nop,	sync,	illegal,illegal,lbra,	lbsr,
            illegal,daa,	orcc,	illegal,andcc,	sex,	exg,	tfr,

/* 0x2X */  bra,	brn,	bhi,	bls,	bcc,	bcs,	bne,	beq,
	    bvc,	bvs,	bpl,	bmi,	bge,	blt,	bgt,	ble,

/* 0x3X */  leax,	leay,	leas,	leau,	pshs,	puls,	pshu,	pulu,
            illegal,rts,	abx,	rti,	cwai,	mul,	illegal,swi,

/* 0x4X */  nega,	illegal,illegal,coma,	lsra,	illegal,rora,	asra,
	    asla,	rola,	deca,	illegal,inca,	tsta,	illegal,clra,

/* 0x5X */  negb,	illegal,illegal,comb,	lsrb,	illegal,rorb,	asrb,
	    aslb,	rolb,	decb,	illegal,incb,	tstb,	illegal,clrb,

/* 0x6X */  neg_ix, illegal,illegal,com_ix, lsr_ix, illegal,ror_ix, asr_ix,
	    asl_ix, rol_ix, dec_ix, illegal,inc_ix, tst_ix, jmp_ix, clr_ix,

/* 0x7X */  neg_ex, illegal,illegal,com_ex, lsr_ex, illegal,ror_ex, asr_ex,
	    asl_ex, rol_ex, dec_ex, illegal,inc_ex, tst_ex, jmp_ex, clr_ex,

/* 0x8X */  suba_im,cmpa_im,sbca_im,subd_im,anda_im,bita_im,lda_im, sta_im,
	    eora_im,adca_im,ora_im, adda_im,cmpx_im,bsr,	ldx_im, stx_im,

/* 0x9X */  suba_di,cmpa_di,sbca_di,subd_di,anda_di,bita_di,lda_di, sta_di,
	    eora_di,adca_di,ora_di, adda_di,cmpx_di,jsr_di, ldx_di, stx_di,

/* 0xAX */  suba_ix,cmpa_ix,sbca_ix,subd_ix,anda_ix,bita_ix,lda_ix, sta_ix,
	    eora_ix,adca_ix,ora_ix, adda_ix,cmpx_ix,jsr_ix, ldx_ix, stx_ix,

/* 0xBX */  suba_ex,cmpa_ex,sbca_ex,subd_ex,anda_ex,bita_ex,lda_ex, sta_ex,
	    eora_ex,adca_ex,ora_ex, adda_ex,cmpx_ex,jsr_ex, ldx_ex, stx_ex,

/* 0xCX */  subb_im,cmpb_im,sbcb_im,addd_im,andb_im,bitb_im,ldb_im, stb_im,
	    eorb_im,adcb_im,orb_im, addb_im,ldd_im, std_im, ldu_im, stu_im,

/* 0xDX */  subb_di,cmpb_di,sbcb_di,addd_di,andb_di,bitb_di,ldb_di, stb_di,
	    eorb_di,adcb_di,orb_di, addb_di,ldd_di, std_di, ldu_di, stu_di,

/* 0xEX */  subb_ix,cmpb_ix,sbcb_ix,addd_ix,andb_ix,bitb_ix,ldb_ix, stb_ix,
	    eorb_ix,adcb_ix,orb_ix, addb_ix,ldd_ix, std_ix, ldu_ix, stu_ix,

/* 0xFX */  subb_ex,cmpb_ex,sbcb_ex,addd_ex,andb_ex,bitb_ex,ldb_ex, stb_ex,
	    eorb_ex,adcb_ex,orb_ex, addb_ex,ldd_ex, std_ex, ldu_ex, stu_ex
};
#endif
