1
0
mirror of https://github.com/rkujawa/rk65c02.git synced 2025-01-19 03:30:46 +00:00

Branch and jump instrucitons need special PC treatment.

This commit is contained in:
Radosław Kujawa 2017-01-27 20:43:08 +01:00
parent 9294891a23
commit 2430cfd722
4 changed files with 269 additions and 260 deletions

View File

@ -1,257 +1,257 @@
opcode_id,mnemonic,addressing,size,emulation
OP_BRK,"brk",IMPLIED,1,NULL
OP_ORA_IZPX,"ora",IZPX,2,emul_ora
OP_NOPI_3,"nop",IMMEDIATE,2,NULL
OP_NOPI_4,"nop",IMPLIED,1,NULL
OP_TSB_ZP,"tsb",ZP,2,NULL
OP_ORA_ZP,"ora",ZP,2,emul_ora
OP_ASL_ZP,"asl",ZP,2,emul_asl
OP_RMB0_ZP,"rmb0",ZP,2,emul_rmb0
OP_PHP,"php",IMPLIED,1,emul_php
OP_ORA_IMM,"ora",IMMEDIATE,2,emul_ora
OP_ASL,"asl",ACCUMULATOR,1,emul_asl
OP_NOPI_C,"nop",IMPLIED,1,NULL
OP_TSB_ABS,"tsb",ABSOLUTE,3,NULL
OP_ORA_ABS,"ora",ABSOLUTE,3,emul_ora
OP_ASL_ABS,"asl",ABSOLUTE,3,emul_asl
OP_BBR0_REL,"bbr0",ZPR,2,NULL
OP_BPL_REL,"bpl",RELATIVE,2,NULL
OP_ORA_IZPY,"ora",IZPY,2,emul_ora
OP_ORA_IZP,"ora",IZP,2,emul_ora
OP_NOPI_14,"nop",IMPLIED,1,NULL
OP_TRB_ZP,"trb",ZP,2,NULL
OP_ORA_ZPX,"ora",ZPX,2,emul_ora
OP_ASL_ZPX,"asl",ZPX,2,emul_asl
OP_RMB1_ZP,"rmb1",ZP,1,emul_rmb1
OP_CLC,"clc",IMPLIED,1,emul_clc
OP_ORA_ABSY,"ora",ABSOLUTEY,3,emul_ora
OP_INC,"inc",ACCUMULATOR,1,emul_inc
OP_NOPI_1C,"nop",IMPLIED,1,NULL
OP_TRB_ABS,"trb",ABSOLUTE,3,NULL
OP_ORA_ABSX,"ora",ABSOLUTEX,3,emul_ora
OP_ASL_ABSX,"asl",ABSOLUTEX,3,emul_asl
OP_BBR1_REL,"bbr1",ZPR,2,NULL
OP_JSR,"jsr",ABSOLUTE,3,NULL
OP_AND_IZPX,"and",IZPX,2,emul_and
OP_NOPI_23,"nop",IMMEDIATE,2,NULL
OP_NOPI_24,"nop",IMPLIED,1,NULL
OP_BIT_ZP,"bit",ZP,2,emul_bit
OP_AND_ZP,"and",ZP,2,emul_and
OP_ROL_ZP,"rol",ZP,2,emul_rol
OP_RMB2_ZP,"rmb2",ZP,2,emul_rmb2
OP_PLP,"plp",IMPLIED,1,emul_plp
OP_AND_IMM,"and",IMMEDIATE,2,emul_and
OP_ROL,"rol",ACCUMULATOR,1,emul_rol
OP_NOPI_2C,"nop",IMPLIED,1,NULL
OP_BIT_ABS,"bit",ABSOLUTE,3,emul_bit
OP_AND_ABS,"and",ABSOLUTE,3,emul_and
OP_ROL_ABS,"rol",ABSOLUTE,3,emul_rol
OP_BBR2_REL,"bbr2",ZPR,2,NULL
OP_BMI_REL,"bmi",RELATIVE,2,NULL
OP_AND_IZPY,"and",IZPY,2,emul_and
OP_AND_IZP,"and",IZP,2,emul_and
OP_NOPI_34,"nop",IMPLIED,1,NULL
OP_BIT_ZPX,"bit",ZPX,2,emul_bit
OP_AND_ZPX,"and",ZPX,2,emul_and
OP_ROL_ZPX,"rol",ZPX,2,emul_rol
OP_RMB3_ZP,"rmb3",ZP,2,emul_rmb3
OP_SEC,"sec",IMPLIED,1,emul_sec
OP_AND_ABSY,"and",ABSOLUTEY,3,emul_and
OP_DEC,"dec",ACCUMULATOR,1,emul_dec
OP_NOPI_3C,"nop",IMPLIED,1,NULL
OP_BIT_ABSX,"bit",ABSOLUTEX,3,emul_bit
OP_AND_ABSX,"and",ABSOLUTEX,3,emul_and
OP_ROL_ABSX,"rol",ABSOLUTEX,3,emul_rol
OP_BBR3_REL,"bbr3",ZPR,2,NULL
OP_RTI,"rti",IMPLIED,1,NULL
OP_EOR_IZPX,"eor",IZPX,2,emul_eor
OP_NOPI_43,"nop",IMMEDIATE,2,NULL
OP_NOPI_44,"nop",IMPLIED,1,NULL
OP_NOPI_45,"nop",ZP,2,NULL
OP_EOR_ZP,"eor",ZP,2,emul_eor
OP_LSR_ZP,"lsr",ZP,2,emul_lsr
OP_RMB4_ZP,"rmb4",ZP,2,emul_rmb4
OP_PHA,"pha",IMPLIED,1,emul_pha
OP_EOR_IMM,"eor",IMMEDIATE,2,emul_eor
OP_LSR,"lsr",ACCUMULATOR,1,emul_lsr
OP_NOPI_4C,"nop",IMPLIED,1,NULL
OP_JMP_ABS,"jmp",ABSOLUTE,3,NULL
OP_EOR_ABS,"eor",ABSOLUTE,3,emul_eor
OP_LSR_ABS,"lsr",ABSOLUTE,3,emul_lsr
OP_BBR4_REL,"bbr4",ZPR,2,NULL
OP_BVC_REL,"bvc",RELATIVE,2,NULL
OP_EOR_IZPY,"eor",IZPY,2,emul_eor
OP_EOR_IZP,"eor",IZP,2,emul_eor
OP_NOPI_54,"nop",IMPLIED,1,NULL
OP_NOPI_55,"nop",ZPX,2,NULL
OP_EOR_ZPX,"eor",ZPX,2,emul_eor
OP_LSR_ZPX,"lsr",ZPX,2,emul_lsr
OP_RMB5_ZP,"rmb5",ZP,2,emul_rmb5
OP_CLI,"cli",IMPLIED,1,NULL
OP_EOR_ABSY,"eor",ABSOLUTEY,3,emul_eor
OP_PHY,"phy",IMPLIED,1,emul_phy
OP_NOPI_5C,"nop",IMPLIED,1,NULL
OP_NOPI_5D,"nop",ABSOLUTE,3,NULL
OP_EOR_ABSX,"eor",ABSOLUTEX,3,emul_eor
OP_LSR_ABSX,"lsr",ABSOLUTEX,3,emul_lsr
OP_BBR5_REL,"bbr5",ZPR,2,NULL
OP_RTS,"rts",IMPLIED,1,NULL
OP_ADC_IZPX,"adc",IZPX,2,NULL
OP_NOPI_63,"nop",IMMEDIATE,2,NULL
OP_NOPI_64,"nop",IMPLIED,1,NULL
OP_STZ_ZP,"stz",ZP,2,emul_stz
OP_ADC_ZP,"adc",ZP,2,NULL
OP_ROR_ZP,"ror",ZP,2,emul_ror
OP_RMB6_ZP,"rmb6",ZP,2,emul_rmb6
OP_PLA,"pla",IMPLIED,1,emul_pla
OP_ADC_IMM,"adc",IMMEDIATE,2,NULL
OP_ROR,"ror",ACCUMULATOR,1,emul_ror
OP_NOPI_6C,"nop",IMPLIED,1,NULL
OP_JMP_IABS,"jmp",IABSOLUTE,3,NULL
OP_ADC_ABS,"adc",ABSOLUTE,3,NULL
OP_ROR_ABS,"ror",ABSOLUTE,3,emul_ror
OP_BBR6_REL,"bbr6",ZPR,2,NULL
OP_BVS_REL,"bvs",RELATIVE,2,NULL
OP_ADC_IZPY,"adc",IZPY,2,NULL
OP_ADC_IZP,"adc",IZP,2,NULL
OP_NOPI_74,"nop",IMPLIED,1,NULL
OP_STZ_ZPX,"stz",ZPX,2,emul_stz
OP_ADC_ZPX,"adc",ZPX,2,NULL
OP_ROR_ZPX,"ror",ZPX,2,emul_ror
OP_RMB7_ZP,"rmb7",ZP,2,emul_rmb7
OP_SEI,"sei",IMPLIED,1,NULL
OP_ADC_ABSY,"adc",ABSOLUTEY,3,NULL
OP_PLY,"ply",IMPLIED,1,emul_ply
OP_NOPI_7C,"nop",IMPLIED,1,NULL
OP_JMP_IABSX,"jmp",IABSOLUTEX,3,NULL
OP_ADC_ABSX,"adc",ABSOLUTEX,3,NULL
OP_ROR_ABSX,"ror",ABSOLUTEX,3,emul_ror
OP_BBR7_REL,"bbr7",ZPR,2,NULL
OP_BRA_REL,"bra",RELATIVE,2,NULL
OP_STA_IZPX,"sta",IZPX,2,emul_sta
OP_NOPI_83,"nop",IMMEDIATE,2,NULL
OP_NOPI_84,"nop",IMPLIED,1,NULL
OP_STY_ZP,"sty",ZP,2,emul_sty
OP_STA_ZP,"sta",ZP,2,emul_sta
OP_STX_ZP,"stx",ZP,2,emul_stx
OP_SMB0_ZP,"smb0",ZP,2,NULL
OP_DEY,"dey",IMPLIED,1,emul_dey
OP_BIT_IMM,"bit",IMMEDIATE,2,emul_bit
OP_TXA,"txa",IMPLIED,1,emul_txa
OP_NOPI_8C,"nop",IMPLIED,1,NULL
OP_STY_ABS,"sty",ABSOLUTE,3,emul_sty
OP_STA_ABS,"sta",ABSOLUTE,3,emul_sta
OP_STX_ABS,"stx",ABSOLUTE,3,emul_stx
OP_BBS0_REL,"bbs0",ZPR,2,NULL
OP_BCC_REL,"bcc",RELATIVE,2,NULL
OP_STA_IZPY,"sta",IZPY,2,emul_sta
OP_STA_IZP,"sta",IZP,2,emul_sta
OP_NOPI_94,"nop",IMPLIED,1,NULL
OP_STY_ZPX,"sty",ZPX,2,emul_sty
OP_STA_ZPX,"sta",ZPX,2,emul_sta
OP_STX_ZPY,"stx",ZPY,2,emul_stx
OP_SMB1_ZP,"smb1",ZP,2,NULL
OP_TYA,"tya",IMPLIED,1,emul_tya
OP_STA_ABSY,"sta",ABSOLUTEY,3,emul_sta
OP_TXS,"txs",IMPLIED,1,emul_txs
OP_NOPI_9C,"nop",IMPLIED,1,NULL
OP_STZ_ABS,"stz",ABSOLUTE,3,emul_stz
OP_STA_ABSX,"sta",ABSOLUTEX,3,emul_sta
OP_STZ_ABSX,"stz",ABSOLUTEX,3,emul_stz
OP_BBS1_REL,"bbs1",ZPR,2,NULL
OP_LDY_IMM,"ldy",IMMEDIATE,2,emul_ldy
OP_LDA_IZPX,"lda",IZPX,2,emul_lda
OP_LDX_IMM,"ldx",IMMEDIATE,2,emul_ldx
OP_NOPI_A4,"nop",IMPLIED,1,NULL
OP_LDY_ZP,"ldy",ZP,2,emul_ldy
OP_LDA_ZP,"lda",ZP,2,emul_lda
OP_LDX_ZP,"ldx",ZP,2,emul_ldx
OP_SMB2_ZP,"smb2",ZP,2,NULL
OP_TAY,"tay",IMPLIED,1,emul_tay
OP_LDA_IMM,"lda",IMMEDIATE,2,emul_lda
OP_TAX,"tax",IMPLIED,1,emul_tax
OP_NOPI_AC,"nop",IMPLIED,1,NULL
OP_LDY_ABS,"ldy",ABSOLUTE,3,emul_ldy
OP_LDA_ABS,"lda",ABSOLUTE,3,emul_lda
OP_LDX_ABS,"ldx",ABSOLUTE,3,emul_ldx
OP_BBS2_REL,"bbs2",ZPR,2,NULL
OP_BCS_REL,"bcs",RELATIVE,2,NULL
OP_LDA_IZPY,"lda",IZPY,2,emul_lda
OP_LDA_IZP,"lda",IZP,2,emul_lda
OP_NOPI_B4,"nop",IMPLIED,1,NULL
OP_LDY_ZPX,"ldy",ZPX,2,emul_ldy
OP_LDA_ZPX,"lda",ZPX,2,emul_lda
OP_LDX_ZPY,"ldx",ZPY,1,emul_ldx
OP_SMB3_ZP,"smb3",ZP,2,NULL
OP_CLV,"clv",IMPLIED,1,NULL
OP_LDA_ABSY,"lda",ABSOLUTEY,3,emul_lda
OP_TSX,"tsx",IMPLIED,1,emul_tsx
OP_NOPI_BC,"nop",IMPLIED,1,NULL
OP_LDY_ABSX,"ldy",ABSOLUTEX,3,emul_ldy
OP_LDA_ABSX,"lda",ABSOLUTEX,3,emul_lda
OP_LDX_ABSY,"ldx",ABSOLUTEY,3,emul_ldx
OP_BBS3_REL,"bbs3",ZPR,2,NULL
OP_CPY_IMM,"cpy",IMMEDIATE,2,NULL
OP_CMP_IZPX,"cmp",IZPX,2,NULL
OP_NOPI_C3,"nop",IMMEDIATE,2,NULL
OP_NOPI_C4,"nop",IMPLIED,1,NULL
OP_CPY_ZP,"cpy",ZP,2,NULL
OP_CMP_ZP,"cmp",ZP,2,NULL
OP_DEC_ZP,"dec",ZP,2,emul_dec
OP_SMB4_ZP,"smb4",ZP,2,NULL
OP_INY,"iny",IMPLIED,1,emul_iny
OP_CMP_IMM,"cmp",IMMEDIATE,2,NULL
OP_DEX,"dex",IMPLIED,1,emul_dex
OP_WAI,"wai",IMPLIED,1,NULL
OP_CPY_ABS,"cpy",ABSOLUTE,3,NULL
OP_CMP_ABS,"cmp",ABSOLUTE,3,NULL
OP_DEC_ABS,"dec",ABSOLUTE,3,emul_dec
OP_BBS4_REL,"bbs4",ZPR,2,NULL
OP_BNE_REL,"bne",RELATIVE,2,NULL
OP_CMP_IZPY,"cmp",IZPY,2,NULL
OP_CMP_IZP,"cmp",IZP,2,NULL
OP_NOPI_D4,"nop",IMPLIED,1,NULL
OP_NOPI_D5,"nop",ZPX,2,NULL
OP_CMP_ZPX,"cmp",ZPX,2,NULL
OP_DEC_ZPX,"dec",ZPX,2,emul_dec
OP_SMB5_ZP,"smb5",ZP,2,NULL
OP_CLD,"cld",IMPLIED,1,NULL
OP_CMP_ABSY,"cmp",ABSOLUTEY,3,NULL
OP_PHX,"phx",IMPLIED,1,emul_phx
OP_STP,"stp",IMPLIED,1,emul_stp
OP_NOPI_DD,"nop",ABSOLUTE,3,NULL
OP_CMP_ABSX,"cmp",ABSOLUTEX,3,NULL
OP_DEC_ABSX,"dec",ABSOLUTEX,3,emul_dec
OP_BBS5_REL,"bbs5",ZPR,2,NULL
OP_CPX_IMM,"cpx",IMMEDIATE,2,NULL
OP_SBC_IZPX,"sbc",IZPX,2,NULL
OP_NOPI_E3,"nop",IMMEDIATE,2,NULL
OP_NOPI_E4,"nop",IMPLIED,1,NULL
OP_CPX_ZP,"cpx",ZP,2,NULL
OP_SBC_ZP,"sbc",ZP,2,NULL
OP_INC_ZP,"inc",ZP,2,emul_inc
OP_SMB6_ZP,"smb6",ZP,2,NULL
OP_INX,"inx",IMPLIED,1,emul_inx
OP_SBC_IMM,"sbc",IMMEDIATE,2,NULL
OP_NOP,"nop",IMPLIED,1,emul_nop
OP_NOPI_EC,"nop",IMPLIED,1,NULL
OP_CPX_ABS,"cpx",ABSOLUTE,3,NULL
OP_SBC_ABS,"sbc",ABSOLUTE,3,NULL
OP_INC_ABS,"inc",ABSOLUTE,3,emul_inc
OP_BBS6_REL,"bbs6",ZPR,2,NULL
OP_BEQ_REL,"beq",RELATIVE,2,NULL
OP_SBC_IZPY,"sbc",IZPY,2,NULL
OP_SBC_IZP,"sbc",IZP,2,NULL
OP_NOPI_F4,"nop",IMPLIED,1,NULL
OP_NOPI_F5,"nop",ZPX,2,NULL
OP_SBC_ZPX,"sbc",ZPX,2,NULL
OP_INC_ZPX,"inc",ZPX,2,emul_inc
OP_SMB7_ZP,"smb7",ZP,2,NULL
OP_SED,"sed",IMPLIED,1,NULL
OP_SBC_ABSY,"sbc",ABSOLUTEY,3,NULL
OP_PLX,"plx",IMPLIED,1,emul_plx
OP_NOPI_FC,"nop",IMPLIED,1,NULL
OP_NOPI_FD,"nop",ABSOLUTE,3,NULL
OP_SBC_ABSX,"sbc",ABSOLUTEX,3,NULL
OP_INC_ABSX,"inc",ABSOLUTEX,3,emul_inc
OP_BBS7_REL,"bbs7",ZPR,2,NULL
opcode_id,mnemonic,addressing,size,emulation,modify_pc
OP_BRK,"brk",IMPLIED,1,NULL,false
OP_ORA_IZPX,"ora",IZPX,2,emul_ora,false
OP_NOPI_3,"nop",IMMEDIATE,2,NULL,false
OP_NOPI_4,"nop",IMPLIED,1,NULL,false
OP_TSB_ZP,"tsb",ZP,2,NULL,false
OP_ORA_ZP,"ora",ZP,2,emul_ora,false
OP_ASL_ZP,"asl",ZP,2,emul_asl,false
OP_RMB0_ZP,"rmb0",ZP,2,emul_rmb0,false
OP_PHP,"php",IMPLIED,1,emul_php,false
OP_ORA_IMM,"ora",IMMEDIATE,2,emul_ora,false
OP_ASL,"asl",ACCUMULATOR,1,emul_asl,false
OP_NOPI_C,"nop",IMPLIED,1,NULL,false
OP_TSB_ABS,"tsb",ABSOLUTE,3,NULL,false
OP_ORA_ABS,"ora",ABSOLUTE,3,emul_ora,false
OP_ASL_ABS,"asl",ABSOLUTE,3,emul_asl,false
OP_BBR0_REL,"bbr0",ZPR,2,NULL,true
OP_BPL_REL,"bpl",RELATIVE,2,NULL,true
OP_ORA_IZPY,"ora",IZPY,2,emul_ora,false
OP_ORA_IZP,"ora",IZP,2,emul_ora,false
OP_NOPI_14,"nop",IMPLIED,1,NULL,false
OP_TRB_ZP,"trb",ZP,2,NULL,false
OP_ORA_ZPX,"ora",ZPX,2,emul_ora,false
OP_ASL_ZPX,"asl",ZPX,2,emul_asl,false
OP_RMB1_ZP,"rmb1",ZP,1,emul_rmb1,false
OP_CLC,"clc",IMPLIED,1,emul_clc,false
OP_ORA_ABSY,"ora",ABSOLUTEY,3,emul_ora,false
OP_INC,"inc",ACCUMULATOR,1,emul_inc,false
OP_NOPI_1C,"nop",IMPLIED,1,NULL,false
OP_TRB_ABS,"trb",ABSOLUTE,3,NULL,false
OP_ORA_ABSX,"ora",ABSOLUTEX,3,emul_ora,false
OP_ASL_ABSX,"asl",ABSOLUTEX,3,emul_asl,false
OP_BBR1_REL,"bbr1",ZPR,2,NULL,true
OP_JSR,"jsr",ABSOLUTE,3,NULL,true
OP_AND_IZPX,"and",IZPX,2,emul_and,false
OP_NOPI_23,"nop",IMMEDIATE,2,NULL,false
OP_NOPI_24,"nop",IMPLIED,1,NULL,false
OP_BIT_ZP,"bit",ZP,2,emul_bit,false
OP_AND_ZP,"and",ZP,2,emul_and,false
OP_ROL_ZP,"rol",ZP,2,emul_rol,false
OP_RMB2_ZP,"rmb2",ZP,2,emul_rmb2,false
OP_PLP,"plp",IMPLIED,1,emul_plp,false
OP_AND_IMM,"and",IMMEDIATE,2,emul_and,false
OP_ROL,"rol",ACCUMULATOR,1,emul_rol,false
OP_NOPI_2C,"nop",IMPLIED,1,NULL,false
OP_BIT_ABS,"bit",ABSOLUTE,3,emul_bit,false
OP_AND_ABS,"and",ABSOLUTE,3,emul_and,false
OP_ROL_ABS,"rol",ABSOLUTE,3,emul_rol,false
OP_BBR2_REL,"bbr2",ZPR,2,NULL,true
OP_BMI_REL,"bmi",RELATIVE,2,NULL,true
OP_AND_IZPY,"and",IZPY,2,emul_and,false
OP_AND_IZP,"and",IZP,2,emul_and,false
OP_NOPI_34,"nop",IMPLIED,1,NULL,false
OP_BIT_ZPX,"bit",ZPX,2,emul_bit,false
OP_AND_ZPX,"and",ZPX,2,emul_and,false
OP_ROL_ZPX,"rol",ZPX,2,emul_rol,false
OP_RMB3_ZP,"rmb3",ZP,2,emul_rmb3,false
OP_SEC,"sec",IMPLIED,1,emul_sec,false
OP_AND_ABSY,"and",ABSOLUTEY,3,emul_and,false
OP_DEC,"dec",ACCUMULATOR,1,emul_dec,false
OP_NOPI_3C,"nop",IMPLIED,1,NULL,false
OP_BIT_ABSX,"bit",ABSOLUTEX,3,emul_bit,false
OP_AND_ABSX,"and",ABSOLUTEX,3,emul_and,false
OP_ROL_ABSX,"rol",ABSOLUTEX,3,emul_rol,false
OP_BBR3_REL,"bbr3",ZPR,2,NULL,true
OP_RTI,"rti",IMPLIED,1,NULL,false
OP_EOR_IZPX,"eor",IZPX,2,emul_eor,false
OP_NOPI_43,"nop",IMMEDIATE,2,NULL,false
OP_NOPI_44,"nop",IMPLIED,1,NULL,false
OP_NOPI_45,"nop",ZP,2,NULL,false
OP_EOR_ZP,"eor",ZP,2,emul_eor,false
OP_LSR_ZP,"lsr",ZP,2,emul_lsr,false
OP_RMB4_ZP,"rmb4",ZP,2,emul_rmb4,false
OP_PHA,"pha",IMPLIED,1,emul_pha,false
OP_EOR_IMM,"eor",IMMEDIATE,2,emul_eor,false
OP_LSR,"lsr",ACCUMULATOR,1,emul_lsr,false
OP_NOPI_4C,"nop",IMPLIED,1,NULL,false
OP_JMP_ABS,"jmp",ABSOLUTE,3,NULL,true
OP_EOR_ABS,"eor",ABSOLUTE,3,emul_eor,false
OP_LSR_ABS,"lsr",ABSOLUTE,3,emul_lsr,false
OP_BBR4_REL,"bbr4",ZPR,2,NULL,true
OP_BVC_REL,"bvc",RELATIVE,2,NULL,true
OP_EOR_IZPY,"eor",IZPY,2,emul_eor,false
OP_EOR_IZP,"eor",IZP,2,emul_eor,false
OP_NOPI_54,"nop",IMPLIED,1,NULL,false
OP_NOPI_55,"nop",ZPX,2,NULL,false
OP_EOR_ZPX,"eor",ZPX,2,emul_eor,false
OP_LSR_ZPX,"lsr",ZPX,2,emul_lsr,false
OP_RMB5_ZP,"rmb5",ZP,2,emul_rmb5,false
OP_CLI,"cli",IMPLIED,1,NULL,false
OP_EOR_ABSY,"eor",ABSOLUTEY,3,emul_eor,false
OP_PHY,"phy",IMPLIED,1,emul_phy,false
OP_NOPI_5C,"nop",IMPLIED,1,NULL,false
OP_NOPI_5D,"nop",ABSOLUTE,3,NULL,false
OP_EOR_ABSX,"eor",ABSOLUTEX,3,emul_eor,false
OP_LSR_ABSX,"lsr",ABSOLUTEX,3,emul_lsr,false
OP_BBR5_REL,"bbr5",ZPR,2,NULL,true
OP_RTS,"rts",IMPLIED,1,NULL,false
OP_ADC_IZPX,"adc",IZPX,2,NULL,false
OP_NOPI_63,"nop",IMMEDIATE,2,NULL,false
OP_NOPI_64,"nop",IMPLIED,1,NULL,false
OP_STZ_ZP,"stz",ZP,2,emul_stz,false
OP_ADC_ZP,"adc",ZP,2,NULL,false
OP_ROR_ZP,"ror",ZP,2,emul_ror,false
OP_RMB6_ZP,"rmb6",ZP,2,emul_rmb6,false
OP_PLA,"pla",IMPLIED,1,emul_pla,false
OP_ADC_IMM,"adc",IMMEDIATE,2,NULL,false
OP_ROR,"ror",ACCUMULATOR,1,emul_ror,false
OP_NOPI_6C,"nop",IMPLIED,1,NULL,false
OP_JMP_IABS,"jmp",IABSOLUTE,3,NULL,true
OP_ADC_ABS,"adc",ABSOLUTE,3,NULL,false
OP_ROR_ABS,"ror",ABSOLUTE,3,emul_ror,false
OP_BBR6_REL,"bbr6",ZPR,2,NULL,true
OP_BVS_REL,"bvs",RELATIVE,2,NULL,true
OP_ADC_IZPY,"adc",IZPY,2,NULL,false
OP_ADC_IZP,"adc",IZP,2,NULL,false
OP_NOPI_74,"nop",IMPLIED,1,NULL,false
OP_STZ_ZPX,"stz",ZPX,2,emul_stz,false
OP_ADC_ZPX,"adc",ZPX,2,NULL,false
OP_ROR_ZPX,"ror",ZPX,2,emul_ror,false
OP_RMB7_ZP,"rmb7",ZP,2,emul_rmb7,false
OP_SEI,"sei",IMPLIED,1,NULL,false
OP_ADC_ABSY,"adc",ABSOLUTEY,3,NULL,false
OP_PLY,"ply",IMPLIED,1,emul_ply,false
OP_NOPI_7C,"nop",IMPLIED,1,NULL,false
OP_JMP_IABSX,"jmp",IABSOLUTEX,3,NULL,true
OP_ADC_ABSX,"adc",ABSOLUTEX,3,NULL,false
OP_ROR_ABSX,"ror",ABSOLUTEX,3,emul_ror,false
OP_BBR7_REL,"bbr7",ZPR,2,NULL,true
OP_BRA_REL,"bra",RELATIVE,2,NULL,true
OP_STA_IZPX,"sta",IZPX,2,emul_sta,false
OP_NOPI_83,"nop",IMMEDIATE,2,NULL,false
OP_NOPI_84,"nop",IMPLIED,1,NULL,false
OP_STY_ZP,"sty",ZP,2,emul_sty,false
OP_STA_ZP,"sta",ZP,2,emul_sta,false
OP_STX_ZP,"stx",ZP,2,emul_stx,false
OP_SMB0_ZP,"smb0",ZP,2,NULL,false
OP_DEY,"dey",IMPLIED,1,emul_dey,false
OP_BIT_IMM,"bit",IMMEDIATE,2,emul_bit,false
OP_TXA,"txa",IMPLIED,1,emul_txa,false
OP_NOPI_8C,"nop",IMPLIED,1,NULL,false
OP_STY_ABS,"sty",ABSOLUTE,3,emul_sty,false
OP_STA_ABS,"sta",ABSOLUTE,3,emul_sta,false
OP_STX_ABS,"stx",ABSOLUTE,3,emul_stx,false
OP_BBS0_REL,"bbs0",ZPR,2,NULL,true
OP_BCC_REL,"bcc",RELATIVE,2,NULL,true
OP_STA_IZPY,"sta",IZPY,2,emul_sta,false
OP_STA_IZP,"sta",IZP,2,emul_sta,false
OP_NOPI_94,"nop",IMPLIED,1,NULL,false
OP_STY_ZPX,"sty",ZPX,2,emul_sty,false
OP_STA_ZPX,"sta",ZPX,2,emul_sta,false
OP_STX_ZPY,"stx",ZPY,2,emul_stx,false
OP_SMB1_ZP,"smb1",ZP,2,NULL,false
OP_TYA,"tya",IMPLIED,1,emul_tya,false
OP_STA_ABSY,"sta",ABSOLUTEY,3,emul_sta,false
OP_TXS,"txs",IMPLIED,1,emul_txs,false
OP_NOPI_9C,"nop",IMPLIED,1,NULL,false
OP_STZ_ABS,"stz",ABSOLUTE,3,emul_stz,false
OP_STA_ABSX,"sta",ABSOLUTEX,3,emul_sta,false
OP_STZ_ABSX,"stz",ABSOLUTEX,3,emul_stz,false
OP_BBS1_REL,"bbs1",ZPR,2,NULL,true
OP_LDY_IMM,"ldy",IMMEDIATE,2,emul_ldy,false
OP_LDA_IZPX,"lda",IZPX,2,emul_lda,false
OP_LDX_IMM,"ldx",IMMEDIATE,2,emul_ldx,false
OP_NOPI_A4,"nop",IMPLIED,1,NULL,false
OP_LDY_ZP,"ldy",ZP,2,emul_ldy,false
OP_LDA_ZP,"lda",ZP,2,emul_lda,false
OP_LDX_ZP,"ldx",ZP,2,emul_ldx,false
OP_SMB2_ZP,"smb2",ZP,2,NULL,false
OP_TAY,"tay",IMPLIED,1,emul_tay,false
OP_LDA_IMM,"lda",IMMEDIATE,2,emul_lda,false
OP_TAX,"tax",IMPLIED,1,emul_tax,false
OP_NOPI_AC,"nop",IMPLIED,1,NULL,false
OP_LDY_ABS,"ldy",ABSOLUTE,3,emul_ldy,false
OP_LDA_ABS,"lda",ABSOLUTE,3,emul_lda,false
OP_LDX_ABS,"ldx",ABSOLUTE,3,emul_ldx,false
OP_BBS2_REL,"bbs2",ZPR,2,NULL,true
OP_BCS_REL,"bcs",RELATIVE,2,NULL,true
OP_LDA_IZPY,"lda",IZPY,2,emul_lda,false
OP_LDA_IZP,"lda",IZP,2,emul_lda,false
OP_NOPI_B4,"nop",IMPLIED,1,NULL,false
OP_LDY_ZPX,"ldy",ZPX,2,emul_ldy,false
OP_LDA_ZPX,"lda",ZPX,2,emul_lda,false
OP_LDX_ZPY,"ldx",ZPY,1,emul_ldx,false
OP_SMB3_ZP,"smb3",ZP,2,NULL,false
OP_CLV,"clv",IMPLIED,1,NULL,false
OP_LDA_ABSY,"lda",ABSOLUTEY,3,emul_lda,false
OP_TSX,"tsx",IMPLIED,1,emul_tsx,false
OP_NOPI_BC,"nop",IMPLIED,1,NULL,false
OP_LDY_ABSX,"ldy",ABSOLUTEX,3,emul_ldy,false
OP_LDA_ABSX,"lda",ABSOLUTEX,3,emul_lda,false
OP_LDX_ABSY,"ldx",ABSOLUTEY,3,emul_ldx,false
OP_BBS3_REL,"bbs3",ZPR,2,NULL,true
OP_CPY_IMM,"cpy",IMMEDIATE,2,NULL,false
OP_CMP_IZPX,"cmp",IZPX,2,NULL,false
OP_NOPI_C3,"nop",IMMEDIATE,2,NULL,false
OP_NOPI_C4,"nop",IMPLIED,1,NULL,false
OP_CPY_ZP,"cpy",ZP,2,NULL,false
OP_CMP_ZP,"cmp",ZP,2,NULL,false
OP_DEC_ZP,"dec",ZP,2,emul_dec,false
OP_SMB4_ZP,"smb4",ZP,2,NULL,false
OP_INY,"iny",IMPLIED,1,emul_iny,false
OP_CMP_IMM,"cmp",IMMEDIATE,2,NULL,false
OP_DEX,"dex",IMPLIED,1,emul_dex,false
OP_WAI,"wai",IMPLIED,1,NULL,false
OP_CPY_ABS,"cpy",ABSOLUTE,3,NULL,false
OP_CMP_ABS,"cmp",ABSOLUTE,3,NULL,false
OP_DEC_ABS,"dec",ABSOLUTE,3,emul_dec,false
OP_BBS4_REL,"bbs4",ZPR,2,NULL,true
OP_BNE_REL,"bne",RELATIVE,2,NULL,true
OP_CMP_IZPY,"cmp",IZPY,2,NULL,false
OP_CMP_IZP,"cmp",IZP,2,NULL,false
OP_NOPI_D4,"nop",IMPLIED,1,NULL,false
OP_NOPI_D5,"nop",ZPX,2,NULL,false
OP_CMP_ZPX,"cmp",ZPX,2,NULL,false
OP_DEC_ZPX,"dec",ZPX,2,emul_dec,false
OP_SMB5_ZP,"smb5",ZP,2,NULL,false
OP_CLD,"cld",IMPLIED,1,NULL,false
OP_CMP_ABSY,"cmp",ABSOLUTEY,3,NULL,false
OP_PHX,"phx",IMPLIED,1,emul_phx,false
OP_STP,"stp",IMPLIED,1,emul_stp,false
OP_NOPI_DD,"nop",ABSOLUTE,3,NULL,false
OP_CMP_ABSX,"cmp",ABSOLUTEX,3,NULL,false
OP_DEC_ABSX,"dec",ABSOLUTEX,3,emul_dec,false
OP_BBS5_REL,"bbs5",ZPR,2,NULL,true
OP_CPX_IMM,"cpx",IMMEDIATE,2,NULL,false
OP_SBC_IZPX,"sbc",IZPX,2,NULL,false
OP_NOPI_E3,"nop",IMMEDIATE,2,NULL,false
OP_NOPI_E4,"nop",IMPLIED,1,NULL,false
OP_CPX_ZP,"cpx",ZP,2,NULL,false
OP_SBC_ZP,"sbc",ZP,2,NULL,false
OP_INC_ZP,"inc",ZP,2,emul_inc,false
OP_SMB6_ZP,"smb6",ZP,2,NULL,false
OP_INX,"inx",IMPLIED,1,emul_inx,false
OP_SBC_IMM,"sbc",IMMEDIATE,2,NULL,false
OP_NOP,"nop",IMPLIED,1,emul_nop,false
OP_NOPI_EC,"nop",IMPLIED,1,NULL,false
OP_CPX_ABS,"cpx",ABSOLUTE,3,NULL,false
OP_SBC_ABS,"sbc",ABSOLUTE,3,NULL,false
OP_INC_ABS,"inc",ABSOLUTE,3,emul_inc,false
OP_BBS6_REL,"bbs6",ZPR,2,NULL,true
OP_BEQ_REL,"beq",RELATIVE,2,NULL,true
OP_SBC_IZPY,"sbc",IZPY,2,NULL,false
OP_SBC_IZP,"sbc",IZP,2,NULL,false
OP_NOPI_F4,"nop",IMPLIED,1,NULL,false
OP_NOPI_F5,"nop",ZPX,2,NULL,false
OP_SBC_ZPX,"sbc",ZPX,2,NULL,false
OP_INC_ZPX,"inc",ZPX,2,emul_inc,false
OP_SMB7_ZP,"smb7",ZP,2,NULL,false
OP_SED,"sed",IMPLIED,1,NULL,false
OP_SBC_ABSY,"sbc",ABSOLUTEY,3,NULL,false
OP_PLX,"plx",IMPLIED,1,emul_plx,false
OP_NOPI_FC,"nop",IMPLIED,1,NULL,false
OP_NOPI_FD,"nop",ABSOLUTE,3,NULL,false
OP_SBC_ABSX,"sbc",ABSOLUTEX,3,NULL,false
OP_INC_ABSX,"inc",ABSOLUTEX,3,emul_inc,false
OP_BBS7_REL,"bbs7",ZPR,2,NULL,true

