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

INLINE void clrd(konami_state *cpustate); /* 6309 */
INLINE void clrw_ix(konami_state *cpustate); /* 6309 ? */
INLINE void clrw_di(konami_state *cpustate); /* 6309 ? */
INLINE void clrw_ex(konami_state *cpustate); /* 6309 ? */
INLINE void negd(konami_state *cpustate);
INLINE void negw_ix(konami_state *cpustate); /* 6309 ? */
INLINE void negw_di(konami_state *cpustate); /* 6309 ? */
INLINE void negw_ex(konami_state *cpustate); /* 6309 ? */
INLINE void lsrd(konami_state *cpustate); /* 6309 */
INLINE void lsrd_di(konami_state *cpustate); /* 6309 */
INLINE void lsrd_ix(konami_state *cpustate); /* 6309 */
INLINE void lsrd_ex(konami_state *cpustate); /* 6309 */
INLINE void rord(konami_state *cpustate); /* 6309 ? */
INLINE void rord_di(konami_state *cpustate); /* 6309 */
INLINE void rord_ix(konami_state *cpustate); /* 6309 */
INLINE void rord_ex(konami_state *cpustate); /* 6309 */
INLINE void asrd(konami_state *cpustate); /* 6309 ? */
INLINE void asrd_di(konami_state *cpustate); /* 6309 */
INLINE void asrd_ix(konami_state *cpustate); /* 6309 */
INLINE void asrd_ex(konami_state *cpustate); /* 6309 */
INLINE void asld(konami_state *cpustate); /* 6309 */
INLINE void asld_di(konami_state *cpustate); /* 6309 */
INLINE void asld_ix(konami_state *cpustate); /* 6309 */
INLINE void asld_ex(konami_state *cpustate); /* 6309 */
INLINE void rold(konami_state *cpustate); /* 6309 ? */
INLINE void rold_di(konami_state *cpustate); /* 6309 */
INLINE void rold_ix(konami_state *cpustate); /* 6309 */
INLINE void rold_ex(konami_state *cpustate); /* 6309 */
INLINE void tstd(konami_state *cpustate);
INLINE void tstw_di(konami_state *cpustate);
INLINE void tstw_ix(konami_state *cpustate);
INLINE void tstw_ex(konami_state *cpustate);

/* Custom opcodes */
INLINE void setline_im(konami_state *cpustate);
INLINE void setline_ix(konami_state *cpustate);
INLINE void setline_di(konami_state *cpustate);
INLINE void setline_ex(konami_state *cpustate);
INLINE void bmove(konami_state *cpustate);
INLINE void move(konami_state *cpustate);
INLINE void decbjnz(konami_state *cpustate);
INLINE void decxjnz(konami_state *cpustate);
INLINE void bset(konami_state *cpustate);
INLINE void bset2(konami_state *cpustate);
INLINE void lmul(konami_state *cpustate);
INLINE void divx(konami_state *cpustate);
INLINE void incd(konami_state *cpustate);
INLINE void incw_di(konami_state *cpustate);
INLINE void incw_ix(konami_state *cpustate);
INLINE void incw_ex(konami_state *cpustate);
INLINE void decd(konami_state *cpustate);
INLINE void decw_di(konami_state *cpustate);
INLINE void decw_ix(konami_state *cpustate);
INLINE void decw_ex(konami_state *cpustate);
INLINE void lsrw_di(konami_state *cpustate);
INLINE void lsrw_ix(konami_state *cpustate);
INLINE void lsrw_ex(konami_state *cpustate);
INLINE void rorw_di(konami_state *cpustate);
INLINE void rorw_ix(konami_state *cpustate);
INLINE void rorw_ex(konami_state *cpustate);
INLINE void asrw_di(konami_state *cpustate);
INLINE void asrw_ix(konami_state *cpustate);
INLINE void asrw_ex(konami_state *cpustate);
INLINE void aslw_di(konami_state *cpustate);
INLINE void aslw_ix(konami_state *cpustate);
INLINE void aslw_ex(konami_state *cpustate);
INLINE void rolw_di(konami_state *cpustate);
INLINE void rolw_ix(konami_state *cpustate);
INLINE void rolw_ex(konami_state *cpustate);
INLINE void absa(konami_state *cpustate);
INLINE void absb(konami_state *cpustate);
INLINE void absd(konami_state *cpustate);

INLINE void opcode2(konami_state *cpustate);

