Hackaday Prize Entry: You Can Do Anything With A Bunch Of NANDs

Every few years, someone on the Internet builds a truly homebrew CPU. Not one built with a 6502, Z80, or a CPU from the 80s, either: one built completely out of 74-series logic chips or discrete transistor. We’re lucky enough to have [Alexander] document his build on Hackaday.io, and even luckier to have him enter it into this year’s Hackaday Prize. It’s an 8-bit computer built completely out of NAND gates.

Computers are just logic, and with enough NAND gates, you can do anything. That’s exactly what [Alex] is doing with this computer. It’s built entirely out of 74F00 chips – a ‘fast’ version of the ubiquitous quad 2-input NAND chip. The architecture of this computer borrows from the best CPUs of the 70s and 80s. The ALU is only four bits, like the Z80, but also uses the 6502 technique where the borrow is an inverted carry. It’s a small instruction set, a 2-stage pipeline, and should be able to compute one million instructions per second.

Designing a CPU is one thing, and thanks to Logisim, this is already done. Constructing a CPU is another matter entirely. For this, [Alex] is going for a module and backplane approach, where the ALU is constructed of a few identical modules tied together into a gigantic motherboard. [Alex] isn’t stopping at a CPU, either: he has a 16-byte ROM that’s programmed by plugging diodes into holes.

It’s an amazingly ambitious project, and for entering this project into the 2016 Hackaday Prize, [Alex] already netted himself $1000 and a trip to the final round of competition.

The HackadayPrize2016 is Sponsored by:

A $5 Graphics Card For Homebrew Computers

While not very popular, building a homebrew computer can be a fun and rewarding process. Most of the time, though, the video capabilities of these computers is as bare bones as it can get – running headless, connected to a terminal. While this is an accurate reproduction of the homebrew computers of the 1970s and 80s, there’s a lot to be said about a DIY computer with an HDMI-out port.

[spencer] built a Z-80-based homebrew computer a few years ago, and while connecting it to a terminal was sufficient, it was a build that could use a little more pizzazz. How did he manage to stuff a terminal in a tiny project box? With everyone’s favorite five dollar computer, the Raspberry Pi Zero.

The computer [spencer] built already had serial inputs, outputs, power, and ground rails – basically, a serial port. The Raspberry Pi also has TX and RX pins available on the 40-pin header, and with a stupidly simple board that [spencer] whipped up in KiCad, he could plug a Pi into the backplane of his homebrew computer. A few setup scripts, and a few seconds after turning this computer on [spencer] could mash a keyboard and wail away on some old school BASIC.

This isn’t a use case that is the sole domain of the Pi Zero. A Parallax Propeller chip makes for a great video terminal with inputs for PS/2 keyboards and mice. A largish AVR, with the requisite NTSC video library, also makes for a great video interface for a homebrew computer. The Pi Zero is only five dollars, though.


Raspberry_Pi_LogoSmall

The Raspberry Pi Zero contest is presented by Hackaday and Adafruit. Prizes include Raspberry Pi Zeros from Adafruit and gift cards to The Hackaday Store!
See All the Entries

A Smaller, Homebrew Amstrad

Although they weren’t very popular in America, the Amstrad CPC 464 and CPC 6128 were extremely well-received in Europe. [Zaxon] loved his ‘464, and for a bit of a learning experience – and the fact that an Amstrad takes up an exceptional amount of desk space – decided to make a clone of his favorite computer (.pl, Google translatrix).

The clone began as a simple schematic of the original Amstrad CPC 464, but the parts used in the original required some modern equivalents. Still, most of the old chips remained in the clone; the original Hitachi HD46505 CRT controller remains, as do the original DRAM chips and the vintage Z80 CPU.

A few modern amenities were added, including an interface for a PS/2 keyboard and a disk that’s much improved over the original cassette drive or weird 3.5″ disks: a Disk On Module, or basically a CompactFlash card in a strange form factor that plugs straight into a motherboard’s IDE socket. They’re mostly seen when tearing apart old thin clients, but using them in retrocomputing project is a great idea.

Thanks [rasz_pl] for the tip. Video below.

Continue reading “A Smaller, Homebrew Amstrad”

A 4-bit Computer From Discrete Transistors

Anyone reading this uses computers, and a few very cool people have built their own computer out of chips, [zaphod] is doing something even cooler over on hackaday.io: he’s building a computer from discrete transistors.

