Matt's Homebrew GPU

A hobby hardware project · 2020–2021

A homebrew GPU, built from logic chips

It started as a copy of Ben Eater's breadboard VGA card during the 2020 lockdown. A year later it was a tile-based graphics card with 256 colours and hardware scrolling, on its own PCBs, driven by a 6502 computer.

Start with part 1 →

The finished GPU board

The finished GPU

Resolution
400 × 300
Colours
256 (8-bit RRRGGGBB)
Tiles
256 tiles of 16 × 16 pixels
Tile map
256 × 128 tiles (4096 × 2048 px)
Scrolling
Hardware, 12-bit X and Y
Clock
20 MHz
Output
VGA, 800 × 600 @ 60 Hz
Interface
8 data + 5 control lines

The build, in five parts

  1. Part 1 · Sep 2020 – Jan 2021 Building the video card Rebuilding Ben Eater's VGA card on breadboards at twice the clock speed, trimming the sync logic, getting 16 colours out of an EEPROM, and ordering a first PCB.
  2. Part 2 · Jan – Feb 2021 From video card to GPU Game Boy–style tiles and a tile map, 256 colours, RAM instead of EEPROM, and an interface so another computer can draw to the screen.
  3. Part 3 · Mar – May 2021 The final design Hardware scrolling, a multiplexed five-line control interface, an EPROM-driven counter and a PCB in the shape of a PCI-E card.
  4. Part 4 · May – Aug 2021 Connecting it to a 6502 Splitting the GPU into a three-board stack with Ben Eater's 6502 computer on top, first demos in 6502 assembly, and an emulator for both.
  5. Part 5 · Late 2021 The EPIC 6502 Everything on one big purple board: the computer, the GPU and four expansion ports, plus swappable cartridges and Enhanced BASIC drawn in tiles.

About the project

I'm a programmer by trade, and electronics is a hobby I'm teaching myself. After watching Ben Eater's “world's worst video card” series I set out to build my own: first on breadboards, then with higher resolution and better logic, and finally on custom PCBs.

Writing a Game Boy emulator over Christmas 2020 gave me the main idea: store the screen as tiles plus a map of which tile goes where, not one byte per pixel. A slow 8-bit CPU can drive that, and moving a viewport across a bigger map gives scrolling almost for free.

These pages are my original build logs, written as the work happened, with the original photos, diagrams and videos.

The GPU's 256 colours: 3 bits of red, 3 of green, 2 of blue (ideal values; the real resistor ladder was tuned by hand).