Hacker News new | comments | show | ask | jobs | submit login
The MOnSter 6502: transistor-scale replica of classic MOS 6502 microprocessor (monster6502.com)
267 points by ingve 3 months ago | hide | past | web | favorite | 81 comments



I can't get enough of that project, it's brilliant in picking the one target that is still feasible and yet so complex that it illustrates the magic that makes an integrated circuit useful: the only reason you are using a CPU is because it is integrated. A non-integrated CPU would be prohibitively expensive and terribly slow, even with today's surface mounted devices.


Modern CPUs, sure. Apparently the original microprocessors were actually faster when implemented with discrete components though: https://en.wikipedia.org/wiki/Datapoint_2200


Wow, as that Wikipedia article explains, the 8008 was effectively developed through a prototyping process involving 100 TTL chips. Also, it sounds like CTC (Computer Terminal Corporation) invented the circuit and later gave Intel full rights to turn it into a chip and improve upon it. Intel was simply a contractor who knew when to do some work for free in exchange for IP rights. Did Intel have any idea how successful their strategy would turn out? Amazing!


Prototyping using TTL chips to validate the logic design was still common throughout the 1970s. 100 TTL chips is pretty small.

The Motorola 68000 team published several papers that are still available through IEEE that describe the design process. They built a prototype from TTL chips which allowed them to rapidly iterate the microcode, nanocode, and programmed logic arrays without having to wait for samples to come back from manufacturing.


I'd love to read them, could you share a doi or link?


That must have been several boards at least, even at TTL scale integration and using components like adders and decoders as the building blocks.


There is a FAQ on the page that explains that a 68k built in the same way would require a board 1.7m square.


Which is not practical for board size, so it most likely would have been some kind of backplane with plug-in boards for the various main sections of the CPU.


..or much smaller in a 3D setup.


I wish they had a variable speed, even down to manual clock cycles. Once they add the new LEDs on the next revision, it would be a wonderful learning tool to watch the state changes.


I'm pretty sure they do. I saw it in person earlier this year and there was a knob that controlled the execution speed.


From their FAQs:

>> How big would a modern CPU be at this scale?

>> The Apple A8X, found in the iPad Air 2, contains about 3 billion transistors. (This is comparable to the number of transistors in modern desktop computer CPUs as well.) At the scale of the MOnSter 6502, that would take about 885,000 square feet (over 20 acres or 8 hectares) — an area about 940 ft (286 m) square.


For comparison, a large footprint 35 floor high rise office tower might have 550,000 sq ft of total space, including central hallways/elevator lobby areas.


At that scale, I imagine the speed of electricity is a significant issue limiting clock speed.

It would take light about 956 nanoseconds to travel the 940 feet across that theoretical CPU. Assuming that was the limiting factor in your clock speed, that would cap it at 1.05 Mhz.

Obviously, it's going to be far more complex than that, but I'd be really surprised if they could get the clock any faster than that.


You would be murdered by the capacitance of the discrete components before even seeing MHz on the horizon. (The author cites gate capacitance here as limiting _this_ "small" CPU to 60 KHz)


You can use BJT's. They have quite low capacitances.3pf for a typical transistor.


For the average American: About 15 football fields.


And the latest generation of high end mobile phone system-on-chip is up in the 6-7 billion transistor range, so we can double that size again from 20 to 40 acres for whatever apple are in the middle of announcing for a new phone right about now...


I wish projects like this caught on and became an art trend, as in digital artists would create pieces like this and put them for sale. I love the idea of smart "paintings" that illustrate the technical detail and inner workings of a CPU, running a simple program, source code of which is printed out and put inside the frame. Perfect addition to a geek nest, as I detest the name "man cave".

edit: elaborated on art trend


Love projects like this!

If you're ever in Cambridge (UK), pop along to the Computing History Museum and see "Mega Processor" (http://www.megaprocessor.com/).




> The MOnSter 6502 is relatively slow compared to the original, thanks to the much larger capacitance of the design.

Though that is all true and good, decent speeds are possible with discrete designs. A decade before the 6502, discrete component mainframes hit clock speed like 35 Mhz.

Those used BJT's; that's the main difference. Low impedance inputs exhibiting low parasitic capacitance.


So beautiful.

I wonder if it could be done in a similar way but run full speed? From the FAQ:

> Does it run at the full speed of an original 6502 chip? > > No. The MOnSter 6502 is relatively slow compared to the original, thanks to the much larger capacitance of the design. The maximum reliable clock rate is around 60 kHz. The primary limit to the clock speed is the gate capacitance of the MOSFETs that we are using, which is much larger than the capacitance of the MOSFETs on an original 6502 die.

I think I'm imagining most of an entire motherboard of something similar to the C64 or Apple ][ implemented this way, wall mounted along with a display and controls, with a classic software library.


This is one of the key things that integrated circuits bought you, when moving from discrete to integrated circuits you could switch the transistors faster because they needed either less current (TTL) or less charge (NMOS/CMOS) to switch. Or conversely, the same charge could switch them faster.

