summaryrefslogtreecommitdiff
path: root/tables.h
diff options
context:
space:
mode:
Diffstat (limited to 'tables.h')
-rw-r--r--tables.h353
1 files changed, 169 insertions, 184 deletions
diff --git a/tables.h b/tables.h
index 45c0910..0c955dd 100644
--- a/tables.h
+++ b/tables.h
@@ -1,188 +1,173 @@
#include "enums.h"
static const uint8_t optype[0x100] = {
- [CPS ] = IMPL,
- [ADC ] = IMM,
- [AAB ] = IMPL,
- [ADC_AB ] = ABS,
- [LDA_IN ] = IND,
- [ADC_Z ] = ZM,
- [PHP ] = IMM,
- [CPB ] = IMM,
- [PHB ] = IMM,
- [DEC_AB ] = ABS,
- [DEC_Z ] = ZM,
- [JMP_Z ] = ZM,
- [JMP ] = ABS,
- [SBC ] = IMM,
- [SAB ] = IMPL,
- [SBC_AB ] = ABS,
- [STA_IN ] = IND,
- [SBC_Z ] = ZM,
- [ENT ] = IMM,
- [CPY ] = IMM,
- [PLB ] = IMM,
- [INC_AB ] = ABS,
- [INC_Z ] = ZM,
- [JSR_Z ] = ZM,
- [JSR ] = ABS,
- [AND ] = IMM,
- [ABA ] = IMPL,
- [AND_AB ] = ABS,
- [CMP_IN ] = IND,
- [AND_Z ] = ZM,
- [PLP ] = IMM,
- [CPX ] = IMM,
- [PHY ] = IMM,
- [CPB_AB ] = ABS,
- [CPB_Z ] = ZM,
- [BPO_Z ] = ZM,
- [BPO ] = ABS,
- [ORA ] = IMM,
- [OAB ] = IMPL,
- [ORA_AB ] = ABS,
- [LDB_IN ] = IND,
- [ORA_Z ] = ZM,
- [STT ] = IMM,
- [LDA_ZY ] = ZMY,
- [PLY ] = IMM,
- [CPX_AB ] = ABS,
- [CPY_Z ] = ZM,
- [BNG_Z ] = ZM,
- [BNG ] = ABS,
- [XOR ] = IMM,
- [XAB ] = IMPL,
- [XOR_AB ] = ABS,
- [STB_IN ] = IND,
- [XOR_Z ] = ZM,
- [PHA ] = IMM,
- [STA_ZY ] = ZMY,
- [PHX ] = IMM,
- [CPY_AB ] = ABS,
- [CPX_Z ] = ZM,
- [BCS_Z ] = ZM,
- [BCS ] = ABS,
- [LSL ] = IMM,
- [LLB ] = IMPL,
- [LSL_AB ] = ABS,
- [CPB_IN ] = IND,
- [LSL_Z ] = ZM,
- [CLC ] = IMPL,
- [LDB_ZY ] = ZMY,
- [PLX ] = IMM,
- [LDA_IY ] = INDY,
- [LDA_IX ] = INDX,
- [BCC_Z ] = ZM,
- [BCC ] = ABS,
- [LSR ] = IMM,
- [LRB ] = IMPL,
- [LSR_AB ] = ABS,
- [LDY_IN ] = IND,
- [LSR_Z ] = ZM,
- [PLA ] = IMM,
- [STB_ZY ] = ZMY,
- [TAB ] = IMPL,
- [STA_IY ] = INDY,
- [STA_IX ] = INDX,
- [BEQ_Z ] = ZM,
- [BEQ ] = ABS,
- [ROL ] = IMM,
- [RLB ] = IMPL,
- [ROL_AB ] = ABS,
- [STY_IN ] = IND,
- [ROL_Z ] = ZM,
- [SEC ] = IMPL,
- [LDA_ZX ] = ZMX,
- [TBA ] = IMPL,
- [CMP_IY ] = INDY,
- [CMP_IX ] = INDX,
- [BNE_Z ] = ZM,
- [BNE ] = ABS,
- [ROR ] = IMM,
- [RRB ] = IMPL,
- [ROR_AB ] = ABS,
- [CPY_IN ] = IND,
- [ROR_Z ] = ZM,
- [DEY ] = IMPL,
- [STA_ZX ] = ZMX,
- [TAY ] = IMPL,
- [LDB_IY ] = INDY,
- [LDB_IX ] = INDX,
- [BVS_Z ] = ZM,
- [BVS ] = ABS,
- [MUL ] = IMM,
- [MAB ] = IMPL,
- [MUL_AB ] = ABS,
- [LDX_IN ] = IND,
- [MUL_Z ] = ZM,
- [CLI ] = IMPL,
- [LDB_ZX ] = ZMX,
- [TYA ] = IMPL,
- [STB_IY ] = INDY,
- [STB_IX ] = INDX,
- [BVC_Z ] = ZM,
- [BVC ] = ABS,
- [DIV ] = IMM,
- [DAB ] = IMPL,
- [DIV_AB ] = ABS,
- [STX_IN ] = IND,
- [DIV_Z ] = ZM,
- [INY ] = IMPL,
- [STB_ZX ] = ZMX,
- [TAX ] = IMPL,
- [CPB_IY ] = INDY,
- [CPB_IX ] = INDX,
- [RTS ] = IMPL,
- [CMP ] = IMM,
- [CAB ] = IMPL,
- [CMP_AB ] = ABS,
- [CPX_IN ] = IND,
- [CMP_Z ] = ZM,
- [SEI ] = IMPL,
- [LDX ] = IMM,
- [TXA ] = IMPL,
- [LDX_AB ] = ABS,
- [LDX_Z ] = ZM,
- [JSR_IN ] = IND,
- [RTI ] = IMPL,
- [LDA ] = IMM,
- [LDA_AB ] = ABS,
- [DEX ] = IMPL,
- [LDA_Z ] = ZM,
- [CLV ] = IMPL,
- [LDX_ZY ] = ZMY,
- [TYX ] = IMPL,
- [STA ] = ABS,
- [STA_Z ] = ZM,
- [JMP_IN ] = IND,
- [TSX ] = IMPL,
- [LDB ] = IMM,
- [LDB_AB ] = ABS,
- [INX ] = IMPL,
- [LDB_Z ] = ZM,
- [WAI ] = IMPL,
- [STX_ZY ] = ZMY,
- [TXY ] = IMPL,
- [STB ] = ABS,
- [STB_Z ] = ZM,
- [TXS ] = IMM,
- [LDY ] = IMM,
- [LDY_AB ] = ABS,
- [DEC ] = IMPL,
- [LDY_Z ] = ZM,
- [BRK ] = IMPL,
- [LDY_ZX ] = ZMX,
- [NOP ] = IMPL,
- [STY ] = ABS,
- [STY_Z ] = ZM,
- [DEB ] = IMPL,
- [ASR ] = IMM,
- [ARB ] = IMPL,
- [ASR_AB ] = ABS,
- [INC ] = IMPL,
- [ASR_Z ] = ZM,
- [STY_ZX ] = ZMX,
- [STX ] = ABS,
- [STX_Z ] = ZM,
- [INB ] = IMPL
+ [CPS_IMP ] = IMPL,
+ [ADC_IMM ] = IMM,
+ [AAB_IMP ] = IMPL,
+ [ADC_AB ] = ABS,
+ [LDA_IN ] = IND,
+ [ADC_Z ] = ZM,
+ [CLC_IMP ] = IMPL,
+ [DEX_IMP ] = IMPL,
+ [DEC_IMP ] = IMPL,
+ [DEC_AB ] = ABS,
+ [DEC_Z ] = ZM,
+ [JMP_AB ] = ABS,
+ [SBC_IMM ] = IMM,
+ [SAB_IMP ] = IMPL,
+ [SBC_AB ] = ABS,
+ [STA_IN ] = IND,
+ [SBC_Z ] = ZM,
+ [SEC_IMP ] = IMPL,
+ [INX_IMP ] = IMPL,
+ [INC_IMP ] = IMPL,
+ [INC_AB ] = ABS,
+ [INC_Z ] = ZM,
+ [JSR_AB ] = ABS,
+ [AND_IMM ] = IMM,
+ [ABA_IMP ] = IMPL,
+ [AND_AB ] = ABS,
+ [CMP_IN ] = IND,
+ [AND_Z ] = ZM,
+ [CLI_IMP ] = IMPL,
+ [DEY_IMP ] = IMPL,
+ [CPB_IMM ] = IMM,
+ [CPB_AB ] = ABS,
+ [CPB_Z ] = ZM,
+ [JMP_Z ] = ZM,
+ [ORA_IMM ] = IMM,
+ [OAB_IMP ] = IMPL,
+ [ORA_AB ] = ABS,
+ [LDB_IN ] = IND,
+ [ORA_Z ] = ZM,
+ [SEI_IMP ] = IMPL,
+ [INY_IMP ] = IMPL,
+ [CPX_IMM ] = IMM,
+ [CPX_AB ] = ABS,
+ [CPY_Z ] = ZM,
+ [JSR_Z ] = ZM,
+ [XOR_IMM ] = IMM,
+ [XAB_IMP ] = IMPL,
+ [XOR_AB ] = ABS,
+ [STB_IN ] = IND,
+ [XOR_Z ] = ZM,
+ [CLV_IMP ] = IMPL,
+ [CPY_IMM ] = IMM,
+ [CPY_AB ] = ABS,
+ [CPX_Z ] = ZM,
+ [BPO_REL ] = REL,
+ [LSL_IMM ] = IMM,
+ [LLB_IMP ] = IMPL,
+ [LSL_AB ] = ABS,
+ [CPB_IN ] = IND,
+ [LSL_Z ] = ZM,
+ [WAI_IMP ] = IMPL,
+ [PHP_IMP ] = IMPL,
+ [TAB_IMP ] = IMPL,
+ [LDA_IY ] = INDY,
+ [LDA_IX ] = INDX,
+ [BNG_REL ] = REL,
+ [LSR_IMM ] = IMM,
+ [LRB_IMP ] = IMPL,
+ [LSR_AB ] = ABS,
+ [LDY_IN ] = IND,
+ [LSR_Z ] = ZM,
+ [BRK_IMP ] = IMPL,
+ [PLP_IMP ] = IMPL,
+ [TBA_IMP ] = IMPL,
+ [STA_IY ] = INDY,
+ [STA_IX ] = INDX,
+ [BCS_REL ] = REL,
+ [ROL_IMM ] = IMM,
+ [RLB_IMP ] = IMPL,
+ [ROL_AB ] = ABS,
+ [STY_IN ] = IND,
+ [ROL_Z ] = ZM,
+ [LDA_ZY ] = ZMY,
+ [PHA_IMP ] = IMPL,
+ [TAY_IMP ] = IMPL,
+ [CMP_IY ] = INDY,
+ [CMP_IX ] = INDX,
+ [BCC_REL ] = REL,
+ [ROR_IMM ] = IMM,
+ [RRB_IMP ] = IMPL,
+ [ROR_AB ] = ABS,
+ [LDX_IN ] = IND,
+ [ROR_Z ] = ZM,
+ [STA_ZY ] = ZMY,
+ [PLA_IMP ] = IMPL,
+ [TYA_IMP ] = IMPL,
+ [LDB_IY ] = INDY,
+ [LDB_IX ] = INDX,
+ [BEQ_REL ] = REL,
+ [MUL_IMM ] = IMM,
+ [MAB_IMP ] = IMPL,
+ [MUL_AB ] = ABS,
+ [STX_IN ] = IND,
+ [MUL_Z ] = ZM,
+ [LDB_ZY ] = ZMY,
+ [PHB_IMP ] = IMPL,
+ [TAX_IMP ] = IMPL,
+ [STB_IY ] = INDY,
+ [STB_IX ] = INDX,
+ [BNE_REL ] = REL,
+ [DIV_IMM ] = IMM,
+ [DAB_IMP ] = IMPL,
+ [DIV_AB ] = ABS,
+ [JSR_IN ] = IND,
+ [DIV_Z ] = ZM,
+ [STB_ZY ] = ZMY,
+ [PLB_IMP ] = IMPL,
+ [TXA_IMP ] = IMPL,
+ [CPB_IY ] = INDY,
+ [CPB_IX ] = INDX,
+ [BVS_REL ] = REL,
+ [CMP_IMM ] = IMM,
+ [CAB_IMP ] = IMPL,
+ [CMP_AB ] = ABS,
+ [JMP_IN ] = IND,
+ [CMP_Z ] = ZM,
+ [LDA_ZX ] = ZMX,
+ [LDX_IMM ] = IMM,
+ [TYX_IMP ] = IMPL,
+ [LDX_AB ] = ABS,
+ [LDX_Z ] = ZM,
+ [BVC_REL ] = REL,
+ [LDA_IMM ] = IMM,
+ [DEB_IMP ] = IMPL,
+ [LDA_AB ] = ABS,
+ [LDA_Z ] = ZM,
+ [STA_ZX ] = ZMX,
+ [PHY_IMP ] = IMPL,
+ [TXY_IMP ] = IMPL,
+ [STA_AB ] = ABS,
+ [STA_Z ] = ZM,
+ [BRA_REL ] = REL,
+ [LDB_IMM ] = IMM,
+ [INB_IMP ] = IMPL,
+ [LDB_AB ] = ABS,
+ [LDB_Z ] = ZM,
+ [LDB_ZX ] = ZMX,
+ [PLY_IMP ] = IMPL,
+ [TSX_IMP ] = IMPL,
+ [STB_AB ] = ABS,
+ [STB_Z ] = ZM,
+ [RTS_IMP ] = IMPL,
+ [LDY_IMM ] = IMM,
+ [LDY_AB ] = ABS,
+ [LDY_Z ] = ZM,
+ [STB_ZX ] = ZMX,
+ [PHX_IMP ] = IMPL,
+ [NOP_IMP ] = IMPL,
+ [STY_AB ] = ABS,
+ [STY_Z ] = ZM,
+ [RTI_IMP ] = IMPL,
+ [ASR_IMM ] = IMM,
+ [ARB_IMP ] = IMPL,
+ [ASR_AB ] = ABS,
+ [ASR_Z ] = ZM,
+ [PLX_IMP ] = IMPL,
+ [TXS_IMM ] = IMM,
+ [STX_AB ] = ABS,
+ [STX_Z ] = ZM
};