Js6502

Javascript 6502 emulator

Download as .zip Download as .tar.gz View on GitHub Open in browser

6502 Javascript emulator.

Not an interpreter, but a JIT compiler to Javascript (that in turn gets JIT compiled to native code in many browsers)

Includes a 6502 disassembler and a small assembler.

Now with partial support of self-modifying code.

Memory can be modified in MANY ways (including PHA or JSR) and code can be anywhere (including in the stack!). Current implementation works only if the memory change is done using STA, STX, STY, INC or DEC.

Another shortcut is that "special locations" used for I/O do work only if accessed using STA abs / LDA abs instructions (normally on hardware implementations any read/write triggers the special behavior).