So if you look at the highest performance discrete computers of their time, things like the CRAY the CDC machines, etc. You'll see that they consumed larger and larger currents to achieve the switching rates they needed to achieve and increasingly exotic cooling systems (with the Cray's flourinert systems being pretty damn awesome).

I find it fascinating to walk from the ENIAC to the 704 to the B5500s, and PDP-8's and 11's, to microprocessors to systems on chips. Each step in integration let you make things smaller and run them faster. It wasn't until Moore's law broke down in 2004[1] and the world became multi-core that this really stopped happening.

[1] https://ieeexplore.ieee.org/document/1430623/


Yes the earlier Cray computers used ECL logic where the transistors were never in saturation so fast switching time but more current dissipated.


I saw this on display at the NYC maker and also asked about what it would take to run full speed. He said the gate capacitances of discrete MOSFETs are 100's of times greater than the tiny ones in a chip. This would require traces that could handle dozens of amps and a power supply for the whole board that could provide over 100 amps. So not really feasible - but then again, neither is building a circuit board to duplicate a chip


Heavy copper PCBs can carry dozens of amps on standard trace widths: https://www.epectec.com/articles/heavy-copper-pcb-design.htm...

Much more expensive than regular PCBs, of course.


It could be done if you switched from MOSFET to BJT. That's how they built discrete processors back in the day. At least low double digit MHz clocks would be doable as long as you pay attention to trace lengths, capacitance, power consumption/heat, etc (in other words, all the same design considerations they had when BJTs were state of the art)

That said, I think the objective was to duplicate the processor rather than the systems it ran in so their existing MOSFET design is true to that.


The N-type enhancement mode MOSFETs it uses require a positive gate-to-source voltage to turn on, and are turned off by pulling the gate-to-source voltage down to 0v. The gate itself forms a capacitor which must be charged to allow the gate-to-source voltage to increase and the MOSFET to turn on. Running a higher voltage than the standard 5v (SOT-23 small signal MOSFETs often can handle 20vgs, depending on the specific part) would allow the gate capacitance to charge much faster and the MOSFETs to turn on much faster. However, the clock speed will still be limited by how quickly that gate charge can drain to 0v in order to turn the MOSFET off.


It could run at full speed if they had started from the 65C02 design, I'm sure. NMOS is simpler but very slow.


So a "modern" CPU to the same scale would be around 20 acres. Hmm, I'll start saving up now.


And probably not faster either, considering that the thing runs at 60 kHz due to its size.


A 20 acre square is about 925ft to a side.

Speed of light is really starting to matter. That's about a nanosecond just for signal to propogate, and that's assuming a straight wire with no intermediate components.


The speed of light often seems so fast as to be infinite, or at least hard to comprehend, in daily life. I was surprised the first time I calculated the minimum possible round trip time from New York to San Francisco, as the crow flies: it's just under 28ms not counting any overhead whatsoever from switching, electronics, etc. It amazes me that an actual network ping is only about double that, considering all the overhead of switching, and that light doesn't travel at full speed in fiber optic cables.


No kidding, high speed traders are spending big bucks on getting an advantage over fiber networks by using microwave links spanning continents[1]

[1]: https://arstechnica.com/information-technology/2016/11/priva...


I worked on an algorithmic trade platform for an options broker/market maker. We bought rack space next to the ISE exchange's racks, which comes at a premium over rack space ACROSS THE ROOM.


It's a problem in mobile comms too. There's a concept called timing advance: in order for TDMA frames to arrive in the correct time slot and not crap all over the neighbouring frames from other users, they have to be sent earlier by the handset, depending on the distance from the base station.

(At least it's not GPS where the orbit speed plus lack of gravity means you have to factor relativity into the mix too!)


925 feet is around 940ns assuming speed of light in a vacuum. Speed of light in copper traces is slower.


> Speed of light in copper traces is slower.

Approximately 0m/s over any practical distance. :)


One of the best demos I remember from university, was on the first day of a digital logic class. The professor passed out a bunch of short pieces of yarn, then proceeded to explain that they were the length of a clock cycle in a typical CPU.


I should imagine capacitance and inductance are going to hit the clock speed waaaay before theoretical speed of light barrier comes into play.

There were some pretty serious limitations on parallel buses and backplane designs back in the day. Hence everything went serial (USB, PCIe, etc).


> 630 located on 164 quad transistor array chips

Eh. That's kinda cheating.

