v6502
The MOS 6502 Virtual Machine and Toolchain Infrastructure
|
Functions | |
int | v6502_instructionLengthForOpcode (v6502_opcode opcode) |
Return the byte-length of an instruction based on the opcode (See: Karnaugh Map Analysis) | |
v6502_address_mode | v6502_addressModeForOpcode (v6502_opcode opcode) |
Return the v6502_address_mode of an instruction based on the opcode (See: Karnaugh Map Analysis) | |
void | v6502_execute (v6502_cpu *cpu, uint8_t opcode, uint8_t low, uint8_t high) |
Execute an instruction on a v6502_cpu. More... | |
void | v6502_step (v6502_cpu *cpu) |
Single step a v6502_cpu. | |
void | v6502_reset (v6502_cpu *cpu) |
Hardware reset a v6502_cpu. | |
void | v6502_nmi (v6502_cpu *cpu) |
Send an NMI to a v6502_cpu. | |
void v6502_execute | ( | v6502_cpu * | cpu, |
uint8_t | opcode, | ||
uint8_t | low, | ||
uint8_t | high | ||
) |
Execute an instruction on a v6502_cpu.
It is important to note that this does not alter the program counter, v6502_step is required in order for that to happen. This is because some operations (like the interrupt sequence) actually inject instructions directly into the cpu, mid-execution.
TODO:
[eor]
[eor]
[jmp]
[jmp]
[lda]
[lda]
[ldx]
[ldx]
[ldy]
[ldy]
[sbc]
[sbc]
[sta]
[sta]
[stx]
[stx]
[sty]
[sty]