What is a TTL computer?

A TTL computer is a computer where the components of the Central Processing Unit (CPU) are made out of individual TTL chips, instead of all of them being integrated on a single microprocessor chip. After the invention of the IC, but before the invention of the microprocessor chip, minicomputers where typically made from these chips. Also many of the earliest arcade games where made out of TTL chips, often more than one hundred of them.

What is TTL?

Transistor-transistor logic (TTL) is a way of building logic gates on ICs, originally by using bipolar junction transistors for both switching (the first “T”) and for output buffering (the second “T”). This method was popularised by the Texas Instruments 7400-series that were introduced in the 1960s. These types of chips are among the first generations of ICs, before the invention of the microprocessor (and before both of us were born). The 7400-family has all kinds of chips with individual NAND/NOR/AND/OR/XOR gates, inverters, buffers and chips with common blocks such as adders, shifters, multiplexers, decoders and flip-flops. They could be combined to build more complex systems, much like LEGO bricks. Later branches of the family use MOSFETs instead of bipolar transistors, but the principles stayed the same and the part numbering became standardised.

Why did you design a computer from such old chips?

Out of curiosity and to reinforce our understanding of computer architectures. And also because we wanted to do something with actual hardware in our spare time. In December 2016 we toyed with the idea of making a TTL computer that would be powerful enough to play Tic-Tac-Toe on an 8×8 LED display. After all, something like this is something every engineer should have done at least once in his or her life time.

It seems it can do more than that. How come?

There are some reference designs out there and we studied most of them. Like many others we then stumbled upon Ben Eater‘s more-than-excellent Youtube series that covers one such a design. In this series he shows a breadboard computer that comes very close to what we wanted to make. Ben’s breadboard computer follows a text book design called “SAP-1” (Simple As Possible). Studying this design it became apparent that this didn’t also mean “Simple As Possible For TTL”: the resulting computer didn’t unleash the full potential of the chips it needed. Unsatisfied, we set out to find a better architecture. Call it feature creep. This study evolved into our own architecture, with the ALU dividing the data bus in two segments for increased throughput and reduced component count. Somewhere along that journey we discovered that low resolution video had come within reach of our design, without adding chips. This was possible by taking the unconventional step of bit-banging video signals from software, instead of designing a conventional video generation circuit. That was the point from where we couldn’t go back anymore: this concept just had to be taken to full completion, including a software stack that demonstrates it all.

What exactly sets it apart from other TTL computers?

The combination of a low chip count with the ability to display video and play interesting, fast scrolling, video games. Other small TTL designs have limited output capability. For example, they could just drive some LEDs or an LCD display. Designs that generate video typically need multiple boards. We blended the video circuit with the processor. One way to see it is as a processor that is powerful enough to synthesise video signals. You can also see it as a video card that can run general purpose software. Most importantly, you can get it as an affordable kit that you can put together yourself and can show off to others. Even if you don’t have a lot of soldering and electronics experience, you can build one yourself. And once you’re bored with the games, it can still function as an interesting looking clock while it is drawing its Mandelbrot fractals.

How fast is the Gigatron?

The computer runs at 6.25 MHz and executes one 8-bit operation per cycle. That is quite fast for the day. The raw computation power (“MIPS”) might very well exceed that of the 8088 CPU in the first 1981 IBM PC. Of course, effectively it loses quite a bit of that speed because, under normal operation, much of that power is needed for synthesising video and sound signals. That is the price to pay for eliminating dedicated circuitry for those functions. But that is also its charm.

Can it run Linux?

This computer is comparable to the 8-bit microcomputers of the 1970s and 1980s. Linux requires a memory management unit (MMU) and a large address space, so it typically needs to run on a 32-bits system or bigger.

Why did you make it into a kit?

A lot of people were immediately enthusiastic when we showed them our prototype and they wanted to have one as well. But it is really a lot of work to figure all of this out from scratch. It takes weeks to build one on a breadboard. You need to collect parts from many places, buy an oscilloscope, and so on, so it becomes expensive. We felt obliged to spread the fun of making your own TTL computer by lowering the bar and turning it into a kit.

Can you still buy these old chips?

Yes, throughout the decades, the 7400-series have remained popular, because these are useful as “glue logic”, where modules in a larger system must be connected. Although the older families have been replaced by more modern IC technologies, and not all type numbers are still useful today, the basic set is still being manufactured, for example by Texas Instruments and Nexperia. We tried to use as much as possible these basic types.

