
The MOnSter 6502 - mmastrac
http://tubetime.us/?p=346
======
ChuckMcM
Ok, 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.

~~~
danjayh
He 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.

~~~
Someone
ChuckMcM doesn't propose hooking it up to an Apple ][ motherboard, he suggests
building a replica motherboard at the same scale. At about 75:1 scale (6502
was about 4mm), that motherboard would be over twenty meters wide.

~~~
dvanduzer
I'm in. Just need to set our watches back, right?

------
drcode
A 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?

~~~
pwg
All 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.

~~~
userbinator
The 6502 is still being produced in 2016, mostly not as an individual
processor but as a core for various controllers in things like mice,
keyboards, toys[1], monitors, and other electronics[2]

[1] [http://hackaday.com/2013/05/24/tamagotchi-rom-dump-and-
rever...](http://hackaday.com/2013/05/24/tamagotchi-rom-dump-and-reverse-
engineering/)

[2] [http://electronics.stackexchange.com/questions/168867/how-
to...](http://electronics.stackexchange.com/questions/168867/how-to-
dump-m50747-6502-derivative-rom)

~~~
cmrdporcupine
They (WDC) still sell the 65c02 (CMOS) variant and 65c816 in enough volume to
justify producing them, and they are sold through Mouser, among other places
(along with microcontroller variants of both that include integrated
peripherals, etc.)

A new 65c02 clocks up to 20mhz (apparently) without any real issues. And like
you said, WDC can provide custom cores that do much more.

------
ianpurton
For 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.

~~~
klez
> The Atari 2600, Commodore 64, BBC micro etc all ran 6502 or at least
> slightly modified versions of that chip

Let's not forget the Apple I

EDIT: and the Apple II, for that matter...

------
mmastrac
> 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
in 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.

~~~
pwg
With 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
Knowing 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.

------
itgoon
I love this so much.

(sorry for the useless comment, but really, I love this so much)

~~~
basicplus2
me too! :)

------
gergoerdi
In my experience [building my own Commodore PET on an
FPGA]([https://gergo.erdi.hu/blog/2015-03-02-initial_version_of_my_...](https://gergo.erdi.hu/blog/2015-03-02-initial_version_of_my_commodore_pet/)),
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).

------
weinzierl
As the link to the actual project page is buried somewhere in the comments:
[http://monster6502.com/](http://monster6502.com/)

------
userbinator
Awesome 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
[https://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. :)

------
vvanders
Very clean layout.

If this actually works I wonder if he'd ever consider doing a kit. Would make
an awesome display piece.

~~~
tubetime
we're considering it. see [http://monster6502.com/](http://monster6502.com/).
there is a mailing list for those interested in such a kit.

~~~
weinzierl
This 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
> "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.

------
MurrayHill1980
It 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.

~~~
codewritinfool
I would pay for a Giant Z-80.

------
j1vms
One 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

------
Vintila
Someone want to calculate the area needed to make a discrete current-gen
processor?

~~~
userbinator
According to
[https://en.wikipedia.org/wiki/Transistor_count#Microprocesso...](https://en.wikipedia.org/wiki/Transistor_count#Microprocessors)
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.

~~~
pjc50
And 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.

------
linker3000
I'd love to try this processor in my Acorn System 1 (1MHz 6502)

[https://imgur.com/a/f7zZR](https://imgur.com/a/f7zZR)

------
karmakaze
This 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.

------
justifier
i love the 555

[http://shop.evilmadscientist.com/productsmenu/652](http://shop.evilmadscientist.com/productsmenu/652)

evilmadscientist's datasheets are fantastic tools for learning

------
amelius
Very 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
Chris Gammell has been preaching transistor printers for over 5 years now :)

------
fitzwatermellow
Fascinating! Just curious if anyone can provide any more details?
Specifically, what design software, which manufacturer?

~~~
tubetime
the schematic capture and layout was done in Altium. proto board spin from a
vendor in China.

------
mozumder
Have 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
because 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...

~~~
mozumder
So then the only way to get it going faster is to raise voltage for the
pullups?

~~~
tubetime
well, 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.

~~~
ta160516
If the FETs can take it, you could run it from 12V or whatever and put level
shifters on the I/Os...

~~~
j1vms
Agreed, would seem to make sense too, however it would increase power
consumption and heat, so might "age" the whole circuit a bit faster than
keeping the voltage (and thus clock speed) down. Mind you, he could just pop
in replace components at will :)

