6502 emulator in JavaScript