You must be university professors!

No. Just interested in technology. We do both have a computer science background, but not in electrical engineering. Our day jobs have nothing to do with circuit design.

You must be getting rich from this!

Hahaha. For that we are more than 40 years too late. This is a severely niche-market kind of product, and we are selling at a price that no distributor could afford to offer. We’re shipping from our living rooms because it is fun to spread the joy.

What is your ultimate goal?

We will be happy when we have recovered our costs and have been able to share the fun to those enthusiastic about the project. But sometimes, just sometimes, we dream about outselling the Apple 1 computer… But even that one sold for almost 200 units, so when reminded of that we wake up and go back to our day jobs. Maybe a cameo in some movie would also be nice… (Any volunteers to lobby Quentin Tarantino?)

How much does the kit cost?

Our official selling price is 160 euro, but we have an introduction offer at 149.50 euro for as long as the first batch lasts. This excludes shipping costs, and possible PayPal charges if you live outside the European Union where bank transfer can be rather expensive. We are willing to accept Bitcoin as payment to avoid those charges.

How can I get one?

Simply order a kit by sending an e-mail with your address information and preferred payment option to info@gigatron.io and we will reply with an invoice and further instructions. Once you have received your kit you can assemble it on a rainy Sunday afternoon.

Do you ship to France?

Yes. We’re actually from the Netherlands, we intend to ship anywhere.

How much time does it take to assemble one?

Typically 3 to 5 hours, depending on your experience.

But I don’t know how to solder. What should I do?

Don’t be afraid! Marcel didn’t know how to solder when he bought the famous “PiDP-8” kit, and that was one year before the Gigatron was born. It turns out it is pretty simple to learn and not very expensive. Our assembly manual contains a chapter that explains soldering for beginners, with many tips and tricks. In addition we have a small series of videos that go through the assembly process step by step, in case you want to see how it is done.

We recommend that you have put together a smaller project before starting with the Gigatron. You could consider buying a beginner’s soldering kit from places like Conrad. Their “Learning Soldering” practice circuit is in fact harder than the Gigatron, because the Gigatron uses only simple “through-hole” components, and nothing modern, tiny and surface-mounted.

Do I need to have an oscilloscope?

No. Only if you want to design such a thing from scratch, or if you want to hack it to change functionality, you would need something like that. For assembling the kit, a simple multimeter will work just fine.

Can’t I just buy one that is already soldered?

This really depends on how busy we are and possibly on your local regulations. Contact us and we can discuss for your case. We prefer you first figure out if there is another way.

Is there another way then?

One possibility can be to pay a student in your neighborhood a bit to do it for you, or bribe a nephew, make friends at a local hackerspace, or something along those lines. That is probably much cheaper than letting one of us do it.

Can I get just a bag with the electronic parts and the PCB?

Not yet, but we will certainly reconsider when we are past the initial launch phase. Having said that: logistics for options are difficult to handle and the price reduction might not be substantial. We will consider. Until that is clear it is simplest for us now start with one version. Besides, we think the kit is really cool the way it is… 🙂

Can I program it myself?

Sure, there are two ways. The direct way is by reprogramming the EPROM that contains 8-bit Gigatron machine code. You can study our tools on Github, or maybe you want to write your own assembler first: it isn’t hard because the instruction set is simple. We have an instruction set emulator there that unambiguously describes what the computer does. Programming this way you can let the Gigatron do whatever you want. You will need an EPROM eraser and chip programmer, but you can get them cheaply from the usual Chinese vendors. But be warned: if you want to generate video while doing something useful, be prepared to count cycles and make no mistakes doing so. This can be tedious. We don’t have a compiler yet that can do this for you, but such a compiler could be made. (Any volunteers?)

Why is bit-banging VGA tricky?

The concept is very simple, but maintaining a consistent timing is critical: If you miscount a single cycle just once during a frame, many modern LCD monitors will refuse to display an image. The somewhat older monitors are generally more forgiving. Note that the software simulators are so forgiving that they aren’t useful for testing signal correctness.

What is the second way to program it?