(I'm joking of course… this is impressive. Apparently they had to use the chips because discrete 4-terminal NMOS transistors are no longer manufactured!)


The post has a question:

>"Is it truly a "discrete 6502?"

I read the answer but didn't understand the answer given. Can someone elaborate on this? Wasn't the original 6502 an "integrated" chip? When I think about a "discrete" CPU I think of something like an older main frame where the different functional units of the CPU might be spread over a few different circuit boards with busses connecting those boards. Is my understanding of a "discrete" CPU incorrect?


The context here revolves around the definition of the word "discrete" and the fact that they are using "discrete" in terms of "transistors" as in "discrete transistors".

When used in that manner, "discrete transistors" generally means that each individual transistor is on/in one single package. The item pictured here: https://www.sparkfun.com/products/retired/12852 is a "discrete transistor" (the plastic package contains one single transistor, the three leads connect directly to the collector, emitter, and base).

Now, in the case of this design, they explain that they are unable to purchase actual discrete transistor packages because no one makes the appropriate MOSFET transistors as single transistor to a package items anymore. So they had to use four transistor packages instead of single transistor packages. So under a strict definition of "discrete" they did not use "discrete transistors". They then provide their rationale for why one could view this as still discrete in a less strict usage. It is then up to you to decide if you accept their rationale.


I indeed missed the context here. Thank you for the clarification and excellent explanation. Sparkfun looks like a great resource. Cheers


beautiful, looks like a work of art !


I think that by most definitions it is a work of art. It is not practically useful, it is beautiful to look at (at least, to me it is), it is unique (for now) and it took a labor of love to be brought into this world.


I think it would be useful to visualize how an assembly instruction works, to teach how it is executed in hardware.


I think the various 'soft' versions of the 6502 would serve that purpose better, but yes, you could use it as a teaching aid.


What's the device he's plugging the chip into, with the vga and ps/2 output ports?


Looks like a modern replica of a KIM-1 or another early single-board trainer. Something like that would be useful for testing, since the replica CPU won't work if you just drop it into an Apple II or other 8-bit consumer PC.


I'm surprised the clock generator scaled. Is the clock circuit the same as on the 6502?


I love and miss this sort of actual hacker news. I wish we had more of these here in HN.


Crucial questions about the project remain unanswered:

Does it suffer from Spectre attacks ?


Definitively not. The MOS 6502 lacks speculative execution functionality, it also lacks any sort of instruction or data cache whatsoever.


I remember reading about someone making a working version of some very small ARM core in conductive ink on a T-shirt. However, i can't find any description of this on the web. Did i dream this?


You might be thinking of the ARM printed on plastic as thin film electronics: http://armdevices.net/2017/05/21/0-01-flexible-plastic-arm-p...


It wasn't that, but that is brilliant!


I wonder how much would it cost to make them in a factory. How long does it take a robot to place 5K components on a board and send it through the oven?


Cost of placing a component like the FETs here, would be roughly $0.04, plus say $0.01 for the part. The PCB would be something like $50, maybe a bit more to get the nice looking ENIG finish. There would be a bit of extra money required for the power supply, connectors, handling, solder stencil, etc.

seeedstudio.com does online quotes, but you'll need design files.


So, it should be about US$250 for the discrete components, plus $50 for the board.

I'd totally pay $300~400 for one.


What a beautiful board. I love how you can see the processor working. I'm sad that they have no plans to make other processors as well.


It may inspire others, however; and even if it's not a different processor (I'd love to see a Z80 version) there's still plenty of room to shrink this one and yet remain discrete --- looking at https://cdn.evilmadscientist.com/sites/6502/images/A1_4.jpg you can see there are huge areas of empty space between the transistors and LEDs, and that package is not as small as SMD transistors come. Halving each dimension (1/4 the area) should be possible in a revised design, reducing PCB costs and making it more palm-sized. Alternatively, the same size of board can hold 4x the transistors, meaning a Z80 would fit comfortably.


Is there a way to set the processor's clock? It'd be nice if the user could slow it down make it easier to observe and understand the state changes. Maybe even support breaking execution in order to read the state.

A Z80 or 68k would be way cool!


You can do that with http://visual6502.org/ today! :)


Let’s face it. The circuit board is covered in Blinky lights and runs 6502 code. What’s not to like?


Very cool! It's actually simpler / smaller than I expected. Even back then I imagined CPUs having a lot more transistors.


I'd love to have a giant wall hanging reproduction of a Tamagotchi running on this. Would definitely pay good money for it.


It's said that no work of art is finished, only abandoned in frustration. Is this work of art ongoing, I wonder?


Very nice for educational purposes I imagine. Or just hang it on your wall running your favorite code!


+100!

It will inspire kids / young people to learn and create things beyond what's possible today.


Selling them will be interesting.. it will need something like a KIM-1 front panel.


That is just so COOL.

I love the LEDs illustrating what is going on internally.


Now if only they'd sell me one. :/


Yeah... so much want... sigh.


Cool. Let me know when it is available (if ever).


The article links to a mailing list specifically for that.


I know. I've been on it for quite some time.


What's cool about it? It's totally bizarre to me that someone would spend two years on a project like this.


2019: big visible CPUs trend maybe?




Guidelines | FAQ | Support | API | Security | Lists | Bookmarklet | Legal | Apply to YC | Contact

Search: