I wanted to understand how a computer really works. So I built one.
3RIC is my homebrew, Apple-II-class 65C02 computer: a real processor, RAM and ROM, custom VGA circuitry, a great many logic chips, and a long trail of breadboards.
It started as a learning project. Then I gave myself a target: get Lode Runner running on a computer I designed. That goal pushed me into video timing, memory maps, assembly language, storage, sound, and eventually a custom PCB. After Lode Runner, I aimed higher: Ultima IV. I finished the game on 3RIC.
Watch the 2:45 build overview:
Try the machine yourself: 3RIC Studio runs my emulator in a browser, with no installation or account. The Built from Bits showcase is a quick way into its graphics, sound and editable 65C02 source.
Why build an 8-bit computer now?
I grew up with an Atari 1200XL and a fascination with computers. As a software engineer, I could use a computer, but I wanted a less abstract understanding of how one works.
Ben Eater's 6502 kit gave me a starting point in 2020. Before this project, I had never touched a breadboard or done hardware engineering. I did not begin with the finished machine's design or a clear route to it. I learned enough to solve the next problem, then discovered the next one.
An 8-bit machine is a wonderful scale for that kind of learning. You can follow a keypress through an interface, into a ROM routine, out into memory, and finally onto a display. The wires and timing are visible rather than hidden behind layers of software.
The point was not to outperform a modern computer. It was to build something I could understand, explain, and enjoy using.
A real computer, not just a display demo
The finished machine combines:
- A WDC 65C02, running at approximately 1.573 MHz in the final VGA design.
- Custom hardware-generated VGA, with text, low-resolution color and Apple-II-style high-resolution graphics.
- Shared CPU/video RAM, with timed access so the processor and video circuitry can use the same memory.
- 74-series address-decode and control logic. The earlier 22V10 experiments are part of the history, not the final implementation.
- A 512 KB system flash/ROM device, with banked firmware, monitor and DOS routines. Device capacity is not the amount visible in the CPU's address space at once.
- PS/2 keyboard and mouse, two SNES controller interfaces, and ACIA serial I/O.
- MicroSD/FAT32 storage and a custom DOS, plus a Pico-based Disk II emulation interface for the physical machine.
- Two AY-3-8910 sound chips, driven through two 65C22 VIAs in a Mockingboard-style stereo arrangement: six tone channels, plus the separate system speaker.
The Raspberry Pi Pico in the disk subsystem is a peripheral, not the main CPU and not the source of the machine's VGA graphics. The separate Badger6502 Pico emulator experiments in my channel are related projects, not a substitute for this physical 65C02 build.
The part I am proudest of: video and timing
The Apple II was an attractive target because of its relatively simple graphics hardware and its software library. But recreating its behavior on a VGA display was not simply a matter of copying a memory layout.
The Apple II's famous high-resolution colors arise from the behavior of an NTSC composite signal. I wanted those software-visible color effects on VGA, so I reproduced the artifact-color behavior using logic circuits.
The CPU and video circuitry also share RAM. They must take turns: the CPU uses one part of the clock cycle, and the video hardware uses the other. The video path reads bytes, loads shift registers, and turns their bits into the signal on the monitor.
High-resolution Apple II graphics add another wrinkle: seven displayed pixels per byte, with the remaining bit affecting color timing. I explored a 4046 phase-locked loop to obtain the related pixel clock. The breadboard experiments, oscilloscope traces and color tests were how I learned what the design actually needed.
It is easy to look at...
Read more »
ebadger