The Gigatron emulates a 16-bit processor that always keeps track of the elapsed cycles, called vCPU. This virtual CPU runs its instructions from RAM whenever the video loop permits. The built-in applications are in fact not written in the native machine code, they are written in GCL (“Gigatron Control Language”). GCL is a simple notation that compiles almost 1-on-1 to the vCPU instruction set. Such programs can also be loaded into RAM using the controller port and an Arduino. (So you will need an Arduino, but what kind of hacker doesn’t have at least a few of those lying around?) We still have to make a tutorial on how to do this, but it is in the pipeline. This programming method makes it much easier to write programs for the Gigatron. The interpreted programs run a bit slower than native code, but you will get them working sooner. You can always later transfer GCL fragments to native code, because there are ways to mix the two types of code.

How many instructions does it have?

The 8-bit machine language has 8 operations, 8 addressing modes and 4 bus modes. These can all be selected independently, giving 8x8x4 = 256 instructions. Not every combination is equally useful, and some combinations have the same effect. The 16-bit vCPU interpreter has 34 instructions.

Why didn’t you adopt one of the 6800, 6502, Z80 or 8086 instruction sets? Then you can run a lot of existing software?

Existing instruction architectures work best when implemented on a single chip, where the designer can draw any combination of logic gates as he desires. These architectures don’t necessarily translate very well back to the pre-grouped functions of the 7400-series. The Gigatron is optimised for high 8-bit performance while also minimising the chip count. That requires an instruction set that plays well with these objectives. TTL computers that implement an existing instruction set tend to be rather large and that makes them expensive.

How many logic gates does the processor have?

930, depending a bit on what you include in the count.

Is there a user forum?

Not yet, mainly because we don’t aspire to be forum moderators ourselves. (Any volunteers?) If anyone sets up such a thing, we strongly prefer it to be hosted as part of an existing and related forum. Reddit could also be a nice place, or Stack Overflow.

Can it run CHIP-8 programs?

Not yet, but making a CHIP-8 interpreter for the Gigatron should be a nice weekend project. (Any volunteers?)

Why is the resolution 160×120 pixels. VGA is at least 640×480?

Good question. VGA requires at least a 25.175 MHz pixel clock. The Gigatron can change pixel colors at 1/4th of that speed, so that means that every pixel is four times wider. In the vertical direction, the Gigatron does generate all 480 visible lines. But 32K is not enough to hold that many different scan lines, so by default we change the pixel burst just once every four scan lines.

Many microcomputers had a better resolution?

We have to make a different trade-off to adapt to modern times. VGA requires four times more bandwidth than NTSC/PAL television signals, so the task is four times more difficult today. Many micros in their “hires” mode pushed out just monochrome pixels, using a shift register that ran at a higher speed than the rest of the computer. Then they typically dropped to a lower resolution for more colors. For example, the Commodore 64 gets 160×200 pixels in multi-color mode, and most games preferred to use that mode. To reduce the memory requirements, the micros also had tiling hardware (“characters”). With this extra level of indirection the same pixel information could be displayed at multiple places on the screen. In contrast, the Gigatron normally uses a plain canvas because that is simpler: 1 byte is 1 pixel of any color, and the two unused bits are reserved for the VGA sync signals. We believe it is more useful to have these 64 colors instead of a slightly higher resolution, and more chips dedicated to video. It is good enough for retro games and it reduces complexity. As a side effect, keeping all pixels individually addressable happens to be simpler for the software, as it eliminates lots of bit shifting (and with that, the immediate need for shift support in the hardware).

Why is every fourth scan line black?

Because it gives a really cool retro look, and because it allows more time for the vCPU interpreter to run its applications. You can switch between modes with the [Select] button on the game controller and see what happens.

Does it have sprites?

There are no hardware spites. You have to draw and remove game objects in RAM using software. “Racer” does this for the car.

An alternative is to stream pixel data for game objects directly from EPROM to the output port at exactly the right time. We haven’t explored this route ourselves, as it means you need different kind of loops for sending out the pixel bursts. This way you might make many non-overlapping game objects on a plain background. The lack of such hardware means that you can use the flexibility of software in creative ways.

Can it run Doom?

A 3D maze game should be possible. Adding textures to the walls, as was done in Wolfenstein 3D, might be a stretch goal. Adding enemies might be the hard part, we don’t really know. On the other hand, there is a very impressive version of Doom for the VIC-20, so who knows…

How does the sound work?