Building a computer from individual components without chips isn’t something new – Minecraft players who aren’t into cheaty command blocks do it all the time, and there have been a few real-life builds that have rocked our socks. [zaphod] is following in this hallowed tradition by building a four-bit computer, complete with CPU, RAM, and ROM from transistors, diodes, resistors, wire, and a lot of solder.

The ROM for the computer is just a bunch of 16 DIP switches and 128 diodes, giving this computer 128 bits of storage. the RAM for this project is a bit of a hack – it’s an Arduino, but that’s only because [zaphod] doesn’t want to solder 640 transistors just yet. This setup does have its advantages, though: the entire contents of memory can be dumped to a computer through a serial monitor. The ALU is a 4-bit ripple-carry adder/subtractor, with plans for a comparison unit that will be responsible for JMP.

The project hasn’t been without its problems – the first design of the demux for the ROM access logic resulted in a jungle of wires, gates, and connections that [zaphod] couldn’t get a usable signal out of because of the limited gate fan-out of his gates. After looking at the problem, [zaphod] decided to look at how real demuxes were constructed, and eventually hit upon the correct way of doing things – inverters and ANDs.

It’s a beautiful project, and something that [zaphod] has been working for months on. He’s getting close to complete, if you don’t count soldering up the RAM, and already has a crude Larson scanner worked out.

The guts of a Z80 MicroTV Clock

A Z80 Micro TV Clock

As an adventure in computer history, [Len] built up a clock. The Z80 Micro TV Clock brings together a homebrew computer and three Micro TVs into a rather large timepiece.

The computer powering the clock runs the CP/M operating system. This OS was eventually released as open source software, and a variety of homebrew computer projects have implemented it. This clock is based on an existing breadboard CP/M machine, which includes schematics and software.

With an OS running, [Len] got a text editor and C compiler working. Now custom software could be written for the device. Software was written to interact with a Maxim DS12885 Real Time Clock, which keeps the time, and to output the time to the display controllers.

The Micro TVs in this build are Sony Watchman displays featuring a 2″ CRT. The devices had no video input port, so [Len] ripped them open and started poking around. The NTSC signal was found by probing the board and looking for the right waveform.

To drive the TVs from CP/M, a custom video driver was built. This uses three relatively modern ATmega328P microcontrollers and the arduino-tvout library. All of these components are brought together on a stand made from wood and copper tubing, making it a functional as a desk top clock

The Most Minimal Homebrew Computer

Perfection is achieved not when there is nothing more to add, but when there is nothing left to fail. Going by that metric, [Stian]’s three-chip 6502 homebrew computer is the epitome of perfection. It’s a real, working, homebrew retrocomputer using only three chips: a CPU, some RAM, and a microcontroller to bootstrap the computer and provide a video output,

The key to this minimalist build is having the entire boot process controlled by an ATMega16 microcontroller, This interfaces to the 6502 through a dual-port SRAM, a 1 kilobyte Cypress CY7C130. This dual-port RAM allows the CPU and microcontroller to access the same bit of memory, making it easy to bootstrap a computer from a bit of AVR code.

Output is provided with [Stian]’s ATMega video text generator putting a 37×17 characters on any television with an RCA jack. While input isn’t handled yet, [Stian] says it should be possible with his AVR PS/2 keyboard library.

While other 6502 homebrew computers such as [Quinn Dunki] Veronica can reach unparalleled heights of complexity, there is a lot to be said about the minimalism of [Stian]’s three-chip computer. With some clever coding and a modified parts list, it may well be possible to put a retrocomputer in the hands of everyone with a bare minimum of cost and parts.

How To Debug A Faulty Memory Board

ram

While this is not exactly a hack or a fail, it definitely is an inspiring example on how to debug a faulty card.

[Quinn] is one of the very few hobbyists out there that designed her own 6502 based computer. For the young readers of Hackaday, the MOS 6502 was introduced in 1975 and has been used in the Aple // line, the Commodore 64, the Vic-20, the Atari computers, the Nintendo Enterntainment System and others.

[Quinn]’s homemade new RAM board had been working for many weeks until it started to show some weaknesses by only sporadically passing the boot RAM test. Assuming the RAM was the problem, she started by making a more advanced memory test, which showed errors at random addresses.

She didn’t have any more of the same memory chips on hand which could be used with a fresh PCB. Determined to power through the issue, she etched a new board with a new memory design. Unfortunately it also gave memory errors at boot. Only one culprit was left, which is shown in the picture above. It’s a small sizing error in the board artwork which was just enough to cause a misalignment on the connector.

The article contains many details about her debugging process, so it definitely is worth the read.