6502 simulator in 6502

This is an archive of a topic from NESdev BBS, taken in mid-October 2019 before a server upgrade.
View original topic
6502 simulator in 6502
by on (#93036)
I'm aware of two 6502 simulators in 6502 assembly language:

Are there any others?

by on (#93048)
And what exactly would be the purpose of simulating a 6502 in 6502 assembly?

by on (#93054)
tokumaru wrote:
And what exactly would be the purpose of simulating a 6502 in 6502 assembly?


Isn't there a Turing-ism or something along the lines of "any machine can simulate any other machine, even itself". Or maybe it was a language-ism...any language can be used to construct any other language, even itself. Gah! I'm not remembering my college classes too well am I.

by on (#93056)
How about "because I can"? Or "because I want to make an environment allowing single stepping through 6502 code on any platform that can run an NES emulator, even if a debugger hasn't yet been ported to it"?

by on (#93058)
tepples wrote:
"because I want to make an environment allowing single stepping through 6502 code on any platform that can run an NES emulator, even if a debugger hasn't yet been ported to it"

Since there are a lot of things that can't be debugged that way, I imagine this is basically to inspect the logic? How would you control such a debugger while the program is running? If the emulator doesn't have a debugger, will you output debug information to the screen?

by on (#93088)
There's The Incredible KIMplement for the Commodore 64, emulating the MOS KIM-1. It doesn't handle the undocs, though.