There is a secondary output port (XOUT) with 8 bits. It is split in 4 bits for the LEDs, and 4 bits that go into a 4-bit DAC resistor array to form 16 output levels. By default, we have 4 sound channels in software that are 6 bits each internally. At the beginning of each scan line, one of these software channels gets updated to compute a new 6-bits sample. So one software channel update happens during every horizontal VGA sync pulse. After every 4 scan lines, the top 4 bits of their sum gets output to the sound part of the XOUT register.

The 4 software channels can independently generate a tone and a waveform. Some of the preprogrammed waveforms are triangle, sawtooth, pulse and something that resembles noise. It can all be changed of course, as it is all software-defined.

Can the Gigatron be overclocked?

Yes, just replace the crystal with a faster one. The design was made using 70 ns RAM chips and a 160 ns overall cycle time, or 6.25 MHz. For the kit version we included 55 ns RAM chips as they are easier to get in quantity. This means that you can probably push the cycle time to below 150 ns and reach almost 7 MHz out of the box. By using 35 ns RAM you might reach 8 MHz. With a faster TTL series you might even go well over 10 MHz. The board is prepared for overclocking experiments. The RAM is in a socket for easy replacement. The clock signal that goes to the registers is phase-shifted by a few nanoseconds. With the 55 ns RAM this is not really needed, but when you go near the limits these nanoseconds help a lot. There are breakouts on the board for ALU7 and for the clock, to which you can hook up an oscilloscope and check how much leeway there is. (ALU7 is the slowest signal in the design.)

Can I expand the RAM?

Yes, but we haven’t tested it yet. We did made a breakout for the A15 address line so you can connect 64K. The software actually counts, during power-up, the memory and reports it on the startup screen. This number (“32K”) is not a fixed built-in text.

Can I hook up a keyboard?

Maybe, but you might need some extra hardware. We haven’t figured it out yet, but it should be possible if you go back to PS/2 or even matrix keyboards. You could repurpose some of the LEDs to drive signals. Another approach could be to hook up a USB keyboard to an Arduino, connect that to the input port, and tweak with the Loader protocols. Many ideas…

There are so few chips in there, why didn’t they make the micros this way in the 1970s and 1980s?

Excellent question! There are two main reasons. The first is that the idea of RISC didn’t emerge from academia until the late 1970s and it took many more years to find its way into the industry. Traditional CISC architectures have much more complexity. The second reason we won’t reveal, like a magician doesn’t explain his tricks: it is more fun to figure this out by yourself. To help you out, it is not about RAM costs. [Interesting trivia: minicomputers of the day, such as the Xerox PARC, were made out of TTL as well. But they had wider data and address buses. That automatically implies you need a lot more TTL chips and that doesn’t fit on a single small board any more (despite using 74181 ICs for the ALU). They also had a lot more than 32K of RAM and that made them expensive, so perhaps reducing the TTL costs didn’t matter too much.]

So why didn’t you use a 74181 ALU chip in your design?

They are large and relatively complex chips. We thought it is more fun to stick to simpler chips. Also, the “minus A” function is missing in the 74181, and the Gigatron uses that for evaluating conditional branches. And while we would still need two of them to make an 8-bit ALU, they have become difficult to obtain. Last time we checked, Jameco had 6 remaining in stock. We think this is because the 74181 doesn’t have a market nowadays and chipmakers stopped producing them after everything had to be made RoHS compliant. The simpler chips from the 7400-series still have a useful glue-logic function in modern designs and many are still manufactured today for that reason.

The 74HCT chips are not really 1970s, are they?

Neither are the VGA and USB interfaces. But seriously: our prototype was made with 74LS series chips and the 74LS family was introduced in 1971. The kit version uses more power-efficient 74HCT chips, and the 74HC(T) series are from 1983. They use five times less power and are otherwise completely interchangeable. This allows us to safely draw power from any USB port. We made sure to maintain compatibility with 74LS and 74HC, because that gives some more options in sourcing the chips. In fact, we have a fully-populated 74LS PCB version happily computing along at full speed.

Is the kit RoHS compliant?

The components on the board are compliant. Also for the board itself we select “lead-free HASL”. The game controller, we don’t know for sure as they come from “new old stock”.

Why don’t you buy the TTL chips from China, that is much cheaper?

