# Gigatron TTL

The Gigatron TTL is a retro-style 8-bit computer, where the CPU is implemented by a set of TTL chips instead of a single microprocessor, imitating the hardware present in early arcades. Its target is the computing enthusiasts, for studying or hobby purposes.

## Architecture

The CPU is implemented through a small set of TTL 7400 series chips, running at 6.25 MHz base clock rate, that can be overclocked by providing better chips. RAM can also be increased in the same way.
Three CPU modes are implemented:
* 8-bit native assembly code, that implements a Harvard architecture. This mode offers 17 instructions and has room for up to 256 instructions: 8 ALU operations * 8 addressing modes * 4 bus modes. The ROM firmware and the vCPU interpreter are written in the 8-bit native assembly code.
* 16-bit vCPU interpreter, that implements a von Neumann architecture and has 34 instructions. It loads and runs programs from RAM. The integrated programs are written for this vCPU.
* MOS 6502 emulator (experimental), able to run MOS 6502 machine code.
The video output is generated by the ROM firmware (native assembly code), and supports a resolution of 160x120 pixels with 64 colours stored in RAM starting at address 0x0800 and ending at 0x7F9F as 120 segments of 160 bytes of non-contiguous RAM. Pixels are stored as 1 byte per pixel in XXBBGGRR format, (the top 2 bits are unused and may be used by the programmer for their own usage). The video display contains a configurable number of black (empty) scanlines in order to save vCPU time for programs; these empty/black scanlines can be configured by the user to get more displayed raster scanlines or more vCPU time for user programs. Off-screen RAM begins at 0x08A0 and ends at 0x7FFF as 120 segments of 96 bytes of non-contiguous RAM; these fragmented sections of RAM may be used for storing data or code or for scrolling effects using the video indirection table. System RAM is trivially expandable from the default 32K to the full 16-bit addressable size of 64 KB.
The audio is also generated by the ROM firmware during horizontal blanking periods, providing 4 6-bit channels, (software mixed and output at 4-bit PCM), with 4 selectable and user-modifiable 64-byte waveforms stored in RAM, (re-generated at Cold Boot and for ROMv4 and above on all reboots), and providing simple amplitude and XOR modulation per channel.

## Software

The programs are included in the ROM chip, and these are written in GCL (Gigatron Control Language), BASIC or vCPU.
The following programs are included:
* Snake, a simple version of the snake graphical game
* Racer, a Pole Position-like game
* Mandelbrot, a Mandelbrot set image generator
* Pictures, an image viewer for the pre-loaded pictures
* Tetronis, a Tetris clone
* Bricks, a Breakout clone
* TicTacToe, a text-mode tic-tac-toe written in BASIC
* BASIC, a Tiny BASIC interpreter
* WozMon, a Woz Monitor rendition
* Loader, a feature to load vCPU or BASIC programs over the joystick port
* Credits, shows the credits in text that change colours
The Tiny BASIC interpreter allows users to create programs, change the systems parameters, and load and save programs to the non-volatile memory in the built-in keyboard controller.
The software included is licensed under the 2-clause BSD license.

## Assembly kit

The microcomputer is sold as assembling kit, that includes:
* A PCB.
* 7400 series TTL chips.
* A swappable EPROM chip and a socket (for firmware updates).
* A 32 KB CMOS SRAM (upgradable to a 64 KB chip)
* Game controller and VGA (D-SUB) ports.
* USB port and cable for power.
* A game controller similar to the NES one.
* A keyboard controller with built-in non-volatile memory.
* Resistors, capacitors and diodes.
* A set of 4 customisable LEDs.
* Instruction booklet.
* A wooden box for presentation and assembling.
The kit does not include a keyboard nor non-volatile memory. A keyboard controller connectable to the game controller port is shipped with a small built-in non-volatile memory, for storing BASIC programs. An Arduino board can be programmed for interacting between a computer and the microcomputer, as for programming, as well as for additional storage.

## Availability

The kit was available for purchase at €149.50. The updates were provided through a new ROM chip, shipped as an update, that should be changed manually. The original kits are no longer available due to the depletion of the stock and Marcel van Kervinck's death. However, a Dutch company is producing kits for €99.95.
There is also an emulator available online, able to load precompiled vCPU and Tiny BASIC programs.