
I decided to make a graphics card for my Amiga 2000 - mntmn
https://github.com/mntmn/amiga2000-gfxcard
======
dingdingdang
The fact that one person can manage this (which would back in the day have
taken god knows how many man years of dev time) gives me hope in terms of
humanity's capability to somehow deal with the ever increasing technological
environment we're enmeshing ourselves into. Thumbs up for a mega cool project!

~~~
userbinator
One _talented_ person. I don't think the typical CS grad would be anywhere
near this level. This is pretty much a "10x".

But there are a few others too; here is someone who made an entire SoC
(including CPU, GPU, and audio --- all of his own design) on an FPGA, plus
wrote the software to run on it. And this is apparently his _first_ FPGA
project:

[http://www.linusakesson.net/scene/parallelogram/](http://www.linusakesson.net/scene/parallelogram/)

~~~
noonespecial
10x indeed. This is an example of that even rarer creature, the "unstoppable"
engineer. Need an FPGA? I'll just learn verilog. Never made a pcb but need
one? No prob, just learn kicad and figure out how to solder SMD. No docs? Just
reverse engineer. No tools? Make my own.

This approaches Woz level engineering, if not 100% technically, at least
philosophically.

~~~
nickpsecurity
I agree. I just got a great book, Electronics Principles by Malvino, on
electronic engineering with especially analog focus. I was told to get another
one to learn proper PCB design. There's others for Verilog. Unlike
programming, most stuff in these has to be learned by trial-and-error with
hardly any instant solutions a la StackOverflow. Graphics cards themselves are
their own beasts with complex issues even for simple ones, esp integration w/
regular software.

So, as I'm reading this, I'm surprised how nonchalantly he describes what
looks like a ton of headaches that's in front of me personally. Doing some
basic stuff in Verilog on an FPGA is straight-forward. What he's done was not
unless he found some excellent resources that basically let him cheat a lot in
the learning. I'd be interested in them as I'm collecting resources with HW
knowledge and wisdom.

~~~
joshvm
For beginners, buying books on PCB design isn't worth the money. You'd be
better off spending $50-100 on a load of sensors, designing the boards for
them and getting them built. You'll learn far more than a book will teach you.
There are lots of good Eagle and KiCAD tutorials online.

If you need to know about design, read application notes from manufacturers.
There are thousands and thousands. Often they will dictate how you should
route a particular component. You can look at reference boards from people
like Analog, which typically come with schematics and layout files. Most of
the big name companies have guides for layout:

[https://www.google.co.uk/search?q=pcb+design+application+not...](https://www.google.co.uk/search?q=pcb+design+application+note)

What you will quickly find is that there's a lot of differing opinion on what
is "right". Until you need boards with high speed digital/analogue/mixed, you
don't really need to worry much about how things are laid out. You will almost
always be constrained by more practical issues like enclosure sizes or where
you have to put connectors.

~~~
nickpsecurity
I appreciate your feedback but it concerns me. It sounds like a lot of trial
and error with components that cost money. One concern I have with that is
it's dealing with electricity. What's the odds of getting components fried or
yourself electrocuted just doing trial and error learning from tutorials and
datasheets? And when you've done a bunch do you even really understand what
you're doing when given fresh components?

"If you need to know about design, read application notes from manufacturers.
There are thousands and thousands. "

I'll try to remember that.

"You will almost always be constrained by more practical issues like enclosure
sizes or where you have to put connectors."

I'll definitely believe that. Thanks for the tips and different perspective.

~~~
akiselev
If you make electronics, the odds of frying a component or electrocuting
yourself is 100%, regardless of how educated or talented you are. The
following happen to me on a regular basis, whether I'm working on high speed
digital/RF or making something simple like an arduino shield, even though I
learned as an apprentice under a brilliant EE:

* PCB with poorly aligned copper layers shorting the second the prototype is plugged in, usually destroying at least one chip. Lots of smoke and burning FR4

* Solder in $100+ high power transistors the wrong way. _BOOM_

* Using a counterfeit capacitor from shady vendor that either shorts internally or just plain explodes. Happens a lot when I need a really large capacitor and have to get it on short notice

* Forget to use a little extra flux and tin 'whiskers' form between freshly soldered pins that short them the second the device is powered up. This is so common that NASA has a whole website dedicated to the topic [1]

* Use wrong temperature profile or make the pin layout a thousandth of an inch too small or large and bam, two solder balls on a BGA flow together, requiring hours for reflow and reballing if you're lucky, and a new $2,000 FPGA if you're not.

Any nontrivial circuit is going to be impractical to simulate (and impossible
to describe analytically as a whole) for all but the most well funded projects
so I'd say 90+% of EE is trial and error, even for the most experienced
designers. There's many rules of thumb and you develop an intuition for a wide
variety of situations just like you do in programming, but it's just a
fundamentally different field with different constraints.

[1] [http://nepp.nasa.gov/whisker/](http://nepp.nasa.gov/whisker/)

~~~
nickpsecurity
Wow. That's some crazy stuff. So, the scary, trial-and-error is unavoidable
then. Thanks for the feedback. Btw, I just recommended a few books here based
on feedback from other EE's...

[https://news.ycombinator.com/item?id=11515190](https://news.ycombinator.com/item?id=11515190)

Any thoughts on them? Particularly, a combo of something like Malvino and
Circuit Designer's companion to get a good head start on analog and PCB's
respectively. Or do you have other references that kick ass in teaching
practice more than theory? Gotta build up links for new people to accelerate
hands-on part of their learning just like others did for programming.

Note: Art of Electronics is usually in my list but that link was for digital
learner. Not sure if it's needed there.

~~~
joshvm
What sort of circuits do you want to design? RF? Audio? Analogue is a big
field! It's like saying "I want to write programs, which books do you
recommend?"

~~~
nickpsecurity
I'm gathering information to help everyone out then organizing, cataloging,
and sharing it. You could say it falls into some basic categories:

1\. Enough knowledge to get designs working on a FPGA plus integrate that with
other chips on a PCB. OSS HW with minimal analog.

2\. Enough knowledge to design basic analog circuits for control and stuff.
Alternatively, to design digital cell libraries as there's almost nothing
available for academic toolbuilders.

3\. The serious, mixed-signal shit that lets me do some parts in digital and
some parts in analog where it handles it better. I've seen analog coprocessors
with 100x performance at 1/8th power on ODE's and stuff. It also seems like
certain signal processing or media codec tasks would be crazy fast/efficient
in analog. I know high-end ASIC's make extensive use of such techniques. What
tidbits I see in blog comments and papers can only be described as black magic
without a more thorough resource. :)

4\. RF books outside of ARRL that's been recommended to me. Need a lot of
people experimenting with this stuff to reinvent things like TEMPEST that are
classified. They need some good resources to get head-start.

So, those are some basic categories where I'm looking for both accessible,
foundational material and cookbooks with heuristics. Being able to combine
COTS components like MCU's and FPGA's on custom PCB's is major help to
hobbyists. Being able to make the cells and basic, analog components required
in about any ASIC in conjunction with tools like Qflow OSS Synthesis could get
custom stuff going quicker. More thorough stuff for mixed-signal for its
advantages plus to explore analog and digital interactions in digital systems
that can screw either up. And RF for reasons stated.

Whatever you have. Drop it here or email it to me in my profile address. I'll
keep circulating that along with others tips and resources whenever people
ask.

------
dynjo
I made one before :-)
[http://amiga.resource.cx/exp/harlequin](http://amiga.resource.cx/exp/harlequin)
though my prototypes were much less pretty than yours!
[http://imgur.com/Y7OOg2i](http://imgur.com/Y7OOg2i)

~~~
mntmn
ha! super awesome :D

------
WalterBright
> I checked eBay for the "big" Amigas I never had, expecting them to be cheap,
> but found out that these boxes had turned into valuable collector's items.

Story of my life. I had an Amiga, got rid of it. Had an H-11, got rid of it.
Had a Digicomp I and II, mom got rid of them. All worth a big pile now.

My basement is full of old computers I stuck down their as I upgraded. All
worthless :-)

I have an unerring ability to get it backwards what will be a collectors' item
and what won't.

------
0xcde4c3db
This is pretty great. I especially like the poor man's ChipScope that shows up
on the display itself.

I'm sometimes surprised by lack of options for a small, cheap GPU that could
be readily integrated into a design like this. There's seemingly a big gap
between the classic VDP chips like the TMS9918 and its successors (which AFAIK
have all been out of production for ~20 years) and modern GPUs that come in
monster BGA packages, call for super-fast external RAM and dedicated power
supply circuitry on 6+-layer boards, and can't be bought through mortal-
friendly channels anyhow. FTDI has the FT800 series, and I'm sure there are
still suppliers of S-PPU (the SNES graphics hardware) clones if you know who
to talk to in China, but other than that it seems like the options are:

1) Roll your own in an FPGA, like this project

2) Get a fast, preferably multicore microcontroller with suitable I/O and
program it to do rendering in software (maybe a Propeller, GA144, or some XMOS
chip?)

3) Buy your GPU attached to an ARM core (i.e. Allwinner, Rockchip, Freescale
i.MX, TI OMAP/Sitara, etc.) and program it to speak some GPU-oriented protocol
(which probably adds a considerable amount of latency, since you'd
realistically need to use the Linux drivers)

