Building a 6502 Simulator in Python (Part 2)
From a 12-instruction teaching CPU to a full MOS 6502 emulator, inspired by Ben Eater’s breadboard projects.
Why the 6502?
The MOS 6502 is the processor that defined home computing in the late 1970s and early 1980s. It ran the Apple II, the Commodore 64, the Atari 2600, and the Nintendo Entertainment System. It powered the first affordable personal computers and launched an industry.
What makes it perfect for a simulator project:
Building a CPU Simulator in College (Part 1)
The original MM1 processor simulator: a custom instruction set architecture built in Python as a student.
The Assignment
In 2004, week 5 of the Modeling Motion program introduced something unexpected: we weren’t simulating springs or epidemics anymore. We were building a computer from scratch, in software.
The assignment was to implement a simple processor simulator. Not a real CPU architecture like x86 or ARM, but a custom one designed for teaching: the MM1 (Modeling Motion 1). It had 8 registers, 64 words of memory, a 12-bit instruction format, and just enough instructions to write meaningful programs.