static void (*const konami_main[0x100])(konami_state *cpustate) = {
	illegal,illegal,illegal,illegal,illegal,illegal,illegal,illegal,	/* 00 */
	opcode2,opcode2,opcode2,opcode2,pshs   ,pshu   ,puls   ,pulu   ,
	lda_im ,ldb_im ,opcode2,opcode2,adda_im,addb_im,opcode2,opcode2,	/* 10 */
	adca_im,adcb_im,opcode2,opcode2,suba_im,subb_im,opcode2,opcode2,
	sbca_im,sbcb_im,opcode2,opcode2,anda_im,andb_im,opcode2,opcode2,	/* 20 */
	bita_im,bitb_im,opcode2,opcode2,eora_im,eorb_im,opcode2,opcode2,
	ora_im ,orb_im ,opcode2,opcode2,cmpa_im,cmpb_im,opcode2,opcode2,	/* 30 */
	setline_im,opcode2,opcode2,opcode2,andcc,orcc  ,exg    ,tfr    ,
	ldd_im ,opcode2,ldx_im ,opcode2,ldy_im ,opcode2,ldu_im ,opcode2,	/* 40 */
	lds_im ,opcode2,cmpd_im,opcode2,cmpx_im,opcode2,cmpy_im,opcode2,
	cmpu_im,opcode2,cmps_im,opcode2,addd_im,opcode2,subd_im,opcode2,	/* 50 */
	opcode2,opcode2,opcode2,opcode2,opcode2,illegal,illegal,illegal,
	bra    ,bhi    ,bcc    ,bne    ,bvc    ,bpl    ,bge    ,bgt    ,	/* 60 */
	lbra   ,lbhi   ,lbcc   ,lbne   ,lbvc   ,lbpl   ,lbge   ,lbgt   ,
	brn    ,bls    ,bcs    ,beq    ,bvs    ,bmi    ,blt    ,ble    ,	/* 70 */
	lbrn   ,lbls   ,lbcs   ,lbeq   ,lbvs   ,lbmi   ,lblt   ,lble   ,
	clra   ,clrb   ,opcode2,coma   ,comb   ,opcode2,nega   ,negb   ,	/* 80 */
	opcode2,inca   ,incb   ,opcode2,deca   ,decb   ,opcode2,rts    ,
	tsta   ,tstb   ,opcode2,lsra   ,lsrb   ,opcode2,rora   ,rorb   ,	/* 90 */
	opcode2,asra   ,asrb   ,opcode2,asla   ,aslb   ,opcode2,rti    ,
	rola   ,rolb   ,opcode2,opcode2,opcode2,opcode2,opcode2,opcode2,	/* a0 */
	opcode2,opcode2,bsr    ,lbsr   ,decbjnz,decxjnz,nop    ,illegal,
	abx    ,daa	   ,sex    ,mul    ,lmul   ,divx   ,bmove  ,move   ,	/* b0 */
	lsrd   ,opcode2,rord   ,opcode2,asrd   ,opcode2,asld   ,opcode2,
	rold   ,opcode2,clrd   ,opcode2,negd   ,opcode2,incd   ,opcode2,	/* c0 */
	decd   ,opcode2,tstd   ,opcode2,absa   ,absb   ,absd   ,bset   ,
	bset2  ,illegal,illegal,illegal,illegal,illegal,illegal,illegal,	/* d0 */
	illegal,illegal,illegal,illegal,illegal,illegal,illegal,illegal,
	illegal,illegal,illegal,illegal,illegal,illegal,illegal,illegal,	/* e0 */
	illegal,illegal,illegal,illegal,illegal,illegal,illegal,illegal,
	illegal,illegal,illegal,illegal,illegal,illegal,illegal,illegal,	/* f0 */
	illegal,illegal,illegal,illegal,illegal,illegal,illegal,illegal
};

