|
|
|
@ -4,8 +4,8 @@ class InstructionError(msg: String) : RuntimeException(msg)
|
|
|
|
|
|
|
|
|
|
interface ICpu {
|
|
|
|
|
fun disassemble(memory: Array<UByte>, baseAddress: Address, from: Address, to: Address): List<String>
|
|
|
|
|
fun disassemble(component: MemMappedComponent, from: Address, to: Address) =
|
|
|
|
|
disassemble(component.cloneMem(), component.startAddress, from, to)
|
|
|
|
|
fun disassemble(component: MemoryComponent, from: Address, to: Address) =
|
|
|
|
|
disassemble(component.cloneContents(), component.startAddress, from, to)
|
|
|
|
|
|
|
|
|
|
fun clock()
|
|
|
|
|
fun reset()
|
|
|
|
@ -16,6 +16,7 @@ interface ICpu {
|
|
|
|
|
val totalCycles: Long
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// TODO: implement the illegal opcodes, see http://www.ffd2.com/fridge/docs/6502-NMOS.extra.opcodes
|
|
|
|
|
// TODO: add the optional additional cycles to certain instructions and addressing modes
|
|
|
|
|
// TODO: add IRQ and NMI signaling.
|
|
|
|
|
// TODO: make a 65c02 variant as well (and re-enable the unit tests for that).
|
|
|
|
@ -68,7 +69,7 @@ class Cpu6502(private val stopOnBrk: Boolean) : BusComponent(), ICpu {
|
|
|
|
|
IzY
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
class Instruction(val opcode: UByte, val mnemonic: String, val mode: AddrMode, val cycles: Int, val official: Boolean, val execute: () -> Unit) {
|
|
|
|
|
class Instruction(val opcode: UByte, val mnemonic: String, val mode: AddrMode, val cycles: Int, val execute: () -> Unit) {
|
|
|
|
|
override fun toString(): String {
|
|
|
|
|
return "[${hexB(opcode)}: $mnemonic $mode]"
|
|
|
|
|
}
|
|
|
|
@ -331,12 +332,12 @@ class Cpu6502(private val stopOnBrk: Boolean) : BusComponent(), ICpu {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private fun amZpx() {
|
|
|
|
|
// note: zeropage index will not leave Zp when page boundray is crossed
|
|
|
|
|
// note: zeropage index will not leave Zp when page boundary is crossed
|
|
|
|
|
fetchedAddress = (readPc() + X) and 0xff
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private fun amZpy() {
|
|
|
|
|
// note: zeropage index will not leave Zp when page boundray is crossed
|
|
|
|
|
// note: zeropage index will not leave Zp when page boundary is crossed
|
|
|
|
|
fetchedAddress = (readPc() + Y) and 0xff
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -420,17 +421,17 @@ class Cpu6502(private val stopOnBrk: Boolean) : BusComponent(), ICpu {
|
|
|
|
|
pushStack(status.asByte().toInt())
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
internal fun pushStack(data: Int) {
|
|
|
|
|
private fun pushStack(data: Int) {
|
|
|
|
|
write(SP or 0x0100, data)
|
|
|
|
|
SP = (SP - 1) and 0xff
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
internal fun popStack(): Int {
|
|
|
|
|
private fun popStack(): Int {
|
|
|
|
|
SP = (SP + 1) and 0xff
|
|
|
|
|
return read(SP or 0x0100)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
internal fun popStackAddr(): Address {
|
|
|
|
|
private fun popStackAddr(): Address {
|
|
|
|
|
val lo = popStack()
|
|
|
|
|
val hi = popStack()
|
|
|
|
|
return lo or (hi shl 8)
|
|
|
|
@ -442,262 +443,262 @@ class Cpu6502(private val stopOnBrk: Boolean) : BusComponent(), ICpu {
|
|
|
|
|
|
|
|
|
|
// opcodes table from http://www.oxyron.de/html/opcodes02.html
|
|
|
|
|
private val opcodes = listOf(
|
|
|
|
|
Instruction(0x00, "brk", AddrMode.Imp, 7, true, ::iBrk),
|
|
|
|
|
Instruction(0x01, "ora", AddrMode.IzX, 6, true, ::iOra),
|
|
|
|
|
Instruction(0x02, "???", AddrMode.Imp, 0, false, ::iInvalid),
|
|
|
|
|
Instruction(0x03, "slo", AddrMode.IzX, 8, false, ::iSlo),
|
|
|
|
|
Instruction(0x04, "nop", AddrMode.Zp, 3, false, ::iNop),
|
|
|
|
|
Instruction(0x05, "ora", AddrMode.Zp, 3, true, ::iOra),
|
|
|
|
|
Instruction(0x06, "asl", AddrMode.Zp, 5, true, ::iAsl),
|
|
|
|
|
Instruction(0x07, "slo", AddrMode.Zp, 5, false, ::iSlo),
|
|
|
|
|
Instruction(0x08, "php", AddrMode.Imp, 3, true, ::iPhp),
|
|
|
|
|
Instruction(0x09, "ora", AddrMode.Imm, 2, true, ::iOra),
|
|
|
|
|
Instruction(0x0a, "asl", AddrMode.Acc, 2, true, ::iAsl),
|
|
|
|
|
Instruction(0x0b, "anc", AddrMode.Imm, 2, false, ::iAnc),
|
|
|
|
|
Instruction(0x0c, "nop", AddrMode.Abs, 4, false, ::iNop),
|
|
|
|
|
Instruction(0x0d, "ora", AddrMode.Abs, 4, true, ::iOra),
|
|
|
|
|
Instruction(0x0e, "asl", AddrMode.Abs, 6, true, ::iAsl),
|
|
|
|
|
Instruction(0x0f, "slo", AddrMode.Abs, 6, false, ::iSlo),
|
|
|
|
|
Instruction(0x10, "bpl", AddrMode.Rel, 2, true, ::iBpl),
|
|
|
|
|
Instruction(0x11, "ora", AddrMode.IzY, 5, true, ::iOra),
|
|
|
|
|
Instruction(0x12, "???", AddrMode.Imp, 0, false, ::iInvalid),
|
|
|
|
|
Instruction(0x13, "slo", AddrMode.IzY, 6, false, ::iSlo),
|
|
|
|
|
Instruction(0x14, "nop", AddrMode.ZpX, 4, false, ::iNop),
|
|
|
|
|
Instruction(0x15, "ora", AddrMode.ZpX, 4, true, ::iOra),
|
|
|
|
|
Instruction(0x16, "asl", AddrMode.ZpX, 6, true, ::iAsl),
|
|
|
|
|
Instruction(0x17, "slo", AddrMode.ZpX, 6, false, ::iSlo),
|
|
|
|
|
Instruction(0x18, "clc", AddrMode.Imp, 2, true, ::iClc),
|
|
|
|
|
Instruction(0x19, "ora", AddrMode.AbsY, 4, true, ::iOra),
|
|
|
|
|
Instruction(0x1a, "nop", AddrMode.Imp, 2, false, ::iNop),
|
|
|
|
|
Instruction(0x1b, "slo", AddrMode.AbsY, 7, false, ::iSlo),
|
|
|
|
|
Instruction(0x1c, "nop", AddrMode.AbsX, 4, false, ::iNop),
|
|
|
|
|
Instruction(0x1d, "ora", AddrMode.AbsX, 4, true, ::iOra),
|
|
|
|
|
Instruction(0x1e, "asl", AddrMode.AbsX, 7, true, ::iAsl),
|
|
|
|
|
Instruction(0x1f, "slo", AddrMode.AbsX, 7, false, ::iSlo),
|
|
|
|
|
Instruction(0x20, "jsr", AddrMode.Abs, 6, true, ::iJsr),
|
|
|
|
|
Instruction(0x21, "and", AddrMode.IzX, 6, true, ::iAnd),
|
|
|
|
|
Instruction(0x22, "???", AddrMode.Imp, 0, false, ::iInvalid),
|
|
|
|
|
Instruction(0x23, "rla", AddrMode.IzX, 8, false, ::iRla),
|
|
|
|
|
Instruction(0x24, "bit", AddrMode.Zp, 3, true, ::iBit),
|
|
|
|
|
Instruction(0x25, "and", AddrMode.Zp, 3, true, ::iAnd),
|
|
|
|
|
Instruction(0x26, "rol", AddrMode.Zp, 5, true, ::iRol),
|
|
|
|
|
Instruction(0x27, "rla", AddrMode.Zp, 5, false, ::iRla),
|
|
|
|
|
Instruction(0x28, "plp", AddrMode.Imp, 4, true, ::iPlp),
|
|
|
|
|
Instruction(0x29, "and", AddrMode.Imm, 2, true, ::iAnd),
|
|
|
|
|
Instruction(0x2a, "rol", AddrMode.Acc, 2, true, ::iRol),
|
|
|
|
|
Instruction(0x2b, "anc", AddrMode.Imm, 2, false, ::iAnc),
|
|
|
|
|
Instruction(0x2c, "bit", AddrMode.Abs, 4, true, ::iBit),
|
|
|
|
|
Instruction(0x2d, "and", AddrMode.Abs, 4, true, ::iAnd),
|
|
|
|
|
Instruction(0x2e, "rol", AddrMode.Abs, 6, true, ::iRol),
|
|
|
|
|
Instruction(0x2f, "rla", AddrMode.Abs, 6, false, ::iRla),
|
|
|
|
|
Instruction(0x30, "bmi", AddrMode.Rel, 2, true, ::iBmi),
|
|
|
|
|
Instruction(0x31, "and", AddrMode.IzY, 5, true, ::iAnd),
|
|
|
|
|
Instruction(0x32, "???", AddrMode.Imp, 0, false, ::iInvalid),
|
|
|
|
|
Instruction(0x33, "rla", AddrMode.IzY, 8, false, ::iRla),
|
|
|
|
|
Instruction(0x34, "nop", AddrMode.ZpX, 4, false, ::iNop),
|
|
|
|
|
Instruction(0x35, "and", AddrMode.ZpX, 4, true, ::iAnd),
|
|
|
|
|
Instruction(0x36, "rol", AddrMode.ZpX, 6, true, ::iRol),
|
|
|
|
|
Instruction(0x37, "rla", AddrMode.ZpX, 6, false, ::iRla),
|
|
|
|
|
Instruction(0x38, "sec", AddrMode.Imp, 2, true, ::iSec),
|
|
|
|
|
Instruction(0x39, "and", AddrMode.AbsY, 4, true, ::iAnd),
|
|
|
|
|
Instruction(0x3a, "nop", AddrMode.Imp, 2, false, ::iNop),
|
|
|
|
|
Instruction(0x3b, "rla", AddrMode.AbsY, 7, false, ::iRla),
|
|
|
|
|
Instruction(0x3c, "nop", AddrMode.AbsX, 4, false, ::iNop),
|
|
|
|
|
Instruction(0x3d, "and", AddrMode.AbsX, 4, true, ::iAnd),
|
|
|
|
|
Instruction(0x3e, "rol", AddrMode.AbsX, 7, true, ::iRol),
|
|
|
|
|
Instruction(0x3f, "rla", AddrMode.AbsX, 7, false, ::iRla),
|
|
|
|
|
Instruction(0x40, "rti", AddrMode.Imp, 6, true, ::iRti),
|
|
|
|
|
Instruction(0x41, "eor", AddrMode.IzX, 6, true, ::iEor),
|
|
|
|
|
Instruction(0x42, "???", AddrMode.Imp, 0, false, ::iInvalid),
|
|
|
|
|
Instruction(0x43, "sre", AddrMode.IzX, 8, false, ::iSre),
|
|
|
|
|
Instruction(0x44, "nop", AddrMode.Zp, 3, false, ::iNop),
|
|
|
|
|
Instruction(0x45, "eor", AddrMode.Zp, 3, true, ::iEor),
|
|
|
|
|
Instruction(0x46, "lsr", AddrMode.Zp, 5, true, ::iLsr),
|
|
|
|
|
Instruction(0x47, "sre", AddrMode.Zp, 5, false, ::iSre),
|
|
|
|
|
Instruction(0x48, "pha", AddrMode.Imp, 3, true, ::iPha),
|
|
|
|
|
Instruction(0x49, "eor", AddrMode.Imm, 2, true, ::iEor),
|
|
|
|
|
Instruction(0x4a, "lsr", AddrMode.Acc, 2, true, ::iLsr),
|
|
|
|
|
Instruction(0x4b, "alr", AddrMode.Imm, 2, false, ::iAlr),
|
|
|
|
|
Instruction(0x4c, "jmp", AddrMode.Abs, 3, true, ::iJmp),
|
|
|
|
|
Instruction(0x4d, "eor", AddrMode.Abs, 4, true, ::iEor),
|
|
|
|
|
Instruction(0x4e, "lsr", AddrMode.Abs, 6, true, ::iLsr),
|
|
|
|
|
Instruction(0x4f, "sre", AddrMode.Abs, 6, false, ::iSre),
|
|
|
|
|
Instruction(0x50, "bvc", AddrMode.Rel, 2, true, ::iBvc),
|
|
|
|
|
Instruction(0x51, "eor", AddrMode.IzY, 5, true, ::iEor),
|
|
|
|
|
Instruction(0x52, "???", AddrMode.Imp, 0, false, ::iInvalid),
|
|
|
|
|
Instruction(0x53, "sre", AddrMode.IzY, 8, false, ::iSre),
|
|
|
|
|
Instruction(0x54, "nop", AddrMode.ZpX, 4, false, ::iNop),
|
|
|
|
|
Instruction(0x55, "eor", AddrMode.ZpX, 4, true, ::iEor),
|
|
|
|
|
Instruction(0x56, "lsr", AddrMode.ZpX, 6, true, ::iLsr),
|
|
|
|
|
Instruction(0x57, "sre", AddrMode.ZpX, 6, false, ::iSre),
|
|
|
|
|
Instruction(0x58, "cli", AddrMode.Imp, 2, true, ::iCli),
|
|
|
|
|
Instruction(0x59, "eor", AddrMode.AbsY, 4, true, ::iEor),
|
|
|
|
|
Instruction(0x5a, "nop", AddrMode.Imp, 2, false, ::iNop),
|
|
|
|
|
Instruction(0x5b, "sre", AddrMode.AbsY, 7, false, ::iSre),
|
|
|
|
|
Instruction(0x5c, "nop", AddrMode.AbsX, 4, false, ::iNop),
|
|
|
|
|
Instruction(0x5d, "eor", AddrMode.AbsX, 4, true, ::iEor),
|
|
|
|
|
Instruction(0x5e, "lsr", AddrMode.AbsX, 7, true, ::iLsr),
|
|
|
|
|
Instruction(0x5f, "sre", AddrMode.AbsX, 7, false, ::iSre),
|
|
|
|
|
Instruction(0x60, "rts", AddrMode.Imp, 6, true, ::iRts),
|
|
|
|
|
Instruction(0x61, "adc", AddrMode.IzX, 6, true, ::iAdc),
|
|
|
|
|
Instruction(0x62, "???", AddrMode.Imp, 0, false, ::iInvalid),
|
|
|
|
|
Instruction(0x63, "rra", AddrMode.IzX, 8, false, ::iRra),
|
|
|
|
|
Instruction(0x64, "nop", AddrMode.Zp, 3, false, ::iNop),
|
|
|
|
|
Instruction(0x65, "adc", AddrMode.Zp, 3, true, ::iAdc),
|
|
|
|
|
Instruction(0x66, "ror", AddrMode.Zp, 5, true, ::iRor),
|
|
|
|
|
Instruction(0x67, "rra", AddrMode.Zp, 5, false, ::iRra),
|
|
|
|
|
Instruction(0x68, "pla", AddrMode.Imp, 4, true, ::iPla),
|
|
|
|
|
Instruction(0x69, "adc", AddrMode.Imm, 2, true, ::iAdc),
|
|
|
|
|
Instruction(0x6a, "ror", AddrMode.Acc, 2, true, ::iRor),
|
|
|
|
|
Instruction(0x6b, "arr", AddrMode.Imm, 2, false, ::iArr),
|
|
|
|
|
Instruction(0x6c, "jmp", AddrMode.Ind, 5, true, ::iJmp),
|
|
|
|
|
Instruction(0x6d, "adc", AddrMode.Abs, 4, true, ::iAdc),
|
|
|
|
|
Instruction(0x6e, "ror", AddrMode.Abs, 6, true, ::iRor),
|
|
|
|
|
Instruction(0x6f, "rra", AddrMode.Abs, 6, false, ::iRra),
|
|
|
|
|
Instruction(0x70, "bvs", AddrMode.Rel, 2, true, ::iBvs),
|
|
|
|
|
Instruction(0x71, "adc", AddrMode.IzY, 5, true, ::iAdc),
|
|
|
|
|
Instruction(0x72, "???", AddrMode.Imp, 0, false, ::iInvalid),
|
|
|
|
|
Instruction(0x73, "rra", AddrMode.IzY, 8, false, ::iRra),
|
|
|
|
|
Instruction(0x74, "nop", AddrMode.ZpX, 4, false, ::iNop),
|
|
|
|
|
Instruction(0x75, "adc", AddrMode.ZpX, 4, true, ::iAdc),
|
|
|
|
|
Instruction(0x76, "ror", AddrMode.ZpX, 6, true, ::iRor),
|
|
|
|
|
Instruction(0x77, "rra", AddrMode.ZpX, 6, false, ::iRra),
|
|
|
|
|
Instruction(0x78, "sei", AddrMode.Imp, 2, true, ::iSei),
|
|
|
|
|
Instruction(0x79, "adc", AddrMode.AbsY, 4, true, ::iAdc),
|
|
|
|
|
Instruction(0x7a, "nop", AddrMode.Imp, 2, false, ::iNop),
|
|
|
|
|
Instruction(0x7b, "rra", AddrMode.AbsY, 7, false, ::iRra),
|
|
|
|
|
Instruction(0x7c, "nop", AddrMode.AbsX, 4, false, ::iNop),
|
|
|
|
|
Instruction(0x7d, "adc", AddrMode.AbsX, 4, true, ::iAdc),
|
|
|
|
|
Instruction(0x7e, "ror", AddrMode.AbsX, 7, true, ::iRor),
|
|
|
|
|
Instruction(0x7f, "rra", AddrMode.AbsX, 7, false, ::iRra),
|
|
|
|
|
Instruction(0x80, "nop", AddrMode.Imm, 2, false, ::iNop),
|
|
|
|
|
Instruction(0x81, "sta", AddrMode.IzX, 6, true, ::iSta),
|
|
|
|
|
Instruction(0x82, "nop", AddrMode.Imm, 2, false, ::iNop),
|
|
|
|
|
Instruction(0x83, "sax", AddrMode.IzX, 6, false, ::iSax),
|
|
|
|
|
Instruction(0x84, "sty", AddrMode.Zp, 3, true, ::iSty),
|
|
|
|
|
Instruction(0x85, "sta", AddrMode.Zp, 3, true, ::iSta),
|
|
|
|
|
Instruction(0x86, "stx", AddrMode.Zp, 3, true, ::iStx),
|
|
|
|
|
Instruction(0x87, "sax", AddrMode.Zp, 3, false, ::iSax),
|
|
|
|
|
Instruction(0x88, "dey", AddrMode.Imp, 2, true, ::iDey),
|
|
|
|
|
Instruction(0x89, "nop", AddrMode.Imm, 2, false, ::iNop),
|
|
|
|
|
Instruction(0x8a, "txa", AddrMode.Imp, 2, true, ::iTxa),
|
|
|
|
|
Instruction(0x8b, "xaa", AddrMode.Imm, 2, false, ::iXaa),
|
|
|
|
|
Instruction(0x8c, "sty", AddrMode.Abs, 4, true, ::iSty),
|
|
|
|
|
Instruction(0x8d, "sta", AddrMode.Abs, 4, true, ::iSta),
|
|
|
|
|
Instruction(0x8e, "stx", AddrMode.Abs, 4, true, ::iStx),
|
|
|
|
|
Instruction(0x8f, "sax", AddrMode.Abs, 4, true, ::iSax),
|
|
|
|
|
Instruction(0x90, "bcc", AddrMode.Rel, 2, true, ::iBcc),
|
|
|
|
|
Instruction(0x91, "sta", AddrMode.IzY, 6, true, ::iSta),
|
|
|
|
|
Instruction(0x92, "???", AddrMode.Imp, 0, false, ::iInvalid),
|
|
|
|
|
Instruction(0x93, "ahx", AddrMode.IzY, 6, false, ::iAhx),
|
|
|
|
|
Instruction(0x94, "sty", AddrMode.ZpX, 4, true, ::iSty),
|
|
|
|
|
Instruction(0x95, "sta", AddrMode.ZpX, 4, true, ::iSta),
|
|
|
|
|
Instruction(0x96, "stx", AddrMode.ZpY, 4, true, ::iStx),
|
|
|
|
|
Instruction(0x97, "sax", AddrMode.ZpY, 4, false, ::iSax),
|
|
|
|
|
Instruction(0x98, "tya", AddrMode.Imp, 2, true, ::iTya),
|
|
|
|
|
Instruction(0x99, "sta", AddrMode.AbsY, 5, true, ::iSta),
|
|
|
|
|
Instruction(0x9a, "txs", AddrMode.Imp, 2, true, ::iTxs),
|
|
|
|
|
Instruction(0x9b, "tas", AddrMode.AbsY, 5, false, ::iTas),
|
|
|
|
|
Instruction(0x9c, "shy", AddrMode.AbsX, 5, false, ::iShy),
|
|
|
|
|
Instruction(0x9d, "sta", AddrMode.AbsX, 5, true, ::iSta),
|
|
|
|
|
Instruction(0x9e, "shx", AddrMode.AbsY, 5, false, ::iShx),
|
|
|
|
|
Instruction(0x9f, "ahx", AddrMode.AbsY, 5, false, ::iAhx),
|
|
|
|
|
Instruction(0xa0, "ldy", AddrMode.Imm, 2, true, ::iLdy),
|
|
|
|
|
Instruction(0xa1, "lda", AddrMode.IzX, 6, true, ::iLda),
|
|
|
|
|
Instruction(0xa2, "ldx", AddrMode.Imm, 2, true, ::iLdx),
|
|
|
|
|
Instruction(0xa3, "lax", AddrMode.IzX, 6, false, ::iLax),
|
|
|
|
|
Instruction(0xa4, "ldy", AddrMode.Zp, 3, true, ::iLdy),
|
|
|
|
|
Instruction(0xa5, "lda", AddrMode.Zp, 3, true, ::iLda),
|
|
|
|
|
Instruction(0xa6, "ldx", AddrMode.Zp, 3, true, ::iLdx),
|
|
|
|
|
Instruction(0xa7, "lax", AddrMode.Zp, 3, false, ::iLax),
|
|
|
|
|
Instruction(0xa8, "tay", AddrMode.Imp, 2, true, ::iTay),
|
|
|
|
|
Instruction(0xa9, "lda", AddrMode.Imm, 2, true, ::iLda),
|
|
|
|
|
Instruction(0xaa, "tax", AddrMode.Imp, 2, true, ::iTax),
|
|
|
|
|
Instruction(0xab, "lax", AddrMode.Imm, 2, false, ::iLax),
|
|
|
|
|
Instruction(0xac, "ldy", AddrMode.Abs, 4, true, ::iLdy),
|
|
|
|
|
Instruction(0xad, "lda", AddrMode.Abs, 4, true, ::iLda),
|
|
|
|
|
Instruction(0xae, "ldx", AddrMode.Abs, 4, true, ::iLdx),
|
|
|
|
|
Instruction(0xaf, "lax", AddrMode.Abs, 4, false, ::iLax),
|
|
|
|
|
Instruction(0xb0, "bcs", AddrMode.Rel, 2, true, ::iBcs),
|
|
|
|
|
Instruction(0xb1, "lda", AddrMode.IzY, 5, true, ::iLda),
|
|
|
|
|
Instruction(0xb2, "???", AddrMode.Imp, 0, false, ::iInvalid),
|
|
|
|
|
Instruction(0xb3, "lax", AddrMode.IzY, 5, false, ::iLax),
|
|
|
|
|
Instruction(0xb4, "ldy", AddrMode.ZpX, 4, true, ::iLdy),
|
|
|
|
|
Instruction(0xb5, "lda", AddrMode.ZpX, 4, true, ::iLda),
|
|
|
|
|
Instruction(0xb6, "ldx", AddrMode.ZpY, 4, true, ::iLdx),
|
|
|
|
|
Instruction(0xb7, "lax", AddrMode.ZpY, 4, false, ::iLax),
|
|
|
|
|
Instruction(0xb8, "clv", AddrMode.Imp, 2, true, ::iClv),
|
|
|
|
|
Instruction(0xb9, "lda", AddrMode.AbsY, 4, true, ::iLda),
|
|
|
|
|
Instruction(0xba, "tsx", AddrMode.Imp, 2, true, ::iTsx),
|
|
|
|
|
Instruction(0xbb, "las", AddrMode.AbsY, 4, false, ::iLas),
|
|
|
|
|
Instruction(0xbc, "ldy", AddrMode.AbsX, 4, true, ::iLdy),
|
|
|
|
|
Instruction(0xbd, "lda", AddrMode.AbsX, 4, true, ::iLda),
|
|
|
|
|
Instruction(0xbe, "ldx", AddrMode.AbsY, 4, true, ::iLdx),
|
|
|
|
|
Instruction(0xbf, "lax", AddrMode.AbsY, 4, false, ::iLax),
|
|
|
|
|
Instruction(0xc0, "cpy", AddrMode.Imm, 2, true, ::iCpy),
|
|
|
|
|
Instruction(0xc1, "cmp", AddrMode.IzX, 6, true, ::iCmp),
|
|
|
|
|
Instruction(0xc2, "nop", AddrMode.Imm, 2, false, ::iNop),
|
|
|
|
|
Instruction(0xc3, "dcp", AddrMode.IzX, 8, false, ::iDcp),
|
|
|
|
|
Instruction(0xc4, "cpy", AddrMode.Zp, 3, true, ::iCpy),
|
|
|
|
|
Instruction(0xc5, "cmp", AddrMode.Zp, 3, true, ::iCmp),
|
|
|
|
|
Instruction(0xc6, "dec", AddrMode.Zp, 5, true, ::iDec),
|
|
|
|
|
Instruction(0xc7, "dcp", AddrMode.Zp, 5, false, ::iDcp),
|
|
|
|
|
Instruction(0xc8, "iny", AddrMode.Imp, 2, true, ::iIny),
|
|
|
|
|
Instruction(0xc9, "cmp", AddrMode.Imm, 2, true, ::iCmp),
|
|
|
|
|
Instruction(0xca, "dex", AddrMode.Imp, 2, true, ::iDex),
|
|
|
|
|
Instruction(0xcb, "axs", AddrMode.Imm, 2, false, ::iAxs),
|
|
|
|
|
Instruction(0xcc, "cpy", AddrMode.Abs, 4, true, ::iCpy),
|
|
|
|
|
Instruction(0xcd, "cmp", AddrMode.Abs, 4, true, ::iCmp),
|
|
|
|
|
Instruction(0xce, "dec", AddrMode.Abs, 6, true, ::iDec),
|
|
|
|
|
Instruction(0xcf, "dcp", AddrMode.Abs, 6, false, ::iDcp),
|
|
|
|
|
Instruction(0xd0, "bne", AddrMode.Rel, 2, true, ::iBne),
|
|
|
|
|
Instruction(0xd1, "cmp", AddrMode.IzY, 5, true, ::iCmp),
|
|
|
|
|
Instruction(0xd2, "???", AddrMode.Imp, 0, false, ::iInvalid),
|
|
|
|
|
Instruction(0xd3, "dcp", AddrMode.IzY, 8, false, ::iDcp),
|
|
|
|
|
Instruction(0xd4, "nop", AddrMode.ZpX, 4, false, ::iNop),
|
|
|
|
|
Instruction(0xd5, "cmp", AddrMode.ZpX, 4, true, ::iCmp),
|
|
|
|
|
Instruction(0xd6, "dec", AddrMode.ZpX, 6, true, ::iDec),
|
|
|
|
|
Instruction(0xd7, "dcp", AddrMode.ZpX, 6, false, ::iDcp),
|
|
|
|
|
Instruction(0xd8, "cld", AddrMode.Imp, 2, true, ::iCld),
|
|
|
|
|
Instruction(0xd9, "cmp", AddrMode.AbsY, 4, true, ::iCmp),
|
|
|
|
|
Instruction(0xda, "nop", AddrMode.Imp, 2, false, ::iNop),
|
|
|
|
|
Instruction(0xdb, "dcp", AddrMode.AbsY, 7, false, ::iDcp),
|
|
|
|
|
Instruction(0xdc, "nop", AddrMode.AbsX, 4, false, ::iNop),
|
|
|
|
|
Instruction(0xdd, "cmp", AddrMode.AbsX, 4, true, ::iCmp),
|
|
|
|
|
Instruction(0xde, "dec", AddrMode.AbsX, 7, true, ::iDec),
|
|
|
|
|
Instruction(0xdf, "dcp", AddrMode.AbsX, 7, false, ::iDcp),
|
|
|
|
|
Instruction(0xe0, "cpx", AddrMode.Imm, 2, true, ::iCpx),
|
|
|
|
|
Instruction(0xe1, "sbc", AddrMode.IzX, 6, true, ::iSbc),
|
|
|
|
|
Instruction(0xe2, "nop", AddrMode.Imm, 2, false, ::iNop),
|
|
|
|
|
Instruction(0xe3, "isc", AddrMode.IzX, 8, false, ::iIsc),
|
|
|
|
|
Instruction(0xe4, "cpx", AddrMode.Zp, 3, true, ::iCpx),
|
|
|
|
|
Instruction(0xe5, "sbc", AddrMode.Zp, 3, true, ::iSbc),
|
|
|
|
|
Instruction(0xe6, "inc", AddrMode.Zp, 5, true, ::iInc),
|
|
|
|
|
Instruction(0xe7, "isc", AddrMode.Zp, 5, false, ::iIsc),
|
|
|
|
|
Instruction(0xe8, "inx", AddrMode.Imp, 2, true, ::iInx),
|
|
|
|
|
Instruction(0xe9, "sbc", AddrMode.Imm, 2, true, ::iSbc),
|
|
|
|
|
Instruction(0xea, "nop", AddrMode.Imp, 2, true, ::iNop),
|
|
|
|
|
Instruction(0xeb, "sbc", AddrMode.Imm, 2, false, ::iSbc),
|
|
|
|
|
Instruction(0xec, "cpx", AddrMode.Abs, 4, true, ::iCpx),
|
|
|
|
|
Instruction(0xed, "sbc", AddrMode.Abs, 4, true, ::iSbc),
|
|
|
|
|
Instruction(0xee, "inc", AddrMode.Abs, 6, true, ::iInc),
|
|
|
|
|
Instruction(0xef, "isc", AddrMode.Abs, 6, true, ::iIsc),
|
|
|
|
|
Instruction(0xf0, "beq", AddrMode.Rel, 2, true, ::iBeq),
|
|
|
|
|
Instruction(0xf1, "sbc", AddrMode.IzY, 5, true, ::iSbc),
|
|
|
|
|
Instruction(0xf2, "???", AddrMode.Imp, 0, false, ::iInvalid),
|
|
|
|
|
Instruction(0xf3, "isc", AddrMode.IzY, 8, false, ::iIsc),
|
|
|
|
|
Instruction(0xf4, "nop", AddrMode.ZpX, 4, false, ::iNop),
|
|
|
|
|
Instruction(0xf5, "sbc", AddrMode.ZpX, 4, true, ::iSbc),
|
|
|
|
|
Instruction(0xf6, "inc", AddrMode.ZpX, 6, true, ::iInc),
|
|
|
|
|
Instruction(0xf7, "isc", AddrMode.ZpX, 6, false, ::iIsc),
|
|
|
|
|
Instruction(0xf8, "sed", AddrMode.Imp, 2, true, ::iSed),
|
|
|
|
|
Instruction(0xf9, "sbc", AddrMode.AbsY, 4, true, ::iSbc),
|
|
|
|
|
Instruction(0xfa, "nop", AddrMode.Imp, 2, false, ::iNop),
|
|
|
|
|
Instruction(0xfb, "isc", AddrMode.AbsY, 7, false, ::iIsc),
|
|
|
|
|
Instruction(0xfc, "nop", AddrMode.AbsX, 4, false, ::iNop),
|
|
|
|
|
Instruction(0xfd, "sbc", AddrMode.AbsX, 4, true, ::iSbc),
|
|
|
|
|
Instruction(0xfe, "inc", AddrMode.AbsX, 7, true, ::iInc),
|
|
|
|
|
Instruction(0xff, "isc", AddrMode.AbsX, 7, false, ::iIsc)
|
|
|
|
|
Instruction(0x00, "brk", AddrMode.Imp, 7, ::iBrk),
|
|
|
|
|
Instruction(0x01, "ora", AddrMode.IzX, 6, ::iOra),
|
|
|
|
|
Instruction(0x02, "???", AddrMode.Imp, 0, ::iInvalid),
|
|
|
|
|
Instruction(0x03, "slo", AddrMode.IzX, 8, ::iSlo),
|
|
|
|
|
Instruction(0x04, "nop", AddrMode.Zp, 3, ::iNop),
|
|
|
|
|
Instruction(0x05, "ora", AddrMode.Zp, 3, ::iOra),
|
|
|
|
|
Instruction(0x06, "asl", AddrMode.Zp, 5, ::iAsl),
|
|
|
|
|
Instruction(0x07, "slo", AddrMode.Zp, 5, ::iSlo),
|
|
|
|
|
Instruction(0x08, "php", AddrMode.Imp, 3, ::iPhp),
|
|
|
|
|
Instruction(0x09, "ora", AddrMode.Imm, 2, ::iOra),
|
|
|
|
|
Instruction(0x0a, "asl", AddrMode.Acc, 2, ::iAsl),
|
|
|
|
|
Instruction(0x0b, "anc", AddrMode.Imm, 2, ::iAnc),
|
|
|
|
|
Instruction(0x0c, "nop", AddrMode.Abs, 4, ::iNop),
|
|
|
|
|
Instruction(0x0d, "ora", AddrMode.Abs, 4, ::iOra),
|
|
|
|
|
Instruction(0x0e, "asl", AddrMode.Abs, 6, ::iAsl),
|
|
|
|
|
Instruction(0x0f, "slo", AddrMode.Abs, 6, ::iSlo),
|
|
|
|
|
Instruction(0x10, "bpl", AddrMode.Rel, 2, ::iBpl),
|
|
|
|
|
Instruction(0x11, "ora", AddrMode.IzY, 5, ::iOra),
|
|
|
|
|
Instruction(0x12, "???", AddrMode.Imp, 0, ::iInvalid),
|
|
|
|
|
Instruction(0x13, "slo", AddrMode.IzY, 6, ::iSlo),
|
|
|
|
|
Instruction(0x14, "nop", AddrMode.ZpX, 4, ::iNop),
|
|
|
|
|
Instruction(0x15, "ora", AddrMode.ZpX, 4, ::iOra),
|
|
|
|
|
Instruction(0x16, "asl", AddrMode.ZpX, 6, ::iAsl),
|
|
|
|
|
Instruction(0x17, "slo", AddrMode.ZpX, 6, ::iSlo),
|
|
|
|
|
Instruction(0x18, "clc", AddrMode.Imp, 2, ::iClc),
|
|
|
|
|
Instruction(0x19, "ora", AddrMode.AbsY, 4, ::iOra),
|
|
|
|
|
Instruction(0x1a, "nop", AddrMode.Imp, 2, ::iNop),
|
|
|
|
|
Instruction(0x1b, "slo", AddrMode.AbsY, 7, ::iSlo),
|
|
|
|
|
Instruction(0x1c, "nop", AddrMode.AbsX, 4, ::iNop),
|
|
|
|
|
Instruction(0x1d, "ora", AddrMode.AbsX, 4, ::iOra),
|
|
|
|
|
Instruction(0x1e, "asl", AddrMode.AbsX, 7, ::iAsl),
|
|
|
|
|
Instruction(0x1f, "slo", AddrMode.AbsX, 7, ::iSlo),
|
|
|
|
|
Instruction(0x20, "jsr", AddrMode.Abs, 6, ::iJsr),
|
|
|
|
|
Instruction(0x21, "and", AddrMode.IzX, 6, ::iAnd),
|
|
|
|
|
Instruction(0x22, "???", AddrMode.Imp, 0, ::iInvalid),
|
|
|
|
|
Instruction(0x23, "rla", AddrMode.IzX, 8, ::iRla),
|
|
|
|
|
Instruction(0x24, "bit", AddrMode.Zp, 3, ::iBit),
|
|
|
|
|
Instruction(0x25, "and", AddrMode.Zp, 3, ::iAnd),
|
|
|
|
|
Instruction(0x26, "rol", AddrMode.Zp, 5, ::iRol),
|
|
|
|
|
Instruction(0x27, "rla", AddrMode.Zp, 5, ::iRla),
|
|
|
|
|
Instruction(0x28, "plp", AddrMode.Imp, 4, ::iPlp),
|
|
|
|
|
Instruction(0x29, "and", AddrMode.Imm, 2, ::iAnd),
|
|
|
|
|
Instruction(0x2a, "rol", AddrMode.Acc, 2, ::iRol),
|
|
|
|
|
Instruction(0x2b, "anc", AddrMode.Imm, 2, ::iAnc),
|
|
|
|
|
Instruction(0x2c, "bit", AddrMode.Abs, 4, ::iBit),
|
|
|
|
|
Instruction(0x2d, "and", AddrMode.Abs, 4, ::iAnd),
|
|
|
|
|
Instruction(0x2e, "rol", AddrMode.Abs, 6, ::iRol),
|
|
|
|
|
Instruction(0x2f, "rla", AddrMode.Abs, 6, ::iRla),
|
|
|
|
|
Instruction(0x30, "bmi", AddrMode.Rel, 2, ::iBmi),
|
|
|
|
|
Instruction(0x31, "and", AddrMode.IzY, 5, ::iAnd),
|
|
|
|
|
Instruction(0x32, "???", AddrMode.Imp, 0, ::iInvalid),
|
|
|
|
|
Instruction(0x33, "rla", AddrMode.IzY, 8, ::iRla),
|
|
|
|
|
Instruction(0x34, "nop", AddrMode.ZpX, 4, ::iNop),
|
|
|
|
|
Instruction(0x35, "and", AddrMode.ZpX, 4, ::iAnd),
|
|
|
|
|
Instruction(0x36, "rol", AddrMode.ZpX, 6, ::iRol),
|
|
|
|
|
Instruction(0x37, "rla", AddrMode.ZpX, 6, ::iRla),
|
|
|
|
|
Instruction(0x38, "sec", AddrMode.Imp, 2, ::iSec),
|
|
|
|
|
Instruction(0x39, "and", AddrMode.AbsY, 4, ::iAnd),
|
|
|
|
|
Instruction(0x3a, "nop", AddrMode.Imp, 2, ::iNop),
|
|
|
|
|
Instruction(0x3b, "rla", AddrMode.AbsY, 7, ::iRla),
|
|
|
|
|
Instruction(0x3c, "nop", AddrMode.AbsX, 4, ::iNop),
|
|
|
|
|
Instruction(0x3d, "and", AddrMode.AbsX, 4, ::iAnd),
|
|
|
|
|
Instruction(0x3e, "rol", AddrMode.AbsX, 7, ::iRol),
|
|
|
|
|
Instruction(0x3f, "rla", AddrMode.AbsX, 7, ::iRla),
|
|
|
|
|
Instruction(0x40, "rti", AddrMode.Imp, 6, ::iRti),
|
|
|
|
|
Instruction(0x41, "eor", AddrMode.IzX, 6, ::iEor),
|
|
|
|
|
Instruction(0x42, "???", AddrMode.Imp, 0, ::iInvalid),
|
|
|
|
|
Instruction(0x43, "sre", AddrMode.IzX, 8, ::iSre),
|
|
|
|
|
Instruction(0x44, "nop", AddrMode.Zp, 3, ::iNop),
|
|
|
|
|
Instruction(0x45, "eor", AddrMode.Zp, 3, ::iEor),
|
|
|
|
|
Instruction(0x46, "lsr", AddrMode.Zp, 5, ::iLsr),
|
|
|
|
|
Instruction(0x47, "sre", AddrMode.Zp, 5, ::iSre),
|
|
|
|
|
Instruction(0x48, "pha", AddrMode.Imp, 3, ::iPha),
|
|
|
|
|
Instruction(0x49, "eor", AddrMode.Imm, 2, ::iEor),
|
|
|
|
|
Instruction(0x4a, "lsr", AddrMode.Acc, 2, ::iLsr),
|
|
|
|
|
Instruction(0x4b, "alr", AddrMode.Imm, 2, ::iAlr),
|
|
|
|
|
Instruction(0x4c, "jmp", AddrMode.Abs, 3, ::iJmp),
|
|
|
|
|
Instruction(0x4d, "eor", AddrMode.Abs, 4, ::iEor),
|
|
|
|
|
Instruction(0x4e, "lsr", AddrMode.Abs, 6, ::iLsr),
|
|
|
|
|
Instruction(0x4f, "sre", AddrMode.Abs, 6, ::iSre),
|
|
|
|
|
Instruction(0x50, "bvc", AddrMode.Rel, 2, ::iBvc),
|
|
|
|
|
Instruction(0x51, "eor", AddrMode.IzY, 5, ::iEor),
|
|
|
|
|
Instruction(0x52, "???", AddrMode.Imp, 0, ::iInvalid),
|
|
|
|
|
Instruction(0x53, "sre", AddrMode.IzY, 8, ::iSre),
|
|
|
|
|
Instruction(0x54, "nop", AddrMode.ZpX, 4, ::iNop),
|
|
|
|
|
Instruction(0x55, "eor", AddrMode.ZpX, 4, ::iEor),
|
|
|
|
|
Instruction(0x56, "lsr", AddrMode.ZpX, 6, ::iLsr),
|
|
|
|
|
Instruction(0x57, "sre", AddrMode.ZpX, 6, ::iSre),
|
|
|
|
|
Instruction(0x58, "cli", AddrMode.Imp, 2, ::iCli),
|
|
|
|
|
Instruction(0x59, "eor", AddrMode.AbsY, 4, ::iEor),
|
|
|
|
|
Instruction(0x5a, "nop", AddrMode.Imp, 2, ::iNop),
|
|
|
|
|
Instruction(0x5b, "sre", AddrMode.AbsY, 7, ::iSre),
|
|
|
|
|
Instruction(0x5c, "nop", AddrMode.AbsX, 4, ::iNop),
|
|
|
|
|
Instruction(0x5d, "eor", AddrMode.AbsX, 4, ::iEor),
|
|
|
|
|
Instruction(0x5e, "lsr", AddrMode.AbsX, 7, ::iLsr),
|
|
|
|
|
Instruction(0x5f, "sre", AddrMode.AbsX, 7, ::iSre),
|
|
|
|
|
Instruction(0x60, "rts", AddrMode.Imp, 6, ::iRts),
|
|
|
|
|
Instruction(0x61, "adc", AddrMode.IzX, 6, ::iAdc),
|
|
|
|
|
Instruction(0x62, "???", AddrMode.Imp, 0, ::iInvalid),
|
|
|
|
|
Instruction(0x63, "rra", AddrMode.IzX, 8, ::iRra),
|
|
|
|
|
Instruction(0x64, "nop", AddrMode.Zp, 3, ::iNop),
|
|
|
|
|
Instruction(0x65, "adc", AddrMode.Zp, 3, ::iAdc),
|
|
|
|
|
Instruction(0x66, "ror", AddrMode.Zp, 5, ::iRor),
|
|
|
|
|
Instruction(0x67, "rra", AddrMode.Zp, 5, ::iRra),
|
|
|
|
|
Instruction(0x68, "pla", AddrMode.Imp, 4, ::iPla),
|
|
|
|
|
Instruction(0x69, "adc", AddrMode.Imm, 2, ::iAdc),
|
|
|
|
|
Instruction(0x6a, "ror", AddrMode.Acc, 2, ::iRor),
|
|
|
|
|
Instruction(0x6b, "arr", AddrMode.Imm, 2, ::iArr),
|
|
|
|
|
Instruction(0x6c, "jmp", AddrMode.Ind, 5, ::iJmp),
|
|
|
|
|
Instruction(0x6d, "adc", AddrMode.Abs, 4, ::iAdc),
|
|
|
|
|
Instruction(0x6e, "ror", AddrMode.Abs, 6, ::iRor),
|
|
|
|
|
Instruction(0x6f, "rra", AddrMode.Abs, 6, ::iRra),
|
|
|
|
|
Instruction(0x70, "bvs", AddrMode.Rel, 2, ::iBvs),
|
|
|
|
|
Instruction(0x71, "adc", AddrMode.IzY, 5, ::iAdc),
|
|
|
|
|
Instruction(0x72, "???", AddrMode.Imp, 0, ::iInvalid),
|
|
|
|
|
Instruction(0x73, "rra", AddrMode.IzY, 8, ::iRra),
|
|
|
|
|
Instruction(0x74, "nop", AddrMode.ZpX, 4, ::iNop),
|
|
|
|
|
Instruction(0x75, "adc", AddrMode.ZpX, 4, ::iAdc),
|
|
|
|
|
Instruction(0x76, "ror", AddrMode.ZpX, 6, ::iRor),
|
|
|
|
|
Instruction(0x77, "rra", AddrMode.ZpX, 6, ::iRra),
|
|
|
|
|
Instruction(0x78, "sei", AddrMode.Imp, 2, ::iSei),
|
|
|
|
|
Instruction(0x79, "adc", AddrMode.AbsY, 4, ::iAdc),
|
|
|
|
|
Instruction(0x7a, "nop", AddrMode.Imp, 2, ::iNop),
|
|
|
|
|
Instruction(0x7b, "rra", AddrMode.AbsY, 7, ::iRra),
|
|
|
|
|
Instruction(0x7c, "nop", AddrMode.AbsX, 4, ::iNop),
|
|
|
|
|
Instruction(0x7d, "adc", AddrMode.AbsX, 4, ::iAdc),
|
|
|
|
|
Instruction(0x7e, "ror", AddrMode.AbsX, 7, ::iRor),
|
|
|
|
|
Instruction(0x7f, "rra", AddrMode.AbsX, 7, ::iRra),
|
|
|
|
|
Instruction(0x80, "nop", AddrMode.Imm, 2, ::iNop),
|
|
|
|
|
Instruction(0x81, "sta", AddrMode.IzX, 6, ::iSta),
|
|
|
|
|
Instruction(0x82, "nop", AddrMode.Imm, 2, ::iNop),
|
|
|
|
|
Instruction(0x83, "sax", AddrMode.IzX, 6, ::iSax),
|
|
|
|
|
Instruction(0x84, "sty", AddrMode.Zp, 3, ::iSty),
|
|
|
|
|
Instruction(0x85, "sta", AddrMode.Zp, 3, ::iSta),
|
|
|
|
|
Instruction(0x86, "stx", AddrMode.Zp, 3, ::iStx),
|
|
|
|
|
Instruction(0x87, "sax", AddrMode.Zp, 3, ::iSax),
|
|
|
|
|
Instruction(0x88, "dey", AddrMode.Imp, 2, ::iDey),
|
|
|
|
|
Instruction(0x89, "nop", AddrMode.Imm, 2, ::iNop),
|
|
|
|
|
Instruction(0x8a, "txa", AddrMode.Imp, 2, ::iTxa),
|
|
|
|
|
Instruction(0x8b, "xaa", AddrMode.Imm, 2, ::iXaa),
|
|
|
|
|
Instruction(0x8c, "sty", AddrMode.Abs, 4, ::iSty),
|
|
|
|
|
Instruction(0x8d, "sta", AddrMode.Abs, 4, ::iSta),
|
|
|
|
|
Instruction(0x8e, "stx", AddrMode.Abs, 4, ::iStx),
|
|
|
|
|
Instruction(0x8f, "sax", AddrMode.Abs, 4, ::iSax),
|
|
|
|
|
Instruction(0x90, "bcc", AddrMode.Rel, 2, ::iBcc),
|
|
|
|
|
Instruction(0x91, "sta", AddrMode.IzY, 6, ::iSta),
|
|
|
|
|
Instruction(0x92, "???", AddrMode.Imp, 0, ::iInvalid),
|
|
|
|
|
Instruction(0x93, "ahx", AddrMode.IzY, 6, ::iAhx),
|
|
|
|
|
Instruction(0x94, "sty", AddrMode.ZpX, 4, ::iSty),
|
|
|
|
|
Instruction(0x95, "sta", AddrMode.ZpX, 4, ::iSta),
|
|
|
|
|
Instruction(0x96, "stx", AddrMode.ZpY, 4, ::iStx),
|
|
|
|
|
Instruction(0x97, "sax", AddrMode.ZpY, 4, ::iSax),
|
|
|
|
|
Instruction(0x98, "tya", AddrMode.Imp, 2, ::iTya),
|
|
|
|
|
Instruction(0x99, "sta", AddrMode.AbsY, 5, ::iSta),
|
|
|
|
|
Instruction(0x9a, "txs", AddrMode.Imp, 2, ::iTxs),
|
|
|
|
|
Instruction(0x9b, "tas", AddrMode.AbsY, 5, ::iTas),
|
|
|
|
|
Instruction(0x9c, "shy", AddrMode.AbsX, 5, ::iShy),
|
|
|
|
|
Instruction(0x9d, "sta", AddrMode.AbsX, 5, ::iSta),
|
|
|
|
|
Instruction(0x9e, "shx", AddrMode.AbsY, 5, ::iShx),
|
|
|
|
|
Instruction(0x9f, "ahx", AddrMode.AbsY, 5, ::iAhx),
|
|
|
|
|
Instruction(0xa0, "ldy", AddrMode.Imm, 2, ::iLdy),
|
|
|
|
|
Instruction(0xa1, "lda", AddrMode.IzX, 6, ::iLda),
|
|
|
|
|
Instruction(0xa2, "ldx", AddrMode.Imm, 2, ::iLdx),
|
|
|
|
|
Instruction(0xa3, "lax", AddrMode.IzX, 6, ::iLax),
|
|
|
|
|
Instruction(0xa4, "ldy", AddrMode.Zp, 3, ::iLdy),
|
|
|
|
|
Instruction(0xa5, "lda", AddrMode.Zp, 3, ::iLda),
|
|
|
|
|
Instruction(0xa6, "ldx", AddrMode.Zp, 3, ::iLdx),
|
|
|
|
|
Instruction(0xa7, "lax", AddrMode.Zp, 3, ::iLax),
|
|
|
|
|
Instruction(0xa8, "tay", AddrMode.Imp, 2, ::iTay),
|
|
|
|
|
Instruction(0xa9, "lda", AddrMode.Imm, 2, ::iLda),
|
|
|
|
|
Instruction(0xaa, "tax", AddrMode.Imp, 2, ::iTax),
|
|
|
|
|
Instruction(0xab, "lax", AddrMode.Imm, 2, ::iLax),
|
|
|
|
|
Instruction(0xac, "ldy", AddrMode.Abs, 4, ::iLdy),
|
|
|
|
|
Instruction(0xad, "lda", AddrMode.Abs, 4, ::iLda),
|
|
|
|
|
Instruction(0xae, "ldx", AddrMode.Abs, 4, ::iLdx),
|
|
|
|
|
Instruction(0xaf, "lax", AddrMode.Abs, 4, ::iLax),
|
|
|
|
|
Instruction(0xb0, "bcs", AddrMode.Rel, 2, ::iBcs),
|
|
|
|
|
Instruction(0xb1, "lda", AddrMode.IzY, 5, ::iLda),
|
|
|
|
|
Instruction(0xb2, "???", AddrMode.Imp, 0, ::iInvalid),
|
|
|
|
|
Instruction(0xb3, "lax", AddrMode.IzY, 5, ::iLax),
|
|
|
|
|
Instruction(0xb4, "ldy", AddrMode.ZpX, 4, ::iLdy),
|
|
|
|
|
Instruction(0xb5, "lda", AddrMode.ZpX, 4, ::iLda),
|
|
|
|
|
Instruction(0xb6, "ldx", AddrMode.ZpY, 4, ::iLdx),
|
|
|
|
|
Instruction(0xb7, "lax", AddrMode.ZpY, 4, ::iLax),
|
|
|
|
|
Instruction(0xb8, "clv", AddrMode.Imp, 2, ::iClv),
|
|
|
|
|
Instruction(0xb9, "lda", AddrMode.AbsY, 4, ::iLda),
|
|
|
|
|
Instruction(0xba, "tsx", AddrMode.Imp, 2, ::iTsx),
|
|
|
|
|
Instruction(0xbb, "las", AddrMode.AbsY, 4, ::iLas),
|
|
|
|
|
Instruction(0xbc, "ldy", AddrMode.AbsX, 4, ::iLdy),
|
|
|
|
|
Instruction(0xbd, "lda", AddrMode.AbsX, 4, ::iLda),
|
|
|
|
|
Instruction(0xbe, "ldx", AddrMode.AbsY, 4, ::iLdx),
|
|
|
|
|
Instruction(0xbf, "lax", AddrMode.AbsY, 4, ::iLax),
|
|
|
|
|
Instruction(0xc0, "cpy", AddrMode.Imm, 2, ::iCpy),
|
|
|
|
|
Instruction(0xc1, "cmp", AddrMode.IzX, 6, ::iCmp),
|
|
|
|
|
Instruction(0xc2, "nop", AddrMode.Imm, 2, ::iNop),
|
|
|
|
|
Instruction(0xc3, "dcp", AddrMode.IzX, 8, ::iDcp),
|
|
|
|
|
Instruction(0xc4, "cpy", AddrMode.Zp, 3, ::iCpy),
|
|
|
|
|
Instruction(0xc5, "cmp", AddrMode.Zp, 3, ::iCmp),
|
|
|
|
|
Instruction(0xc6, "dec", AddrMode.Zp, 5, ::iDec),
|
|
|
|
|
Instruction(0xc7, "dcp", AddrMode.Zp, 5, ::iDcp),
|
|
|
|
|
Instruction(0xc8, "iny", AddrMode.Imp, 2, ::iIny),
|
|
|
|
|
Instruction(0xc9, "cmp", AddrMode.Imm, 2, ::iCmp),
|
|
|
|
|
Instruction(0xca, "dex", AddrMode.Imp, 2, ::iDex),
|
|
|
|
|
Instruction(0xcb, "axs", AddrMode.Imm, 2, ::iAxs),
|
|
|
|
|
Instruction(0xcc, "cpy", AddrMode.Abs, 4, ::iCpy),
|
|
|
|
|
Instruction(0xcd, "cmp", AddrMode.Abs, 4, ::iCmp),
|
|
|
|
|
Instruction(0xce, "dec", AddrMode.Abs, 6, ::iDec),
|
|
|
|
|
Instruction(0xcf, "dcp", AddrMode.Abs, 6, ::iDcp),
|
|
|
|
|
Instruction(0xd0, "bne", AddrMode.Rel, 2, ::iBne),
|
|
|
|
|
Instruction(0xd1, "cmp", AddrMode.IzY, 5, ::iCmp),
|
|
|
|
|
Instruction(0xd2, "???", AddrMode.Imp, 0, ::iInvalid),
|
|
|
|
|
Instruction(0xd3, "dcp", AddrMode.IzY, 8, ::iDcp),
|
|
|
|
|
Instruction(0xd4, "nop", AddrMode.ZpX, 4, ::iNop),
|
|
|
|
|
Instruction(0xd5, "cmp", AddrMode.ZpX, 4, ::iCmp),
|
|
|
|
|
Instruction(0xd6, "dec", AddrMode.ZpX, 6, ::iDec),
|
|
|
|
|
Instruction(0xd7, "dcp", AddrMode.ZpX, 6, ::iDcp),
|
|
|
|
|
Instruction(0xd8, "cld", AddrMode.Imp, 2, ::iCld),
|
|
|
|
|
Instruction(0xd9, "cmp", AddrMode.AbsY, 4, ::iCmp),
|
|
|
|
|
Instruction(0xda, "nop", AddrMode.Imp, 2, ::iNop),
|
|
|
|
|
Instruction(0xdb, "dcp", AddrMode.AbsY, 7, ::iDcp),
|
|
|
|
|
Instruction(0xdc, "nop", AddrMode.AbsX, 4, ::iNop),
|
|
|
|
|
Instruction(0xdd, "cmp", AddrMode.AbsX, 4, ::iCmp),
|
|
|
|
|
Instruction(0xde, "dec", AddrMode.AbsX, 7, ::iDec),
|
|
|
|
|
Instruction(0xdf, "dcp", AddrMode.AbsX, 7, ::iDcp),
|
|
|
|
|
Instruction(0xe0, "cpx", AddrMode.Imm, 2, ::iCpx),
|
|
|
|
|
Instruction(0xe1, "sbc", AddrMode.IzX, 6, ::iSbc),
|
|
|
|
|
Instruction(0xe2, "nop", AddrMode.Imm, 2, ::iNop),
|
|
|
|
|
Instruction(0xe3, "isc", AddrMode.IzX, 8, ::iIsc),
|
|
|
|
|
Instruction(0xe4, "cpx", AddrMode.Zp, 3, ::iCpx),
|
|
|
|
|
Instruction(0xe5, "sbc", AddrMode.Zp, 3, ::iSbc),
|
|
|
|
|
Instruction(0xe6, "inc", AddrMode.Zp, 5, ::iInc),
|
|
|
|
|
Instruction(0xe7, "isc", AddrMode.Zp, 5, ::iIsc),
|
|
|
|
|
Instruction(0xe8, "inx", AddrMode.Imp, 2, ::iInx),
|
|
|
|
|
Instruction(0xe9, "sbc", AddrMode.Imm, 2, ::iSbc),
|
|
|
|
|
Instruction(0xea, "nop", AddrMode.Imp, 2, ::iNop),
|
|
|
|
|
Instruction(0xeb, "sbc", AddrMode.Imm, 2, ::iSbc),
|
|
|
|
|
Instruction(0xec, "cpx", AddrMode.Abs, 4, ::iCpx),
|
|
|
|
|
Instruction(0xed, "sbc", AddrMode.Abs, 4, ::iSbc),
|
|
|
|
|
Instruction(0xee, "inc", AddrMode.Abs, 6, ::iInc),
|
|
|
|
|
Instruction(0xef, "isc", AddrMode.Abs, 6, ::iIsc),
|
|
|
|
|
Instruction(0xf0, "beq", AddrMode.Rel, 2, ::iBeq),
|
|
|
|
|
Instruction(0xf1, "sbc", AddrMode.IzY, 5, ::iSbc),
|
|
|
|
|
Instruction(0xf2, "???", AddrMode.Imp, 0, ::iInvalid),
|
|
|
|
|
Instruction(0xf3, "isc", AddrMode.IzY, 8, ::iIsc),
|
|
|
|
|
Instruction(0xf4, "nop", AddrMode.ZpX, 4, ::iNop),
|
|
|
|
|
Instruction(0xf5, "sbc", AddrMode.ZpX, 4, ::iSbc),
|
|
|
|
|
Instruction(0xf6, "inc", AddrMode.ZpX, 6, ::iInc),
|
|
|
|
|
Instruction(0xf7, "isc", AddrMode.ZpX, 6, ::iIsc),
|
|
|
|
|
Instruction(0xf8, "sed", AddrMode.Imp, 2, ::iSed),
|
|
|
|
|
Instruction(0xf9, "sbc", AddrMode.AbsY, 4, ::iSbc),
|
|
|
|
|
Instruction(0xfa, "nop", AddrMode.Imp, 2, ::iNop),
|
|
|
|
|
Instruction(0xfb, "isc", AddrMode.AbsY, 7, ::iIsc),
|
|
|
|
|
Instruction(0xfc, "nop", AddrMode.AbsX, 4, ::iNop),
|
|
|
|
|
Instruction(0xfd, "sbc", AddrMode.AbsX, 4, ::iSbc),
|
|
|
|
|
Instruction(0xfe, "inc", AddrMode.AbsX, 7, ::iInc),
|
|
|
|
|
Instruction(0xff, "isc", AddrMode.AbsX, 7, ::iIsc)
|
|
|
|
|
).toTypedArray()
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|