8 ms·
The MOnSter 6502
- MurrayHill1980 11y agoIt is totally totally impressive that a hardware version of a software simulation of the actual 6502 was built. What about an 8080 or 6800? Or Z-80. Zapple V1.1 >g200 HIGHEST MEMORY? 52926 BYTES FREE Welcome to BASIC, Ver. 1.3 <TDL Z-80 8-K VERSION> >READY Soon: how to win at Lunar Lander.
- userbinator 11y agohttps://en.wikipedia.org/wiki/Transistor_count#Microprocessors https://en.wikipedia.org/wiki/Transistor_count#Microprocesso... A 6800 or 8080 at the same density would be slightly larger, and a Z80 is more than twice as large. Even the first Pentium has almost 1000x more transistors.
- cmrdporcupine 11y agoWell http://www.visual6502.org/ http://www.visual6502.org/ has the visual sim for the 6502 but also the 6800 and the ARM-1. I guess that means the full netlist for those two must be done too? If so I guess it'd be possible to do them in this way. Though I don't think they have the same obsessive fan audience that the 6502 has. It sounds like the process of analyzing the Z80 in a similar way is starting: http://www.visual6502.org/wiki/index.php?title=Z8400 http://www.visual6502.org/wiki/index.php?title=Z8400
- kazinator 11y ago"Hardware version of software simulation" seems not to quite convey this. It looks like the software simulation actually simulated the original circuitry, using a netlist. The hardware is based on the same netlist; thus that simulation is of this hardware as much as of the original 6502. This new hardware isn't a simulation, though, but a discrete implementation of the real circuit.
- codewritinfool 11y agoI would pay for a Giant Z-80.
- deleted 11y ago[deleted]
- itgoon 11y agoI love this so much. (sorry for the useless comment, but really, I love this so much)
- basicplus2 11y agome too! :)
- userbinator 11y agoAwesome project. This is how processors used to be constructed too, with discrete components: https://en.wikipedia.org/wiki/Standard_Modular_System https://en.wikipedia.org/wiki/Standard_Modular_System What would be really nice to see is a photo of it sitting next to a real 6502 for size comparison.
- tubetime 11y agohttps://twitter.com/TubeTimeUS/status/732023168303435777 https://twitter.com/TubeTimeUS/status/732023168303435777 for a photo next to a real 6502, and an IBM SMS card for good measure. :)
- drcode 11y agoA curiosity question for people in this thread who understand circuit design: How efficient is the design of the 6502 given modern knowledge of CPU design? If we designed a similar CPU from scratch in 2016, could we make one that works much better (by whatever metric makes sense) and uses far fewer transistors?
- asimuvPR 11y agoGee, good question. I know people replicate them in FPGAs and verilog [1]. Improving on the design can be potentially done through software with verilog. I'm not sure of anyone who has improved on it because people focus on replicating it (it's a really fun chip to play with). Why fewer transistors though? [1]https://github.com/Arlet/verilog-6502 https://github.com/Arlet/verilog-6502
- pwg 11y agoAll in all, its design is not that bad. It shares some slight similarity with Patterson's later RISC design ideas in that it is a very reduced, simple design with zero fancy instructions. Just like in RISC chips, anything beyond the very basics of math/boolean operations, and you have to write code because the chip does not have a 'custom instruction' for that. It also has a slight overlap in it's processing and memory fetches that can be viewed as a slight pipelining. Nothing impressive vs. an IBM 360/91 mainframe or any modern CPU with pipelining however. As for a 2016 design in fewer transistors, that's unlikely. You need a certain number of transistors for each basic function, so there's a floor where if you want all the features of a 6502 (what little there were) you can't possibly do it without X transistors minimum. But, what 2016's tech would bring is a 6502 that instead of being clocked at 1.5-2Mhz might be clocked instead at a couple Ghz. Performance wise such a chip would be nearly infinitely faster than an original 6502, but would pale in comparison to a modern Intel chip with all the extras (cache, instruction translation, out of order issue, branch predictor, etc.) included in those chips. The 6502 would also be quite acutely sensitive to the speed of memory, so the chip would not be able to run any faster than RAM could feed it data (it has only three user accessible 8-bit registers, and only one of those can be used for computations). It worked with 1970's tech because 1970's memory's were as fast as it was so it was not slowed down by a huge memory vs cpu speed differential. This lack of registers is where its design diverges with RISC tech. as detailed by Patterson. What a modern 6502 design might do, however, is be extremely power efficient. A modern 2016 CMOS design clocked at 1970's speeds might use very little power. Whether it would beat ARM in that market is an unknown. Its biggest limitation for a 2016 design that is true to the original is being only an 8-bit chip with only a 16-bit address bus. Having 64k of RAM max on one's CPU in 2016 is going to crimp what solutions it might be useful for vs. using an ARM chip for the same solution.
- fitzwatermellow 11y agoFascinating! Just curious if anyone can provide any more details? Specifically, what design software, which manufacturer?
- tubetime 11y agothe schematic capture and layout was done in Altium. proto board spin from a vendor in China.
- vvanders 11y agoVery clean layout. If this actually works I wonder if he'd ever consider doing a kit. Would make an awesome display piece.
- tubetime 11y agowe're considering it. see http://monster6502.com/ http://monster6502.com/. there is a mailing list for those interested in such a kit.
- weinzierl 11y agoThis is awesome! I want one. > Is it expensive? >It is definitely not cheap to make one of these. If we had to ballpark what one of these would sell for — assembled and working — it would certainly be larger than $1k and smaller than $5k. I think this is out of range for many hobbyists and even schools and the like. Projects like the ErgoDox show that kits in the range of a few hundred bucks can sell well. >While the circuit board itself is large and a little bit expensive, the cost is actually dominated by the component and assembly costs of an extremely large number of tiny components, each of which is individually quite inexpensive. Add to that the setup and test costs of building complex things like these in small batches, and you'll immediately see how it adds up. So, the the only way to bring the price down below USD 1000 is, besides (possibly community driven) bulk buying, a kit version. > Is there going to be a soldering kit version of this? > No. (But on the other hand, "Anything is a soldering kit if you're brave enough!") This brings me to my question: Is soldering this even realistic? Did you solder the prototype yourself? How long did that take? I soldered the SMD diodes of a few Ergodoxen (76 for a board) and it gets boring quickly. Can't imagine doing 4304 parts.
- VLM 11y ago> "Is soldering this even realistic? How long did that take?" Disclaimer, I'm getting old. In the old days we soldered our S100 computers, and something like a 18 slot backplane had 1800 connections, and generally worked. Not unusual for a single card to have maybe 500 or so IC pins, 50 decoupling caps (100) and lets say 100 pins for jumpers and connectors. So it would be equivalent to making an entire S100 computer. I would estimate many tens of hours total. Also I never did it but no small number of people soldered up IBM PC clone motherboards. There were also clones of Apple-II and TRS-80 model 1 in kit form. Surface mount is a lot easier because once you learn how (and after 1000 or so components you'll be pretty good) there is no more flipping the board upside down over and over or snipping off wires. After 0204 RF chokes and microwave capacitors its nice to slum with giant digital logic parts so big you can pick them up with your fingers. Why some of the larger IC packages are so large that the device is no longer affected by solder surface tension (around say 100 pin TQFP size) You rapidly learn tricks like using the same brand of IC socket thru the whole board and keep a wooden board around the size of the PCB so you can stuff and cover and flip and solder all the IC sockets simultaneously. Another trick is to always remove the flux, not because it electrically matters but because you can't do it without 100% inspection of each joint, and you'll probably find one or two to clean up per board. Because you probably don't own a wave solder machine it also saves time to solder bypass caps on the solder side but beware of clearance issues the board might not fit anymore LOL. On my infinite list of things to build is the transistor clock around 2700 soldering joints. Totally doable. That might be a good place to start.
- mmastrac 11y ago> Along the way, I noticed that the Visual6502 netlist had three extra transistors, T1088, T1023, and T3037. I'm confused by this bit - does this mean that there's a bug in Visual6502?
- tubetime 11y agoin a way, yes, but those 3 transistors do not affect the simulation. the drains and sources are shorted together and tied to a random data line. the gates are grounded. they just sit there, doing nothing.
- wyldfire 11y agoAre they there for some meta feature like spares/patching or part identification, perhaps?
- kevhito 11y agoPerhaps they are the circuit equivalent of a trap street [1]? [1]: https://en.wikipedia.org/wiki/Trap_street https://en.wikipedia.org/wiki/Trap_street
- pwg 11y agoWith source/drain shorted together and tied to a data line, and the gate grounded, they might just be high resistance pull down resistors. I.e., they would rely on the gate leakage current to create a high ohm resistor. Creating real resistors on silicon IC's is area expensive, so most need for real resistors is first designed around and what's left as absolutely necessary is usually created using tricks. This might be one of those tricks.
- taneq 11y agoKnowing nothing about IC or CPU design, this was my first thought. They're there to fix some weirdness that happens when they're not there, and nobody could figure out exactly why it was happening so they just left them there. Kind of like the "magic" switch on the front of the old computer case that shouldn't affect anything, but the computer crashes when it's flipped. :P Hardware is weird.
- mozumder 11y agoHave you found the critical path that caused clock slowdown? Are there higher drive strength transistor available that could make it faster? PS. love this project.
- tubetime 11y agobecause it's NMOS, only the pulldowns can work quickly. the pullups are resistors (depletion mode FETs in the IC) which take some time to charge the downstream gate capacitance. i wrote a quick and dirty python program to calculate the optimal value for each of the 1,019 pullup resistors to hit a target clock of 500khz. board bringup is ongoing so we'll see how fast it ends up being...
- sowbug 11y ago500kHz is not too far from the Apple ]['s 1MHz. Come on, you can do it!
- mozumder 11y agoSo then the only way to get it going faster is to raise voltage for the pullups?
- tubetime 11y agowell, it has to run on 5v (standard ttl voltage) so the only way to speed it up is to decrease the pullup resistor values, which also increases the current consumption. it's a tradeoff.
- deleted 11y ago[deleted]
- ta160516 11y agoIf the FETs can take it, you could run it from 12V or whatever and put level shifters on the I/Os...
- justifier 11y agoi love the 555 http://shop.evilmadscientist.com/productsmenu/652 http://shop.evilmadscientist.com/productsmenu/652 evilmadscientist's datasheets are fantastic tools for learning
- ChuckMcM 11y agoOk, wow. That is pretty stunning. That is months of painstaking layout and research. I am in absolute awe. Windell and I talked about building a discrete 7400 (quad NAND gate), in theory you can build any logic you want out of enough NAND gates :-) but implementing the CPU on the PDP 8 was going to be a very , very big arrangement. at 13 in on a side this is pretty manageable. A lot of boards for the MicroVAX are larger than that. Now the question is if you make a proportionally sized 40 pin package for it, how big is the Apple II motherboard? :-) Nicely done, congrats on an awesome project. I must go to Makerfaire now to see this in person.
- deleted 11y ago[deleted]
- Hydraulix989 11y agoI also want to check this out in person. What day are you demoing it? Is there a booth, table, etc.?
- jerkstate 11y agoMy experience presenting at maker faire is that you don't know where your booth is going to be until you show up on Friday morning. What would help is to know what section it's in and what the name of the booth will be.
- tubetime 11y agothis is correct. it'll probably be in the expo hall. the exhibit is called "Making Dis-Integrated Circuits", see http://makerfaire.com/maker/entry/55149/ http://makerfaire.com/maker/entry/55149/
- danjayh 11y agoHe addresses the apple ][ idea. Since his board will be limited to 100s of khz (a PCB has signalling issues that an IC doesn't that will limit the max clock rate) and the apple ][ had HW with dependencies on the CPU being at a certain rate, it will not work just to build an adapter.
- Vintila 11y agoSomeone want to calculate the area needed to make a discrete current-gen processor?
- userbinator 11y agoAccording to https://en.wikipedia.org/wiki/Transistor_count#Microprocessors https://en.wikipedia.org/wiki/Transistor_count#Microprocesso... a Skylake K has 1.75G transistors, which is nearly exactly 500000 times more than the 3.5K in this one. Take the square root of that and the linear dimensions grow by approximately 707 times, so the 32cm x 32cm of the discrete 6502 would become something closer to 23m x 23m. It's roughly a 6 orders of magnitude increase in density, or 3 orders of magnitude increase in linear dimensions.
- CJefferson 11y agoThat's small that I expected it to be -- certainly feels printable, if someone really wanted to for some arty reason.
- pjc50 11y agoAnd 6502 was apparently first produced on 8 microns versus today's 22nm process, which is a linear scale factor of 363, which aligns fairly well with those numbers.
- onnoonno 11y agoYou have a calculation error: 707 x .32m ~= 230m
- weinzierl 11y agoAs the link to the actual project page is buried somewhere in the comments: http://monster6502.com/ http://monster6502.com/
- ianpurton 11y agoFor those that are not familiar with the 6502 it's a chip that powered a lot of peoples first computer experiences in the 80s. The Atari 2600, Commodore 64, BBC micro etc all ran 6502 or at least slightly modified versions of that chip. In those days if you were really interested in computers you tended to go lower level and learn assembler.
- linker3000 11y agoI'd love to try this processor in my Acorn System 1 (1MHz 6502) https://imgur.com/a/f7zZR https://imgur.com/a/f7zZR
- amelius 11y agoVery nice. But I would be more interested in making the transistors themselves at home. Imagine if that process can be automated (in a 3d printer?), that would be really cool.
- rasz_pl 11y agoChris Gammell has been preaching transistor printers for over 5 years now :)
- karmakaze 11y agoThis reminds me of another discrete machine. Does anyone recall the clockless, discrete x86 (probably 8088) that was made way, way back? As I recall it ran many times faster than the highest clocked version of same at the time.
- j1vms 11y agoOne of the many interesting things about this project is that it's a reminder how people often take for granted the miniaturization of these things (the micro- part in microprocessor). Had we not got the realized size down into the sub-micrometer scale, we would have been forced to contend with heat dissipation making it impractical to increase the performance to what "we're used to" these days. Now that Intel and others are facing issues at ~5-10nm scale, we will be facing a similar "clock" problem again. There are a few paths forward including: i) smarter microprocessor design tuned to intended application use, and ii) increased parallelization of tasks across multiple cores/cpus/machines. Edit: nanometer -> sub-micrometer
- gergoerdi 11y agoIn my experience [building my own Commodore PET on an FPGA](https://gergo.erdi.hu/blog/2015-03-02-initial_version_of_my_commodore_pet/ https://gergo.erdi.hu/blog/2015-03-02-initial_version_of_my_...), the PET would be a very promising candidate for using this as a plug-in replacement, since the (text-only) video subsystem can be fully isolated from the CPU with just dual-port video RAM between the two sides (and a 60Hz spike from the video side to the CPU IRQ leg).