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 normally requires a memory management unit (MMU) and a large address space, so it typically needs to run on a 32-bits system or bigger. But then there is this, so never say “never”. (Any volunteers?)
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.
What’s your background?
We’re just interested in technology and old computers. We do both have a computer science background, but not in electrical engineering: the Gigatron is a hobby project for us. Our day jobs are in information security and in IC manufacturing, and have not much to do with circuit design at all.
You must be getting rich from this!
For that we are more than 40 years too late… But seriously: this is a severely niche-market kind of “product” with many parts from many vendors. So that means low volume series, low discounts and quite a bit in overhead costs, taxes and import fees. The logistics and support turn out to be surprisingly labor intensive. Even if you ignore the many hundreds of hours from the design and kit preparation phases, it is more profitable to find a minimum wage job. We are selling at a price that no distributor could afford to offer and we are shipping from our living rooms because it is fun to spread the joy. The real reward is all the nice people we get to meet through this project, and that is worth a lot.
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?
We have an introduction offer at 149.50 euro. This excludes shipping costs, and possible PayPal charges if you live outside the Europe, 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 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. You can find pricing, options and contact details on the “Get One!” tab.
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 4 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. Something simple is good enough practise. 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. There is also a similar Velleman MK102 kit that you can buy at several places such as Amazon.
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 program it myself?
The easiest is to use the built-in BASIC interpreter. If you have the Ardiuno setup to hookup a computer, or if you have the “Pluggy McPlugface” keyboard adapter, you can load BASIC with the Loader application, regardless of the ROM version you run. If you have ROM v3, you can also start BASIC directly from the main menu.
Our BASIC is an extension of the original Tiny BASIC as published in the very first issue of Dr. Dobbs Journal in 1976. Tiny BASIC was an integer BASIC. For the Gigatron we extended it with FOR-TO-NEXT loops, arrays, a line drawing command and some more. Small programs can be saved.
Can I program it in assembly?
Sure, there are two ways. The hardcore way is by writing native 8-bit Gigatron machine code. This means reprogramming the EPROM, because this is a Harvard architecture (the RAM chip is used as its data memory). 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. In reality you will do all testing in an emulator first.
You can study our tools on GitHub, but maybe you want to write your own assembler first: that isn’t really hard because the instruction set is very simple. We have an instruction set emulator that unambiguously describes what the computer does.
This is as close to the hardware as you can get without actually rewiring it. Writing native code means that if you want to generate valid video signals while doing something useful, you should be prepared to count cycles and make no mistakes. This can become tedious and is not for the faint of heart. We don’t have a compiler (yet) that can do this for you, but such a compiler could be made. (Any volunteers?)
What is the second way to program it in assembly?
The Gigatron code emulates a 16-bit processor that, amongst others, keeps track of elapsed cycles, called vCPU. This virtual CPU reads and executes its instructions from RAM whenever the video loop permits. The built-in applications are in fact written for this vCPU. There is an assembler for this vCPU in GitHub that works for Windows and Linux. The vCPU implements a Von Neumann architecture, and therefore its programs must first be loaded into RAM. This can be done over the controller port using an external device. We prefer to use the Arduino as such external device because they are flexible and cheap. So you will need something like that, but what kind of hacker doesn’t have at least a few of those lying around?
The nice thing is that once your program works, you can also put it back into an EPROM without ever worrying about 8-bit native code and video signal timing. This is because in reality the EPROM acts for the largest part as a ROM disk that holds vCPU programs. For reference, all programs in the main menu are first loaded to RAM before execution.
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 vCPU fragments to native code, because there are ways to mix the two types of code though a mechanism called “SYS extensions”.
How many instructions does it have?
Our 8-bit assembler distinguishes between 16 instructions:
Memory load/store: LD ST Logical operations: ANDA ORA XORA Arithmetic operations: ADDA SUBA Unconditional jumps: JMP BRA Conditional jumps: BGT BEQ BGE BLT BNE BLE No operation: NOP
But these are just names, and you can equally well say that there are 8 instructions, or 256. The opcode encoding supports 8 ALU operations, 8 addressing modes and 4 bus modes. These can all be selected independently, giving 8x8x4 = 256. Not every combination is equally useful, and some combinations have the same effect.
The 16-bit vCPU interpreter has 34 instructions:
ADDI ADDW ALLOC ANDI ANDW BCC BRA CALL DEEK DEF DOKE INC LD LDI LDLW LDW LDWI LSLW LUP ORI ORW PEEK POKE POP PUSH RET ST STLW STW SUBI SUBW SYS XORI XORW
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 or she 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?
The official forum is forum.gigatron.io with sections on kit assembly and hacking for both software and hardware.
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 Crysis? (or Quake, or Doom, or Wolfenstein, or …)
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 7-8 MHz out of the box. By using faster RAM and 74F 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. 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?
Hookup of a modern USB or PS/2 keyboard using the Arduino extension is rather straightforward. For PS/2 there is code in GitHub, demonstrated in this video:
The Arduino is overkill. Exactly the same can easily be achieved with a tiny home-made adapter:
With this you can control the Gigatron, but also for example use Woz Monitor, as on an Apple-1.
Direct hookup (meaning: without any complex chips added to the mix), is a bit harder nut to crack. We haven’t completely figured it out yet because each keyboard type presents its own challenges. We feel that direct USB hookup, without microcontroller support, is out of reach. Direct hookup might be possible if you restrict yourself to matrix keyboards. There are ideas flowing in the forum.
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 just about RAM costs, and Intel introduced some very fast RAM in 1977…
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). As they had a lot more than 32K of RAM that made them expensive, so perhaps reducing the TTL complexity didn’t matter too much.
Is there an expansion bus?
We figure you can expand through the RAM socket which has almost all lines needed. In its vicinity the board has breakouts for the extra A15 address line and the clock.
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.
How does the ALU work?
It is a two-stage design. Stage one is a row of multiplexers that can do logical operations on the two 8-bit input values. It emits the left and right operands to the second stage. The second stage is an addition stage made from two 4-bit adders.
The first stage is flexible: it is not restricted to the common AND, OR, XOR etcetera. It is controlled by a truth table that comes out of the control unit. The truth tables for the different operations are wired in a diode matrix. If you know where to look, you can see the operations! A diode represents a “1”, the absence of a diode represents a “0”.
The idea of making a logic stage out of multiplexers comes from Dieter Müller (http://6502.org/users/dieter/a1/a1_4.html). Its flexibility allows negation of the A input, which is something the 74181 doesn’t offer. The Gigatron uses that to drive its condition decoder. So it all fits nicely together.
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 and for the board itself we select “lead-free HASL”. The game controllers are “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: Digi-Key, Mouser, Jameco, Farnell, etcetera.
Can I get the schematics?
The schematics are included in the assembly manual, for educational purposes, for helping with troubleshooting and for reference when hacking and extending the kit. They are also on the Hackaday project pages as PDF file. The files on Hackaday and GitHub are licensed under the permissive 2-clause BSD open source licence. This includes the architecture, the instruction set, schematics, the software that is in the kit and the tooling to make that.
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 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.
Why are there no interrupts? Even one extra counter will make it simpler to make video signals?
Also to reduce hardware complexity. If software can do it, it is not in hardware.
Can I put the ICs on sockets?
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?
Our focus now is on making programming more accessible, together with finding some way to hookup a keyboard.
After that, who knows? 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? Making one that runs at one millionth of the speed and with LEDs on all signal lines? Many ideas…
My question isn’t in here?
Contact us through any of the means listed on this page below (“FIND US”).
These aren’t all really frequently asked questions, are they?
Of course not, this is a FAQ!