1 opcode_id mnemonic addressing size emulation modify_pc
2 OP_BRK brk IMPLIED 1 NULL false
3 OP_ORA_IZPX ora IZPX 2 emul_ora false
4 OP_NOPI_3 nop IMMEDIATE 2 NULL false
5 OP_NOPI_4 nop IMPLIED 1 NULL false
6 OP_TSB_ZP tsb ZP 2 NULL false
7 OP_ORA_ZP ora ZP 2 emul_ora false
8 OP_ASL_ZP asl ZP 2 emul_asl false
9 OP_RMB0_ZP rmb0 ZP 2 emul_rmb0 false
10 OP_PHP php IMPLIED 1 emul_php false
11 OP_ORA_IMM ora IMMEDIATE 2 emul_ora false
12 OP_ASL asl ACCUMULATOR 1 emul_asl false
13 OP_NOPI_C nop IMPLIED 1 NULL false
14 OP_TSB_ABS tsb ABSOLUTE 3 NULL false
15 OP_ORA_ABS ora ABSOLUTE 3 emul_ora false
16 OP_ASL_ABS asl ABSOLUTE 3 emul_asl false
17 OP_BBR0_REL bbr0 ZPR 2 NULL true
18 OP_BPL_REL bpl RELATIVE 2 NULL true
19 OP_ORA_IZPY ora IZPY 2 emul_ora false
20 OP_ORA_IZP ora IZP 2 emul_ora false
21 OP_NOPI_14 nop IMPLIED 1 NULL false
22 OP_TRB_ZP trb ZP 2 NULL false
23 OP_ORA_ZPX ora ZPX 2 emul_ora false
24 OP_ASL_ZPX asl ZPX 2 emul_asl false
25 OP_RMB1_ZP rmb1 ZP 1 emul_rmb1 false
26 OP_CLC clc IMPLIED 1 emul_clc false
27 OP_ORA_ABSY ora ABSOLUTEY 3 emul_ora false
28 OP_INC inc ACCUMULATOR 1 emul_inc false
29 OP_NOPI_1C nop IMPLIED 1 NULL false
30 OP_TRB_ABS trb ABSOLUTE 3 NULL false
31 OP_ORA_ABSX ora ABSOLUTEX 3 emul_ora false
32 OP_ASL_ABSX asl ABSOLUTEX 3 emul_asl false
33 OP_BBR1_REL bbr1 ZPR 2 NULL true
34 OP_JSR jsr ABSOLUTE 3 NULL true
35 OP_AND_IZPX and IZPX 2 emul_and false
36 OP_NOPI_23 nop IMMEDIATE 2 NULL false
37 OP_NOPI_24 nop IMPLIED 1 NULL false
38 OP_BIT_ZP bit ZP 2 emul_bit false
39 OP_AND_ZP and ZP 2 emul_and false
40 OP_ROL_ZP rol ZP 2 emul_rol false
41 OP_RMB2_ZP rmb2 ZP 2 emul_rmb2 false
42 OP_PLP plp IMPLIED 1 emul_plp false
43 OP_AND_IMM and IMMEDIATE 2 emul_and false
44 OP_ROL rol ACCUMULATOR 1 emul_rol false
45 OP_NOPI_2C nop IMPLIED 1 NULL false
46 OP_BIT_ABS bit ABSOLUTE 3 emul_bit false
47 OP_AND_ABS and ABSOLUTE 3 emul_and false
48 OP_ROL_ABS rol ABSOLUTE 3 emul_rol false
49 OP_BBR2_REL bbr2 ZPR 2 NULL true
50 OP_BMI_REL bmi RELATIVE 2 NULL true
51 OP_AND_IZPY and IZPY 2 emul_and false
52 OP_AND_IZP and IZP 2 emul_and false
53 OP_NOPI_34 nop IMPLIED 1 NULL false
54 OP_BIT_ZPX bit ZPX 2 emul_bit false
55 OP_AND_ZPX and ZPX 2 emul_and false
56 OP_ROL_ZPX rol ZPX 2 emul_rol false
57 OP_RMB3_ZP rmb3 ZP 2 emul_rmb3 false
58 OP_SEC sec IMPLIED 1 emul_sec false
59 OP_AND_ABSY and ABSOLUTEY 3 emul_and false
60 OP_DEC dec ACCUMULATOR 1 emul_dec false
61 OP_NOPI_3C nop IMPLIED 1 NULL false
62 OP_BIT_ABSX bit ABSOLUTEX 3 emul_bit false
63 OP_AND_ABSX and ABSOLUTEX 3 emul_and false
64 OP_ROL_ABSX rol ABSOLUTEX 3 emul_rol false
65 OP_BBR3_REL bbr3 ZPR 2 NULL true
66 OP_RTI rti IMPLIED 1 NULL false
67 OP_EOR_IZPX eor IZPX 2 emul_eor false
68 OP_NOPI_43 nop IMMEDIATE 2 NULL false
69 OP_NOPI_44 nop IMPLIED 1 NULL false
70 OP_NOPI_45 nop ZP 2 NULL false
71 OP_EOR_ZP eor ZP 2 emul_eor false
72 OP_LSR_ZP lsr ZP 2 emul_lsr false
73 OP_RMB4_ZP rmb4 ZP 2 emul_rmb4 false
74 OP_PHA pha IMPLIED 1 emul_pha false
75 OP_EOR_IMM eor IMMEDIATE 2 emul_eor false
76 OP_LSR lsr ACCUMULATOR 1 emul_lsr false
77 OP_NOPI_4C nop IMPLIED 1 NULL false
78 OP_JMP_ABS jmp ABSOLUTE 3 NULL true
79 OP_EOR_ABS eor ABSOLUTE 3 emul_eor false
80 OP_LSR_ABS lsr ABSOLUTE 3 emul_lsr false
81 OP_BBR4_REL bbr4 ZPR 2 NULL true
82 OP_BVC_REL bvc RELATIVE 2 NULL true
83 OP_EOR_IZPY eor IZPY 2 emul_eor false
84 OP_EOR_IZP eor IZP 2 emul_eor false
85 OP_NOPI_54 nop IMPLIED 1 NULL false
86 OP_NOPI_55 nop ZPX 2 NULL false
87 OP_EOR_ZPX eor ZPX 2 emul_eor false
88 OP_LSR_ZPX lsr ZPX 2 emul_lsr false
89 OP_RMB5_ZP rmb5 ZP 2 emul_rmb5 false
90 OP_CLI cli IMPLIED 1 NULL false
91 OP_EOR_ABSY eor ABSOLUTEY 3 emul_eor false
92 OP_PHY phy IMPLIED 1 emul_phy false
93 OP_NOPI_5C nop IMPLIED 1 NULL false
94 OP_NOPI_5D nop ABSOLUTE 3 NULL false
95 OP_EOR_ABSX eor ABSOLUTEX 3 emul_eor false
96 OP_LSR_ABSX lsr ABSOLUTEX 3 emul_lsr false
97 OP_BBR5_REL bbr5 ZPR 2 NULL true
98 OP_RTS rts IMPLIED 1 NULL false
99 OP_ADC_IZPX adc IZPX 2 NULL false
100 OP_NOPI_63 nop IMMEDIATE 2 NULL false
101 OP_NOPI_64 nop IMPLIED 1 NULL false
102 OP_STZ_ZP stz ZP 2 emul_stz false
103 OP_ADC_ZP adc ZP 2 NULL false
104 OP_ROR_ZP ror ZP 2 emul_ror false
105 OP_RMB6_ZP rmb6 ZP 2 emul_rmb6 false
106 OP_PLA pla IMPLIED 1 emul_pla false
107 OP_ADC_IMM adc IMMEDIATE 2 NULL false
108 OP_ROR ror ACCUMULATOR 1 emul_ror false
109 OP_NOPI_6C nop IMPLIED 1 NULL false
110 OP_JMP_IABS jmp IABSOLUTE 3 NULL true
111 OP_ADC_ABS adc ABSOLUTE 3 NULL false
112 OP_ROR_ABS ror ABSOLUTE 3 emul_ror false
113 OP_BBR6_REL bbr6 ZPR 2 NULL true
114 OP_BVS_REL bvs RELATIVE 2 NULL true
115 OP_ADC_IZPY adc IZPY 2 NULL false
116 OP_ADC_IZP adc IZP 2 NULL false
117 OP_NOPI_74 nop IMPLIED 1 NULL false
118 OP_STZ_ZPX stz ZPX 2 emul_stz false
119 OP_ADC_ZPX adc ZPX 2 NULL false
120 OP_ROR_ZPX ror ZPX 2 emul_ror false
121 OP_RMB7_ZP rmb7 ZP 2 emul_rmb7 false
122 OP_SEI sei IMPLIED 1 NULL false
123 OP_ADC_ABSY adc ABSOLUTEY 3 NULL false
124 OP_PLY ply IMPLIED 1 emul_ply false
125 OP_NOPI_7C nop IMPLIED 1 NULL false
126 OP_JMP_IABSX jmp IABSOLUTEX 3 NULL true
127 OP_ADC_ABSX adc ABSOLUTEX 3 NULL false
128 OP_ROR_ABSX ror ABSOLUTEX 3 emul_ror false
129 OP_BBR7_REL bbr7 ZPR 2 NULL true
130 OP_BRA_REL bra RELATIVE 2 NULL true
131 OP_STA_IZPX sta IZPX 2 emul_sta false
132 OP_NOPI_83 nop IMMEDIATE 2 NULL false
133 OP_NOPI_84 nop IMPLIED 1 NULL false
134 OP_STY_ZP sty ZP 2 emul_sty false
135 OP_STA_ZP sta ZP 2 emul_sta false
136 OP_STX_ZP stx ZP 2 emul_stx false
137 OP_SMB0_ZP smb0 ZP 2 NULL false
138 OP_DEY dey IMPLIED 1 emul_dey false
139 OP_BIT_IMM bit IMMEDIATE 2 emul_bit false
140 OP_TXA txa IMPLIED 1 emul_txa false
141 OP_NOPI_8C nop IMPLIED 1 NULL false
142 OP_STY_ABS sty ABSOLUTE 3 emul_sty false
143 OP_STA_ABS sta ABSOLUTE 3 emul_sta false
144 OP_STX_ABS stx ABSOLUTE 3 emul_stx false
145 OP_BBS0_REL bbs0 ZPR 2 NULL true
146 OP_BCC_REL bcc RELATIVE 2 NULL true
147 OP_STA_IZPY sta IZPY 2 emul_sta false
148 OP_STA_IZP sta IZP 2 emul_sta false
149 OP_NOPI_94 nop IMPLIED 1 NULL false
150 OP_STY_ZPX sty ZPX 2 emul_sty false
151 OP_STA_ZPX sta ZPX 2 emul_sta false
152 OP_STX_ZPY stx ZPY 2 emul_stx false
153 OP_SMB1_ZP smb1 ZP 2 NULL false
154 OP_TYA tya IMPLIED 1 emul_tya false
155 OP_STA_ABSY sta ABSOLUTEY 3 emul_sta false
156 OP_TXS txs IMPLIED 1 emul_txs false
157 OP_NOPI_9C nop IMPLIED 1 NULL false
158 OP_STZ_ABS stz ABSOLUTE 3 emul_stz false
159 OP_STA_ABSX sta ABSOLUTEX 3 emul_sta false
160 OP_STZ_ABSX stz ABSOLUTEX 3 emul_stz false
161 OP_BBS1_REL bbs1 ZPR 2 NULL true
162 OP_LDY_IMM ldy IMMEDIATE 2 emul_ldy false
163 OP_LDA_IZPX lda IZPX 2 emul_lda false
164 OP_LDX_IMM ldx IMMEDIATE 2 emul_ldx false
165 OP_NOPI_A4 nop IMPLIED 1 NULL false
166 OP_LDY_ZP ldy ZP 2 emul_ldy false
167 OP_LDA_ZP lda ZP 2 emul_lda false
168 OP_LDX_ZP ldx ZP 2 emul_ldx false
169 OP_SMB2_ZP smb2 ZP 2 NULL false
170 OP_TAY tay IMPLIED 1 emul_tay false
171 OP_LDA_IMM lda IMMEDIATE 2 emul_lda false
172 OP_TAX tax IMPLIED 1 emul_tax false
173 OP_NOPI_AC nop IMPLIED 1 NULL false
174 OP_LDY_ABS ldy ABSOLUTE 3 emul_ldy false
175 OP_LDA_ABS lda ABSOLUTE 3 emul_lda false
176 OP_LDX_ABS ldx ABSOLUTE 3 emul_ldx false
177 OP_BBS2_REL bbs2 ZPR 2 NULL true
178 OP_BCS_REL bcs RELATIVE 2 NULL true
179 OP_LDA_IZPY lda IZPY 2 emul_lda false
180 OP_LDA_IZP lda IZP 2 emul_lda false
181 OP_NOPI_B4 nop IMPLIED 1 NULL false
182 OP_LDY_ZPX ldy ZPX 2 emul_ldy false
183 OP_LDA_ZPX lda ZPX 2 emul_lda false
184 OP_LDX_ZPY ldx ZPY 1 emul_ldx false
185 OP_SMB3_ZP smb3 ZP 2 NULL false
186 OP_CLV clv IMPLIED 1 NULL false
187 OP_LDA_ABSY lda ABSOLUTEY 3 emul_lda false
188 OP_TSX tsx IMPLIED 1 emul_tsx false
189 OP_NOPI_BC nop IMPLIED 1 NULL false
190 OP_LDY_ABSX ldy ABSOLUTEX 3 emul_ldy false
191 OP_LDA_ABSX lda ABSOLUTEX 3 emul_lda false
192 OP_LDX_ABSY ldx ABSOLUTEY 3 emul_ldx false
193 OP_BBS3_REL bbs3 ZPR 2 NULL true
194 OP_CPY_IMM cpy IMMEDIATE 2 NULL false
195 OP_CMP_IZPX cmp IZPX 2 NULL false
196 OP_NOPI_C3 nop IMMEDIATE 2 NULL false
197 OP_NOPI_C4 nop IMPLIED 1 NULL false
198 OP_CPY_ZP cpy ZP 2 NULL false
199 OP_CMP_ZP cmp ZP 2 NULL false
200 OP_DEC_ZP dec ZP 2 emul_dec false
201 OP_SMB4_ZP smb4 ZP 2 NULL false
202 OP_INY iny IMPLIED 1 emul_iny false
203 OP_CMP_IMM cmp IMMEDIATE 2 NULL false
204 OP_DEX dex IMPLIED 1 emul_dex false
205 OP_WAI wai IMPLIED 1 NULL false
206 OP_CPY_ABS cpy ABSOLUTE 3 NULL false
207 OP_CMP_ABS cmp ABSOLUTE 3 NULL false
208 OP_DEC_ABS dec ABSOLUTE 3 emul_dec false
209 OP_BBS4_REL bbs4 ZPR 2 NULL true
210 OP_BNE_REL bne RELATIVE 2 NULL true
211 OP_CMP_IZPY cmp IZPY 2 NULL false
212 OP_CMP_IZP cmp IZP 2 NULL false
213 OP_NOPI_D4 nop IMPLIED 1 NULL false
214 OP_NOPI_D5 nop ZPX 2 NULL false
215 OP_CMP_ZPX cmp ZPX 2 NULL false
216 OP_DEC_ZPX dec ZPX 2 emul_dec false
217 OP_SMB5_ZP smb5 ZP 2 NULL false
218 OP_CLD cld IMPLIED 1 NULL false
219 OP_CMP_ABSY cmp ABSOLUTEY 3 NULL false
220 OP_PHX phx IMPLIED 1 emul_phx false
221 OP_STP stp IMPLIED 1 emul_stp false
222 OP_NOPI_DD nop ABSOLUTE 3 NULL false
223 OP_CMP_ABSX cmp ABSOLUTEX 3 NULL false
224 OP_DEC_ABSX dec ABSOLUTEX 3 emul_dec false
225 OP_BBS5_REL bbs5 ZPR 2 NULL true
226 OP_CPX_IMM cpx IMMEDIATE 2 NULL false
227 OP_SBC_IZPX sbc IZPX 2 NULL false
228 OP_NOPI_E3 nop IMMEDIATE 2 NULL false
229 OP_NOPI_E4 nop IMPLIED 1 NULL false
230 OP_CPX_ZP cpx ZP 2 NULL false
231 OP_SBC_ZP sbc ZP 2 NULL false
232 OP_INC_ZP inc ZP 2 emul_inc false
233 OP_SMB6_ZP smb6 ZP 2 NULL false
234 OP_INX inx IMPLIED 1 emul_inx false
235 OP_SBC_IMM sbc IMMEDIATE 2 NULL false
236 OP_NOP nop IMPLIED 1 emul_nop false
237 OP_NOPI_EC nop IMPLIED 1 NULL false
238 OP_CPX_ABS cpx ABSOLUTE 3 NULL false
239 OP_SBC_ABS sbc ABSOLUTE 3 NULL false
240 OP_INC_ABS inc ABSOLUTE 3 emul_inc false
241 OP_BBS6_REL bbs6 ZPR 2 NULL true
242 OP_BEQ_REL beq RELATIVE 2 NULL true
243 OP_SBC_IZPY sbc IZPY 2 NULL false
244 OP_SBC_IZP sbc IZP 2 NULL false
245 OP_NOPI_F4 nop IMPLIED 1 NULL false
246 OP_NOPI_F5 nop ZPX 2 NULL false
247 OP_SBC_ZPX sbc ZPX 2 NULL false
248 OP_INC_ZPX inc ZPX 2 emul_inc false
249 OP_SMB7_ZP smb7 ZP 2 NULL false
250 OP_SED sed IMPLIED 1 NULL false
251 OP_SBC_ABSY sbc ABSOLUTEY 3 NULL false
252 OP_PLX plx IMPLIED 1 emul_plx false
253 OP_NOPI_FC nop IMPLIED 1 NULL false
254 OP_NOPI_FD nop ABSOLUTE 3 NULL false
255 OP_SBC_ABSX sbc ABSOLUTEX 3 NULL false
256 OP_INC_ABSX inc ABSOLUTEX 3 emul_inc false
257 OP_BBS7_REL bbs7 ZPR 2 NULL true

