$0000 · Frontispiece Rev 2.1 · May 2026

A homebrew 65C816 single‑board computer. Three RP2354B coprocessors handle video, audio, and the bus. The OS, the windowing layer, and all the compilers are written from scratch.

Architecture
65C816 12 MHz
Memory
2 MB SRAM
Coprocessors
3 × RP2354B
Board
6 layer 122 × 90 mm
$0001The System

An old CPU. New helpers.

The W65C816 ran the Apple IIgs and the SNES. WDC still makes it. On this board it runs at 12 MHz with a single wait state, talking to 2 MB of asynchronous SRAM over a 3.3 V bus.

Around it sit three RP2354B microcontrollers, doing work that real chips would have done in 1985. One handles bus glue and chip selects. One drives HDMI directly out of the RP2350's HSTX peripheral — that's the PRISM video subsystem. One generates 16 voices of PSG and four channels of 48 kHz PCM.

Storage is a regular SD card; the OS reads FAT32 directly, so the same card can be edited on a PC. USB goes through an FE1.1S hub (four ports). An ESP32‑C3 stays powered for Wi‑Fi. A DS1302 with a CR1220 keeps the clock running while everything else is off.

On top of the hardware: HEX/OS, a port of FreeGEM for windows and a mouse, five host‑side cross‑compilers (C, Asm, Pascal, BASIC, ACTION!), and five native languages that run on the machine itself. The IDE is in the Turbo Vision tradition. All of it comes from the same workshop.

┄┄┄┄┄ ◆ ┄┄┄┄┄
$0002Hardware

About 200 parts, 6 layers.

$U1
Central Processing Unit

Western Design Center W65C816S

The 65C816 is the 6502's 16‑bit successor — same instruction set at the bottom, plus 24‑bit addressing and a 16‑bit register file. WDC still makes it. On this board it runs at 12 MHz with one wait state, talking to memory through a fast latch and a 74AHC138 decoder.

  • Clock12 MHz · 1 WS > 6 MHz
  • Address bus24 bit · 16 MB linear
  • Voltage3.3 V · no level shifters
  • PHI2 driverSystem PIO (SYS)
$U18
Bus Glue

74AHC138 · 74AHC573

A 5 ns latch holds the upper address byte. A 7 ns decoder produces eight chip selects, gated by PHI2. Y0 selects SRAM; Y7 loops back to GP33 so the SYS chip can detect a ROM if one is fitted.

$U2-U4
Coprocessors

3 × RP2354B

The biggest member of the RP2350 family, in a QFN‑80 package. Each chip has 2 MB of stacked flash, two Cortex‑M33 cores, and 12 PIO state machines.

$U_VID
Graphics — the PRISM Subsystem

HDMI through HSTX, in software

The video chip pulls a PDI command stream over QSPI from the SYS chip, runs the commands on its Core 1, and shifts TMDS bits straight out of the RP2350's HSTX peripheral. There's no HDMI bridge IC on the board, and no parallel pixel bus.

  • Output640 × 480 · 60 Hz · HDMI
  • Tile modes4 bpp · 8 bpp · L2_FRONT dual playfield
  • Sprites128 × 8 · 32 × 16 · 8 × 32 · h/v flip
  • BlitterCOPY · MASK · 7-minterm OP · LINE
  • SpecialMode-7 via interp · colour math · SLP double buffer
$U_SND
Audio

16 PSG voices · 4 PCM channels

A second RP2354B drives a PCM5102A I²S DAC at 48 kHz, 16‑bit, and feeds the same I²S to the video chip so HDMI audio works out of the box. PSG and PCM mix in a 128 KB sample pool addressed through hardware registers.

  • DACPCM5102A · 3.5 mm TRS
  • Sample rate48 kHz · 16 bit stereo
  • Channels16 PSG + 4 PCM mixer
$U7-U8
System Memory

2 × AS6C8008

2 MB of asynchronous SRAM, split across two 8‑Mbit packages. The 65C816 sees a flat 24‑bit linear address space; the bus glue gates which chip responds.

  • Total2 MB · async SRAM
  • Accessvia SN74AHC573 latch
$U5
USB & Networking

FE1.1S hub · ESP32‑C3

Four downstream USB 2.0 ports through an FE1.1S hub IC. The ESP32‑C3 stays powered for Wi‑Fi; TCP/IP is exposed to programs through extensions to the BDOS.

  • Front panel3 × USB‑A + USB‑C power
  • Internalkeyboard header + ESP32‑C3
  • ESDUSBLC6‑2SC6 per port
