Changes for version 0.03

  • Major refactoring of 6502 instructions.
  • Util methods added:
    • set_nz( $value )
    • push_stack( $value )
    • pop_stack( $value )
    • branch_if( $bool )
    • make_word( $lo, hi )
    • lo_byte( $word )
    • hi_byte( $word )
  • Fixed up debugging info for status register
  • Added the name of the op to the debug data
  • A little bit of PPU work done


Class representing a 6502 CPU
Handle different addressing rules
Add memory to accumulator with carry
Logical AND memory with accumulator
Branch on carry clear
Branch on carry set
Branch on result zero
Branch on result minus
Branch on result not zero
Branch on result plus
Branch on overflow clear
Branch on overflow set
Clear the carry flag
Clear decimal mode
Clear the interrupt disable bit
Clear overflow flag
Compare accumulator
Compare the X register
Compare the Y register
Decrement by one
Decrement the X register
Decrement the Y register
Exclusive OR memory with accumulator
Increment by one
Increment the X registers
Increment the Y registers
Jump and save the return address
Load accumulator from memory
Load X register from memory
Load Y register from memory
Logical OR memory with accumulator
Push accumulator on the stack
Push processor status on the stack
Pull accumulator from the stack
Pull processor status from the stack
Rotate left through carry
Rotate right through carry
Return from BRK/IRQ/NMI
Return from subroutine
Subtract memory from accumulator with borrow
Set the carry flag
Set decimal mode
Set the interrupt disable bit
Store accumulator in memory
Store the X register in memory
Store the Y register in memory
Transfer the accumulator to the X register
Transfer the accumulator to the Y register
Transfer the stack pointer to the X register
Transfer the X register to the accumulator
Transfer the X register to the stack pointer
Transfer the Y register to the accumulator
An object-oriented NES (6502) emulator
NES Audio Processing Unit
NES Central Processing Unit
Base class for mappers
NES Picture Processing Unit