static void (*const konami_indexed[0x100])(konami_state *cpustate) = {
	illegal,illegal,illegal,illegal,illegal,illegal,illegal,illegal,	/* 00 */
	leax   ,leay   ,leau   ,leas   ,illegal,illegal,illegal,illegal,
	illegal,illegal,lda_ix ,ldb_ix ,illegal,illegal,adda_ix,addb_ix,	/* 10 */
	illegal,illegal,adca_ix,adcb_ix,illegal,illegal,suba_ix,subb_ix,
	illegal,illegal,sbca_ix,sbcb_ix,illegal,illegal,anda_ix,andb_ix,	/* 20 */
	illegal,illegal,bita_ix,bitb_ix,illegal,illegal,eora_ix,eorb_ix,
	illegal,illegal,ora_ix ,orb_ix ,illegal,illegal,cmpa_ix,cmpb_ix,	/* 30 */
	illegal,setline_ix,sta_ix,stb_ix,illegal,illegal,illegal,illegal,
	illegal,ldd_ix ,illegal,ldx_ix ,illegal,ldy_ix ,illegal,ldu_ix ,	/* 40 */
	illegal,lds_ix ,illegal,cmpd_ix,illegal,cmpx_ix,illegal,cmpy_ix,
	illegal,cmpu_ix,illegal,cmps_ix,illegal,addd_ix,illegal,subd_ix,	/* 50 */
	std_ix ,stx_ix ,sty_ix ,stu_ix ,sts_ix ,illegal,illegal,illegal,
	illegal,illegal,illegal,illegal,illegal,illegal,illegal,illegal,	/* 60 */
	illegal,illegal,illegal,illegal,illegal,illegal,illegal,illegal,
	illegal,illegal,illegal,illegal,illegal,illegal,illegal,illegal,	/* 70 */
	illegal,illegal,illegal,illegal,illegal,illegal,illegal,illegal,
	illegal,illegal,clr_ix ,illegal,illegal,com_ix ,illegal,illegal,	/* 80 */
	neg_ix ,illegal,illegal,inc_ix ,illegal,illegal,dec_ix ,illegal,
	illegal,illegal,tst_ix ,illegal,illegal,lsr_ix ,illegal,illegal,	/* 90 */
	ror_ix ,illegal,illegal,asr_ix ,illegal,illegal,asl_ix ,illegal,
	illegal,illegal,rol_ix ,lsrw_ix,rorw_ix,asrw_ix,aslw_ix,rolw_ix,	/* a0 */
	jmp_ix ,jsr_ix ,illegal,illegal,illegal,illegal,illegal,illegal,
	illegal,illegal,illegal,illegal,illegal,illegal,illegal,illegal,	/* b0 */
	illegal,lsrd_ix,illegal,rord_ix,illegal,asrd_ix,illegal,asld_ix,
	illegal,rold_ix,illegal,clrw_ix,illegal,negw_ix,illegal,incw_ix,	/* c0 */
	illegal,decw_ix,illegal,tstw_ix,illegal,illegal,illegal,illegal,
	illegal,illegal,illegal,illegal,illegal,illegal,illegal,illegal,	/* d0 */
	illegal,illegal,illegal,illegal,illegal,illegal,illegal,illegal,
	illegal,illegal,illegal,illegal,illegal,illegal,illegal,illegal,	/* e0 */
	illegal,illegal,illegal,illegal,illegal,illegal,illegal,illegal,
	illegal,illegal,illegal,illegal,illegal,illegal,illegal,illegal,	/* f0 */
	illegal,illegal,illegal,illegal,illegal,illegal,illegal,illegal
};

static void (*const konami_direct[0x100])(konami_state *cpustate) = {
	illegal,illegal,illegal,illegal,illegal,illegal,illegal,illegal,	/* 00 */
	illegal,illegal,illegal,illegal,illegal,illegal,illegal,illegal,
	illegal,illegal,lda_di ,ldb_di ,illegal,illegal,adda_di,addb_di,	/* 10 */
	illegal,illegal,adca_di,adcb_di,illegal,illegal,suba_di,subb_di,
	illegal,illegal,sbca_di,sbcb_di,illegal,illegal,anda_di,andb_di,	/* 20 */
	illegal,illegal,bita_di,bitb_di,illegal,illegal,eora_di,eorb_di,
	illegal,illegal,ora_di ,orb_di ,illegal,illegal,cmpa_di,cmpb_di,	/* 30 */
	illegal,setline_di,sta_di,stb_di,illegal,illegal,illegal,illegal,
	illegal,ldd_di ,illegal,ldx_di ,illegal,ldy_di ,illegal,ldu_di ,	/* 40 */
	illegal,lds_di ,illegal,cmpd_di,illegal,cmpx_di,illegal,cmpy_di,
	illegal,cmpu_di,illegal,cmps_di,illegal,addd_di,illegal,subd_di,	/* 50 */
	std_di ,stx_di ,sty_di ,stu_di ,sts_di ,illegal,illegal,illegal,
	illegal,illegal,illegal,illegal,illegal,illegal,illegal,illegal,	/* 60 */
	illegal,illegal,illegal,illegal,illegal,illegal,illegal,illegal,
	illegal,illegal,illegal,illegal,illegal,illegal,illegal,illegal,	/* 70 */
	illegal,illegal,illegal,illegal,illegal,illegal,illegal,illegal,
	illegal,illegal,clr_di ,illegal,illegal,com_di ,illegal,illegal,	/* 80 */
	neg_di ,illegal,illegal,inc_di ,illegal,illegal,dec_di ,illegal,
	illegal,illegal,tst_di ,illegal,illegal,lsr_di ,illegal,illegal,	/* 90 */
	ror_di ,illegal,illegal,asr_di ,illegal,illegal,asl_di ,illegal,
	illegal,illegal,rol_di ,lsrw_di,rorw_di,asrw_di,aslw_di,rolw_di,	/* a0 */
	jmp_di ,jsr_di ,illegal,illegal,illegal,illegal,illegal,illegal,
	illegal,illegal,illegal,illegal,illegal,illegal,illegal,illegal,	/* b0 */
	illegal,lsrd_di,illegal,rord_di,illegal,asrd_di,illegal,asld_di,
	illegal,rold_di,illegal,clrw_di,illegal,negw_di,illegal,incw_di,	/* c0 */
	illegal,decw_di,illegal,tstw_di,illegal,illegal,illegal,illegal,
	illegal,illegal,illegal,illegal,illegal,illegal,illegal,illegal,	/* d0 */
	illegal,illegal,illegal,illegal,illegal,illegal,illegal,illegal,
	illegal,illegal,illegal,illegal,illegal,illegal,illegal,illegal,	/* e0 */
	illegal,illegal,illegal,illegal,illegal,illegal,illegal,illegal,
	illegal,illegal,illegal,illegal,illegal,illegal,illegal,illegal,	/* f0 */
	illegal,illegal,illegal,illegal,illegal,illegal,illegal,illegal
};