$U17
Real Time Clock

DS1302Z · CR1220

A 32.768 kHz crystal, a BAT54 diode, a coin cell, and three GPIOs talking serial. Cached once per second on the SYS chip's second core, exposed in BCD at I/O addresses $E050–$E057.

◇ Memory Map · 24-bit linear
$0000Zero
page
$0080DP
scratch
$0100Stack
$0E00TPA
base
$1000User
program
$8000Heap
$B000CCP
$C000BDOS
$D000BIOS
ROM
$E000I/O
page
$E028FAT
regs
$E040USB ·
mouse
$E050RTC
$E058Net
$E0A0PSG
$E0E5PCM
pool
$0003Software

An OS, a desktop, and a way to write code.

HEX/OS handles disk and network through a CP/M‑style BDOS API, but the disks themselves are FAT32 (so the SD card can move between the HEX‑816 and a PC). FreeGEM sits on top of that, providing windows and a mouse. Code can be written on a host PC (with cross‑compilers) or directly on the machine itself, in 0xIDE.

$03.01
HEX/OSOperating System
Single‑tasking. Borrows CP/M conventions for the API but uses FAT32 underneath, with subdirectories, a network BDOS, and an RTC‑aware filesystem. CCP, BDOS, and BIOS sit at $B000, $C000, and $D000.
$03.02
FreeGEMGraphical Environment
A port of FreeGEM. The VDI driver (37 functions) talks to PRISM through the command stream; AES handles up to 16 windows with drag and rectangle‑list clipping. Four themes ship by default. Two apps come with it: HEX‑Writer (word processor) and HEX‑Calc (spreadsheet).
$03.03
0xIDENative Development Environment
A Turbo‑Vision‑style TUI written for HEX/OS. Gap‑buffer editor, integrated debugger, context help, and seven built‑in languages a keystroke away.
$03.04
HEX STOREPackage Distribution
A package format (.hpk, basically a renamed ZIP), a server in Python and Flask, a 65C816 client called STORE.COM (compiled with llvm‑mos), and a web storefront. Somewhere to find software.
$03.05
HEX Game StudioTooling
An Avalonia / .NET 8 tool for building isometric, room‑based games. Asset pipeline, sprite editor, level layout, and direct export to .816 binaries that run on the machine.
└─┄─┄ ◆ ┄─┄─┘
$0004Programming tools

Ten programming tools. One platform.

Every language has a compiler, a VS Code extension with a debugger, and documentation. The HEX‑ family runs on a host PC and outputs 65C816 binaries. The 0x family runs on the HEX‑816 itself, built with llvm‑mos.

HEX‑ Cross compilers · .NET 8 · host‑side

  • HEX‑C v2.0 A C subset with a hardware debug mode over CDC0. DAP‑compatible. VS Code extension with debugger.
  • HEX‑Asm v0.1 A 65C816 assembler with 35 scopes, 25 snippets, and 177 hover documentation entries. Memory‑map and I/O‑map webviews.
  • HEX‑Pascal v0.5 A Pascal compiler that generates inline assembly, with a 73‑opcode DAP debugger and a shared .dbg format across the family.
  • HEX‑BASIC v0.1 BBC‑style structure with QuickBASIC static typing. 69 keywords. .hbs source and .hbi interfaces.
  • HEX‑ACTION! v2.2 An ACTION! dialect with 103 built‑ins, including hardware, file I/O, and network primitives. CodeGen targets 65C816 directly.

0x Native languages · llvm‑mos · on‑device

  • 0xBASIC An interpreter linkable into 0xIDE. 28 keywords.
  • 0xFORTH v1.0 A Forth with 130+ primitives. About 8 KB once compiled to a .COM.
  • 0xCC A token‑threaded C subset. Uses parallel arrays instead of structs.
  • 0xPASCAL A Pascal subset that compiles on the device. Used for tools and TUI apps.
  • 0xLOGO Turtle graphics on the PRISM bitmap layer. 46 commands.
$00FFColophon

Built from scratch.

Builders

A small group of retro enthusiasts. We handle hardware design, firmware, the OS, the compilers, and packaging.

Built with

KiCad 7 · EasyEDA · JLCPCB · llvm-mos · Pico SDK · CMake · .NET 8 · Avalonia · TinyUSB · Visual Studio Code