A few years ago I started on a 6502 emulator. I have some of the instruction working but that's incomplete.
What works is the machine language monitor with Asm, Disasm, Memory Dump, Register Change, Trace, Go and several other features.
The code is all written in C.
Here it is with the source and execution files. This code may be useful for some of the other projects here.
http://www.kingsmills.us/6502.zip
It would be interesting to attempt to write an online 6502 emulator with php.
It has the appearance of the Commodore MLM programs.