All kit designers we contacted advised us against that, because some batches are known to contain factory rejects or are simply fakes. Taking such a risk is OK for a personal project that you can debug yourself, but for a kit this is not a viable option. All chips must be good and that means relying on trusted sources. So we source these from the usual suspects: Digikey, Mouser, Jameco, Farnell, etcetera.

Can I get the schematics?

Yes. The schematics are included in the assembly manual, for educational purposes, for helping with troubleshooting and for reference when hacking and extending the kit.

Isn’t the Gigatron open source?

The files on Hackaday and Github are licensed under the permissive 2-clause BSD open source licence. This includes the architecture, the instruction set, the software that is in the kit and the tooling to make that. Only the assembly manual and our specific PCB layout are copyrighted, until we have recovered our costs.

Why is that still different?

If you do the math on the back of an envelope, then multiply that by 2 or 3, you will figure out how much it costs to fund the transition from a prototype to a substantial number of kits and corresponding stock. Walter sold his car and Marcel sold his calculator to finance this (so to speak). When we have recovered, we will be more than happy to place the hardware files under an open source license as well.

Why didn’t you do a Kickstarter or other some other form of crowd sourcing?

We think most are just scams, and it costs a lot of effort to produce promotional videos. That is all time and effort we preferred to put in getting the details of the kit right.

Why is there no reset button?

To reduce parts, and to avoid making an unnecessary hole in the enclosure and figuring out how to mount the button and connect it to the board. We found we used a hardware reset only during prototyping of the breadboard design, and never again when that was stable. There is a soft reset by holding the [Start] button down for 2 seconds. Worst-case, simply momentarily unplug the USB cable.

Why are there no interrupts? Even one extra counter would make it simpler to make video signals?

Also to reduce hardware complexity. If software can do it, it is not in hardware.

Why is the address space not linear?

To reduce hardware complexity and to reach the cycle time that allows bit-banging a low resolution video signal. It is faster, and uses fewer ICs, to separate the paths for low and high address bytes. Also this non-linear (call it “planar”) address space has unexpected advantages for scrolling video. “Racer” already exploits this. Still, the 16-bit program counter will cross the page boundary when reaching the end of a page, because that is convenient and doesn’t have other disadvantages.

Are there any shift instructions?

No, we implement them with lookup tables that are actually quite fast and don’t take up a lot of space.

Is there a stack?

There is no hardware stack register, but the vCPU maintains a stack in the top half of the zero page. There are addressing modes that make function calling and returning relatively easy, and dynamic stacks possible when needed. But in reality, most native functions will happily use pre-assigned memory locations for their variables, including return addresses.

Why is there no status register, not even a carry flag?

To reduce hardware complexity. It is not really complicated for the software to figure to what the carry value would be. There are several ways to deal with the missing carry flag: the sound generator uses 15-bit integers (7+8), and the vCPU performs full 16-bit arithmetic.

Can it do floating point operations?

Not yet, but it should be possible to make, or port, a library with such functions. (Any volunteers?) Adding this is a lot more work than just a weekend project, but it would be truly great.

But how about the Mandelbrot fractal? That must use floating point, right?

It uses fixed-point arithmetic made from 16-bit integers.

Could you make one out of discrete transistors?

Maybe. It will be expensive and you need to think really hard about speed so it can still make video. To give an example, the MOnSter6502 is a processor board with 3,218 transistors, but its speed is far below that of the original 6502 chip. Maybe it can be done with Germanium transistors and ECL, a bit how the Cray-1 was made.

Will there be a Gigatron 2?

A completely new design is unlikely. It took almost 6 months to prototype the breadboard, 3 months to layout the PCB and 4 months to write the software for ROM v1. In parallel we had to make countless of small, but important, decisions about the kit edition, component and vendor selection, designing the case, the manual writing, running beta tests, making of instruction videos, exploring shipping and payment options etcetera. It was fun, but it will not be as much fun to do it over again.

So what is next?

Who knows? Making programming more accessible, improving GCL? Exploring the platform as it is, making new games and cool applications? Maybe some hardware hacking? Trying to overclock, making the fastest possible Gigatron? Making one from the oldest parts we can find? Making one without a PCB, everything soldered directly together? Making one from cold-war era Russian clone chips? Many ideas…

My question isn’t in here?

Contact us through any of the means listed on the contact page.

These aren’t all really frequently asked questions, are they?

Of course not, this is a FAQ!