View File

@ -327,3 +327,10 @@ program_counter_increment(rk65c02emu_t *e, instrdef_t *id)
e->regs.PC += id->size;
}
/* check whether given instruction modify program counter */
bool
instruction_modify_pc(instrdef_t *id)
{
return id->modify_pc;
}

View File

@ -31,11 +31,12 @@ struct instruction {
typedef struct instruction instruction_t;
struct instrdef {
uint8_t opcode;
uint8_t opcode; /* opcode, normally same as in instruction */
const char *mnemonic;
addressing_t mode;
uint8_t size;
void (*emul)(rk65c02emu_t *e, void *id, instruction_t *i);
bool modify_pc;
};
typedef struct instrdef instrdef_t;
@ -51,5 +52,6 @@ void instruction_status_adjust_negative(rk65c02emu_t *, uint8_t);
void stack_push(rk65c02emu_t *, uint8_t);
uint8_t stack_pop(rk65c02emu_t *);
void program_counter_increment(rk65c02emu_t *, instrdef_t *);
bool instruction_modify_pc(instrdef_t *);
#endif /* _INSTRUCTION_H_ */

View File

@ -46,8 +46,8 @@ rk65c02_exec(rk65c02emu_t *e)
if (id.emul != NULL) {
id.emul(e, &id, &i);
/* if (!instruction_modify_pc) */
program_counter_increment(e, &id);
if (!instruction_modify_pc(&id))
program_counter_increment(e, &id);
} else {
printf("unimplemented opcode %X @ %X\n", i.opcode,
e->regs.PC);