A couple of weeks ago I read the book Racing the Beam which is a great book that combines a history of the Atari VCS (the Atari 2600) with technical details about how programmers struggled writing code to work on the primitive Atari VCS hardware.
The VCS used the 6502 processor which was also used in all these machines:
Atari arcade games including Astroids, Battlezone, Missle Command
Apple II
Commodore 64
Nintendo NES
I started looking at the 6502 a little bit. It is a much simpler processor than the 8080 and it looked like it might be easy to emulate.
Briefly, the 6502 features:
3 8-bit general purpose registers A, X, and Y
8-bit stack pointer (fixed at RAM address $100, so can address $100-$1ff)
16-bit program counter
148 total instructions, (a lot of these are the very similar)
Little Endian architecture
I think that the only thing hard to understand are all the different addressing modes of the 6502. Even with all the documentation on the internet, I still struggled with it. So, in the next section I'll attempt to explain it a little differently - maybe between this explaination and the other information available info you can get a compete picture.
← Prev: chip-8-port-pt-3---chip8view.m Next: 6502-addressing-modes →Post questions or comments on Twitter @realemulator101, or if you find issues in the code, file them on the github repository.