static void (*const konami_extended[0x100])(konami_state *cpustate) = {
	illegal,illegal,illegal,illegal,illegal,illegal,illegal,illegal,	/* 00 */
	illegal,illegal,illegal,illegal,illegal,illegal,illegal,illegal,
	illegal,illegal,lda_ex ,ldb_ex ,illegal,illegal,adda_ex,addb_ex,	/* 10 */
	illegal,illegal,adca_ex,adcb_ex,illegal,illegal,suba_ex,subb_ex,
	illegal,illegal,sbca_ex,sbcb_ex,illegal,illegal,anda_ex,andb_ex,	/* 20 */
	illegal,illegal,bita_ex,bitb_ex,illegal,illegal,eora_ex,eorb_ex,
	illegal,illegal,ora_ex ,orb_ex ,illegal,illegal,cmpa_ex,cmpb_ex,	/* 30 */
	illegal,setline_ex,sta_ex,stb_ex,illegal,illegal,illegal,illegal,
	illegal,ldd_ex ,illegal,ldx_ex ,illegal,ldy_ex ,illegal,ldu_ex ,	/* 40 */
	illegal,lds_ex ,illegal,cmpd_ex,illegal,cmpx_ex,illegal,cmpy_ex,
	illegal,cmpu_ex,illegal,cmps_ex,illegal,addd_ex,illegal,subd_ex,	/* 50 */
	std_ex ,stx_ex ,sty_ex ,stu_ex ,sts_ex ,illegal,illegal,illegal,
	illegal,illegal,illegal,illegal,illegal,illegal,illegal,illegal,	/* 60 */
	illegal,illegal,illegal,illegal,illegal,illegal,illegal,illegal,
	illegal,illegal,illegal,illegal,illegal,illegal,illegal,illegal,	/* 70 */
	illegal,illegal,illegal,illegal,illegal,illegal,illegal,illegal,
	illegal,illegal,clr_ex ,illegal,illegal,com_ex ,illegal,illegal,	/* 80 */
	neg_ex ,illegal,illegal,inc_ex ,illegal,illegal,dec_ex ,illegal,
	illegal,illegal,tst_ex ,illegal,illegal,lsr_ex ,illegal,illegal,	/* 90 */
	ror_ex ,illegal,illegal,asr_ex ,illegal,illegal,asl_ex ,illegal,
	illegal,illegal,rol_ex ,lsrw_ex,rorw_ex,asrw_ex,aslw_ex,rolw_ex,	/* a0 */
	jmp_ex ,jsr_ex ,illegal,illegal,illegal,illegal,illegal,illegal,
	illegal,illegal,illegal,illegal,illegal,illegal,illegal,illegal,	/* b0 */
	illegal,lsrd_ex,illegal,rord_ex,illegal,asrd_ex,illegal,asld_ex,
	illegal,rold_ex,illegal,clrw_ex,illegal,negw_ex,illegal,incw_ex,	/* c0 */
	illegal,decw_ex,illegal,tstw_ex,illegal,illegal,illegal,illegal,
	illegal,illegal,illegal,illegal,illegal,illegal,illegal,illegal,	/* d0 */
	illegal,illegal,illegal,illegal,illegal,illegal,illegal,illegal,
	illegal,illegal,illegal,illegal,illegal,illegal,illegal,illegal,	/* e0 */
	illegal,illegal,illegal,illegal,illegal,illegal,illegal,illegal,
	illegal,illegal,illegal,illegal,illegal,illegal,illegal,illegal,	/* f0 */
	illegal,illegal,illegal,illegal,illegal,illegal,illegal,illegal
};