~~~
yoshamano
It's funny you mention the TMS9918. I was looking for a good place to link my
friend's drop in replacement for the 9918 he made for his TI 99/4A.

[http://codehackcreate.com/archives/30](http://codehackcreate.com/archives/30)

"F18A stands for “FPGA TMS9918A” (hence the project’s title) and will be 100%
hardware and pin compatible replacement for a TMS9918A VDP (video display
processor)."

------
hoke_t
How does one learn how to do this stuff? Low level programming interests me
immensely but I can never find a good resource for how to learn. I know C,
C++, Java, Javascript, Python, Objective-C, Swift, but the only reason I have
been able to learn these languages and their technologies is because of the
resources available. Can anyone point me in the right direction to become
acquainted with low-level technologies/understanding?

~~~
dsr_
Start with an assembly language designed for teaching: MMIX.

[http://mmix.cs.hm.edu/index.html](http://mmix.cs.hm.edu/index.html)

There are books, courses, homework, and lots of free resources -- in
particular, emulators.

Then find a project that interests you, and learn what you need to do for
that. 68000 assembly? Forth? Graphics on a VGA card emulated in a VM running
MS-DOS? All of these things are entirely do-able.

Or find a project that is already in development and contribute to it. The
important bit is your own motivation.

~~~
jeffreyrogers
I don't know if MMIX is that useful to learn honestly. It's RISC like, which
is good, but the register saving convention is a bit weird and its not that
similar to things that are already exist. Most assembly languages are pretty
easy to learn (even x86), they just seem hard because they're so low level.

------
CamperBob2
Cool stuff! On the read problem:

    
    
       I found host read timing to be significantly harder to 
       get right, and it's still not perfect. Host reads can't 
       be put in a queue and have to be processed immediately. 
       This interrupts the fetching process; if the host needs 
       to read from a totally different memory location then 
       the display engine is fetching, the SDRAM has to close, 
       refresh and reopen rows, which is a time consuming 
       process. So far, reads from the host cause temporary 
       distortions (glitches) in the display output. I plan to 
       mitigate these problems using either burst mode reads  
       and fast switching and/or inserting CPU wait states via 
       the XRDY signal.
    

... why not just maintain two copies of the frame buffer, one onscreen and one
off? Your hardware FSM then has a much simpler job: make the real VRAM
contents match the shadow buffer.

In other words, instead of tackling the problem with 1988-era engineering,
take advantage of the free parallelism and essentially infinite (from a 1988
perspective) memory that you get with an FPGA board today.

Hell, there's probably enough BRAM on that Spartan6 to implement an Amiga
frame buffer.

~~~
duskwuff
> Hell, there's probably enough BRAM on that Spartan6 to implement an Amiga
> frame buffer.

Nowhere near enough. Spartan-6 LX25 has 936 kbit of block RAM; 800x600x16
requires a little under 8 Mbit _without_ double-buffering.

~~~
CamperBob2
Gotcha. I've been spoiled by the bigger parts.

------
dahart
To my eyes, this looks insane. Very impressive, the kind of post that makes me
feel both jealous and inspired! It looks like it could have taken up more than
just some 'free time', was it truly contained after hours?

I'd love to hear what tricks you (author), or anyone else, has for making free
time to explore side projects. I'm finding it harder and harder to contain
work coding; it seems to consume all available time!

------
nxzero
>> "The Amiga is probably the last 32-bit personal computer that is fully
understood, documented and hackable."

So, compare to the Pi, what information is present, anyone know?

~~~
mjg59
Basically everything is known about the Amiga - people have reimplemented
compatible hardware on an FPGA
([https://en.wikipedia.org/wiki/Minimig](https://en.wikipedia.org/wiki/Minimig)).
Every piece of code that runs from power on has been examined in detail
(there's even a free software from-scratch version of the boot firmware). The
Pi still requires closed boot code that runs on the GPU in order to bring up
the application processor, and that still isn't well understood.

~~~
Zardoz84
I would say that a 386/486 PC ISA is well know how works.

~~~
mjg59
We know how the platforms work in general, but 386-era is when SMM appears for
the first time and so it's unlikely that anybody has full knowledge of the
entirety of a specific system.

------
rasz_pl
If you liked this project you might enjoy this blog
[http://amigaprj.blogspot.com](http://amigaprj.blogspot.com)

Whole journej from building simm based 74 logic driven ram expansion to 50MHz
turbo card:

[http://amigaprj.blogspot.com/2013/05/amiga-fast-ram-
expander...](http://amigaprj.blogspot.com/2013/05/amiga-fast-ram-expander-
with-simm.html)

[http://amigaprj.blogspot.com/2013/06/amiga-500-ide-
controlle...](http://amigaprj.blogspot.com/2013/06/amiga-500-ide-
controller.html)

[http://amigaprj.blogspot.com/2014/09/8-mb-fast-ram-
expander-...](http://amigaprj.blogspot.com/2014/09/8-mb-fast-ram-expander-
cpld-version.html)

[http://amigaprj.blogspot.com/2015/04/scandoubler-ecs-
for-a50...](http://amigaprj.blogspot.com/2015/04/scandoubler-ecs-
for-a500-a2000.html)

[http://amigaprj.blogspot.com/2015/06/amiga-500-68hc000-14-mh...](http://amigaprj.blogspot.com/2015/06/amiga-500-68hc000-14-mhz-
accelerator.html)

[http://amigaprj.blogspot.com/2015/06/amiga-500-14-mhz-
accele...](http://amigaprj.blogspot.com/2015/06/amiga-500-14-mhz-accelerator-
with-dram.html)

[http://amigaprj.blogspot.com/2015/07/amiga-500-28-mhz-
accele...](http://amigaprj.blogspot.com/2015/07/amiga-500-28-mhz-accelerator-
with-dram.html)

[http://amigaprj.blogspot.com/2015/07/amiga-500-accelerator-c...](http://amigaprj.blogspot.com/2015/07/amiga-500-accelerator-
card-with-68hc000.html)

[http://amigaprj.blogspot.com/2015/09/hc508-amiga-500-68000-5...](http://amigaprj.blogspot.com/2015/09/hc508-amiga-500-68000-50-mhz.html)

------
9erdelta
Suddenly there's a spike in demand for Amiga 2000s on ebay...or maybe it's
just me, I immediately opened a new tab and started searching for one to buy.

------
scrame
Wow, I'm really jealous of this. I never even had a 2000, I had a 500 with a
side expansion that could use an a2000 card, for extra ram, since there was no
HD.

I always wanted to do hardware work back then, but never quite had the right
opportunity going through school.

So cool to see this, that a500 was how I learned so, so, much about computers
that I love that it's still a tool for people to learn with.

------
coderjames
This is highly relevant to my interests, as I'm currently home-brewing a
68K-based system in need of a video card.

Thanks for sharing your work! This is awesome.

------
sixothree
I enjoy seeing vintage computing posts on Saturday at HN.

------
holografix
Un-effing believable. Someone get this guy onto AI see if he can create a
general purpose one in 5 months.

------
stuxnet79
Saw his page and thought it looked familiar. This is the same guy who coded
Conway's Game of Life in Brainfuck:
[http://www.linusakesson.net/programming/brainfuck/](http://www.linusakesson.net/programming/brainfuck/)

~~~
kyberias
Not the same guy. This guy is Lukas F. Hartmann. That guy is Linus Åkesson.

------
stevep98
Very interesting read. Thanks!

------
bayesian_horse
Far be it from me to question other people's choice of their side-projects,
but I sometimes wonder what these geniuses would be capable of if they applied
their talents to problems whose relevancy is more ... agreed upon ...

~~~
harel
I think the combination of such aptitude combined with the will to change the
world for the better, is more rare than those two attributes alone.

