The MOnSter 6502
May 15, 2016 5:00 pm MOnSter 6502So, I made a thing. A really big thing. Really big and really crazy.
You might have seen my discrete 555 and 741 IC electronics kits. Well, a while back I had this idea about creating a discrete version of a microprocessor, but it just sounded too difficult, time consuming, or impractical. And part of me didn’t want to do it, because it just sounds so tedious to design–at every stage, I was secretly hoping to find a show-stopping problem. But part of me was really interested to see if it could be done.
At dinner, Windell and I went through a thought experiment to see if it would even be possible. We weren’t sure how many transistors were in a 6502 (more than 1,000 but less than 10,000). If four surface mount transistors can fit in a square centimeter, then the board would need to be about 1,000 square centimeters, or about 32cm (13in) on a side, which is not as huge as we originally thought. Darn it, time to investigate further!
The hard work of reverse engineering the actual 6502 has already been done by the folks at Visual6502.org. I was able to extract the netlist from their Javascript simulation, which contains a list of all the transistors and every single wire connecting them together.
The 6502 uses dynamic NMOS logic, so it has a large number of “transmission gate” transistors that are used to switch currents. For various technical reasons, only a 4-terminal MOSFET can make an effective NMOS transmission gate. Those are really hard to find (nearly all MOSFETs are 3-terminal devices), but I found one–it’s an array of 4 MOSFETs on a single chip with a separate substrate pin.
I ran simulations using the transistors I found, and noticed that basic combinational logic and latches worked. I ordered parts and prototyped a few circuits. They worked perfectly.
I designed and ordered an OSH Park circuit board with just 8 bits of the program counter register. I thought to myself that there was no way such a complex circuit could work, especially with the ripple carry propagation. Well, it worked.
It was time to bite the bullet. I wrote a Python program that turned the Visual6502 netlist into a 3,510 line spreadsheet, and I began entering (on July 3, 2015) the transistors one by one into the schematic, highlighting each transistor as I finished it. Along the way, I noticed that the Visual6502 netlist had three extra transistors, T1088, T1023, and T3037.
(An example of an extra transistor)
When I was done with all 61 pages, I wrote another Python program to compare my schematic against the original netlist and corrected a few mistakes. Then I added 167 colorful LEDs to various control lines and data bits, and a few protection components.
The layout came next. In the layout software, I placed 4,304 parts by hand and wired them up manually (no autorouter) over the course of several months, finishing the last transistor on Dec 1, 2015.
And last Thursday, the first boards came in. They are beautiful!
We’ll be bringing it to Maker Faire, so I have a week to work on bringup testing. Wish me luck!
You can find more details on the main project site, monster6502.com.
Kufat :
Date: May 15, 2016 @ 10:20 pm
Next: tube 6502
Finally: mechanical 6502
TechFoxie :
Date: May 15, 2016 @ 11:08 pm
Now we need to see how high you can clock that thing!
David Stevenson :
Date: May 16, 2016 @ 4:14 am
Great project – I am impressed.
I did a javascript simulation of the UK101 a clone of the Ohio Scientific superboard. See http://www.avoncliff.com/uk101 It would be great if you could run the roms from the UK101. Particularly the CEGmon monitor a 2k startup with debugging type commands. Although it needs some emulation of the memory mapped display, and a rather odd very simple keyboard.
Dr Jefyll :
Date: May 16, 2016 @ 11:06 am
>an array of 4 MOSFETs on a single chip with a separate substrate pin
A separate substrate pin *is* unusual. Can you identify this part for me, please?
*AWESOME* project!!! Have fun at the Faire :o)
— Jeff
(KK Expanded-Instruction-Set 6502)
Chris Pepper :
Date: May 16, 2016 @ 11:52 am
Typo on http://monster6502.com
Can it hook it up inside an Apple ][ and run Oregon Trail?
Can I hook it up inside an Apple ][ and run Oregon Trail?
Andrew Kerr :
Date: May 24, 2016 @ 12:28 pm
First of all congratulations, my mind is blown, this is actually unbelievable. Very well done… the next question I guess would be, can it run DuckTales?
Ivy Mike :
Date: May 25, 2016 @ 6:38 am
Brilliant! This should definitely end up in the Computer History Museum in Mountain View, CA at some point in the future.
Vinzenz von Oberhammer zu Silberstein :
Date: June 4, 2016 @ 1:40 am
Awesome. über-awesome.
Larry Vrooman :
Date: July 25, 2016 @ 10:46 am
Have you considered ECL (Emitter-Collector-Logic) for improving the speed problem? You probably would not need the entire board done that way, just the ‘pinch-point’ circuits that need more speed.
eric :
Date: August 2, 2016 @ 3:55 pm
But ECL wouldn’t match the original! NMOS or bust! 🙂
Larry Vrooman :
Date: September 28, 2016 @ 11:36 am
NMOS was used for the ‘micro-sized’ 6502 CPU chip, and is well chosen at that scale. When it was scaled up, and you chose to stay with NMOS, speed was compromised by that choice. Still great work, and I really enjoy the technical ride your work takes us on!
Christian :
Date: November 9, 2017 @ 9:07 pm
Would you be willing to share your schematic?
eric :
Date: November 14, 2017 @ 11:50 pm
At some point in the future I plan to share the schematics.
Mike Drew :
Date: April 4, 2018 @ 7:24 pm
To me this is an amazing accomplishment almost beyond belief! I congratulate you on an amazing technical and artistic endeavor! Too me it is as much art as engineering/science. Bravo!
You wrote: ” I wrote a Python program that turned the Visual6502 netlist into a 3,510 line spreadsheet, and I began entering (on July 3, 2015) the transistors one by one into the schematic, highlighting each transistor as I finished it. ” I would very much like to understand how this works in greater deal. Would you consider sharing your Python program and all or part of the spreadsheet it produced? One or two pages of the schematic would be very helpful as well.
eric :
Date: April 30, 2018 @ 10:15 pm
The Python programs were hacks. On their site, the Visual6502 netlist is in “transdefs.js” while many net names are given aliases in “nodenames.js”. The program basically just substitutes those aliases in for the net names in the original file, then dumps it out to a CSV that I could open in LibreOffice. That’s it.
The schematic isn’t released right now but I have plans to do that eventually.
Peter Gullberg :
Date: July 21, 2021 @ 1:56 pm
Brilliant, Genius, etc… But soooooo crazy, and at the same time, sooooo funny!
I loved the idea, but I personally would have stopped att the fun idea!
Cheers
\Peter