A MOS 6502 CPU emulator written in C++