651 points · by mntmn · 10y ago · 124 comments
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:
This approaches Woz level engineering, if not 100% technically, at least philosophically.
In other words, the Internet is a multiplier that applies to the incredible curiosity and enthusiasm and intelligence of bright kids. So, multiply your 10x (or whatever #x) nerd by the 10x (or probably much greater multiplier) of the Internet, and you get the world we're living in now. Amazingly, the multiplier will likely continue to increase over time. I don't know if it will accelerate in a way comparable to the Internet coming along (I mean, we had centuries between early really big knowledge multiplier leaps), but it might.
We live in amazing times is what I'm trying to say, and I'm genuinely jealous of kids coming up today, despite some minor caveats. I was bright and curious, and lucky enough to have access to a computer (C64 first, later C128 and Amiga 2000), but the access to knowledge was still quite limited. Internet didn't come for me until I was an adult. Internet and a boundless curiosity and practically unlimited free time is heady stuff.
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.
http://store.curiousinventor.com/guides/Surface_Mount_Solder...
Learning Verilog isn't like learning another programming language - it's an entirely different (though related) field of endeavor.
We have a mandatory course for all CS students at my university where we have to design a full DLX processor in VHDL and run it on a simulator. Just so we can understand how these things work.
So, the average CS graduate from the uni where I am should be able to do this.
And this is just a normal university, I’d expect that the universities with better reputation are doing this on a completely different level even.
It is usually called Software Engineering in Informatics or something similar.
In the universities where you have computing and EE degrees, you are free to mix and match computing and EE lectures for the optional credits that you need on top of the compulsory ones.
Personally I just did some stuff of digital design and ended up spending the rest in systems and graphics programming. But other others were focusing in EE lectures, for example.
He designs circuits and writes firmware code for a living.
[1] http://am.renesas.com/products/mix_sig/graphic/index.jsp
I think if you set a goal like "build x for y" and struggle through it, learning as you go, you'll learn faster because you skip all the stuff you don't need (because you literally didn't need it to hit your goal). And think of all the money you'll save!
Skip college. And if you already went, don't go back!
Most people are not great autodidacts, as shown by the miserable cometion rates of online courses.
Assuming that nobody can predict the future, how can anyone know the usefulness/uselessness of any knowledge?
On the other hand, FPGAs are still complicated pieces of hardware, similar to what a CPU is for normal programming.
It's not like anybody could make an FPGA by themselves in their basement in any reasonable amount of time, with limited resources.
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.
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)
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)."
Then NVidia bought the company.
These pale though in comparison to the two Amiga Rom Kernel Manuals and the Amiga Hardware Manual. [1] These were sold in the computer section of the shopping mall bookstore back in the day, and even today provide a detailed explanation of a multi-tasking operating system and simple graphics programming.
[Edit] Part of the reason why people continue to hack on it is because it is practical. The this-is-how-to-turn-it-on-and-use-the-mouse Introduction to the Amiga 500, it had schematics in the back; pinouts for all the ports; and pinouts and block diagrams for the important chips.
[1] https://computerarchive.org/files/comp/books/amiga/Amiga_Har...
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.
Coursera has a course called the Hardware Software Interface [1] which covers the same material if you want lectures and forums and the other benefits of a MOOC.
Documentation is readily available, along with source code to a number of classic games. There are several emulators and even a small community of people turning out new games for the platform.
The 2600 was/is quirky, and of course it's ancient history, but it does provide a path to learning some basics that still apply today. Most importantly, it's fun.
Start here as a resource - http://www.atariage.com/2600/programming/
Even simpler: Install Visual Studio 2015 Community (the current version) and run the "VS 2015 x86 Native Tools Command Prompt" or "VS 2015 x64 Native Tools Command Prompt" (under Windows 7 in the Start menu under "Visual Studio 2015" -> "Visual Studio Tools" -> "Windows Desktop Command Prompts").
Now simply run
ml
or ml64
(depending on the prompt that you opened). Voila - these are the current x86 or x64 versions (14.00.x) of the Microsoft Macro Assembler.There's GNU as (gas), which I've used quite a bit, but wouldn't really recommend because it uses strange "AT&T" syntax rather than the syntax you'll find in the Intel manuals. gas is also meant more as part of the GCC pipeline than as a standalone assembler, so even though it can function as one, it's not necessarily nice as one.
I've been meaning to play around with the LLVM assembly language. It looks neat, with the bonus of being reasonably portable, but I haven't yet found the time.
HLA (High Level Assembly) by Randall Hyde seems like an interesting way to slowly lower yourself into assembly language programming, but that's not how I cut my teeth, so I can't speak to its effectiveness.
"Say hello to x64 Assembly, part 1" https://news.ycombinator.com/item?id=8245581
(Incidentally, I did a fork of the early stuff just to see what it would look like with gas syntax - the standard for gcc. Now that there's more code in the parent repository, maybe it's time to revisit): https://github.com/e12e/asm/tree/gas-syntax/hello
Another quick intro to 64-bit assembly: https://cs.nyu.edu/courses/fall11/CSCI-GA.2130-001/x64-intro...
A book (I haven't read), but looks ok, from a quick glance at the examples: http://rayseyfarth.com/asm/
http://www.amazon.com/Introduction-Bit-Assembly-Programming-...
For a long time, the best resources were (arguably still are) for 32 bit x86 assembly -- but IMNHO it's rather unpleasant in terms of segmented memory, limited registers, and the C call abi is also a bit "clumsy" if you want to work in assembly as much as possible (again, this has to do with limited registers). That said, Randall Hyde has some great resources on 32 bit assembly:
http://www.plantation-productions.com/Webster/
An older resource, for 32bit assembly: http://www.drpaulcarter.com/pcasm/ I have an old print-out of this on my bookshelf - it's a pretty straight-forward introduction to how one might go about to combine C and assembly. It'd be great to see an updated version for 64bit though.
An operating system in assembler. 32bit version GPL, the 64bit version is as far as I can gather under a more restrictive, source-available license:
Then there's BareMetal Os (I couldn't find any License.txt): https://github.com/ReturnInfinity/BareMetal-OS
There's also a wiki on OS dev: http://wiki.osdev.org/X86-64
I would recommend going through the first tutorial listed above, to get a feel for things. Assembly can be a lot of fun - but I think you'll in general will have a hard time doing better than gcc/clang if speed is your goal. Still useful for stuff like boot loaders and such. If you want to play with OS/boot-loader development, it is easier now than ever before thanks to emulators like Qemu: http://wiki.qemu.org/Main_Page
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.
Nowhere near enough. Spartan-6 LX25 has 936 kbit of block RAM; 800x600x16 requires a little under 8 Mbit without double-buffering.
Read glitches happen when two reads collide, and without any delay mechanism you need to choose which one to drop on the floor. What you do to solve this is implementing busy wait on external bus (/DTACK on amiga), you can also read ahead video output data in chunks (think filling cache line using SDRAM Burst mode) giving you more memory controller time in between.
This is why back in the day different graphic cards delivered different Doom1/2/quake1 fps, while intuitively there should be no difference games being software renderers.
here is a sweet little article By Michael Abrash about vga isa bus hardware optimizations http://www.drdobbs.com/ramblings-in-real-time/184410037
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!
So, compare to the Pi, what information is present, anyone know?
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.
Thanks for sharing your work! This is awesome.
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/06/amiga-500-ide-controlle...
http://amigaprj.blogspot.com/2014/09/8-mb-fast-ram-expander-...
http://amigaprj.blogspot.com/2015/04/scandoubler-ecs-for-a50...
http://amigaprj.blogspot.com/2015/06/amiga-500-68hc000-14-mh...
http://amigaprj.blogspot.com/2015/06/amiga-500-14-mhz-accele...
http://amigaprj.blogspot.com/2015/07/amiga-500-28-mhz-accele...
http://amigaprj.blogspot.com/2015/07/amiga-500-accelerator-c...
http://amigaprj.blogspot.com/2015/09/hc508-amiga-500-68000-5...