CHIP-8

A complete emulator for the 1977 CHIP-8 virtual machine — 4KB of memory, sixteen registers, a 64×32 phosphor display and a hex keypad — written from scratch in vanilla JS. The three cartridges below are original ROMs, hand-assembled for this page with a custom Python assembler. Or drag any .ch8 file onto the page to run your own.

RUN SND no rom
Cartridges
Keypad
CPU

What is this?

CHIP-8 isn't a physical console — it's a tiny virtual machine from 1977, invented by Joseph Weisbecker so hobbyists could write games for the COSMAC VIP microcomputer in a compact interpreted bytecode instead of raw 1802 assembly. It's the "hello world" of emulation: 35 two-byte opcodes, 4KB of RAM, sixteen 8-bit registers (V0–VF), a 64×32 monochrome XOR display, two 60Hz timers and a buzzer.

This page implements the whole machine: every opcode, the timers, sound, sprite collision flags, and both common compatibility profiles (modern behavior by default; tick COSMAC quirks for original-1977 shift and memory semantics — some older ROMs need it). Pause it and use Step to single-step the CPU while watching the registers.

Keys

The CHIP-8 hex keypad maps to your keyboard like this (tap the on-screen keypad on mobile):

Keyboard1 2 3 4Q W E RA S D FZ X C V
CHIP-81 2 3 C4 5 6 D7 8 9 EA 0 B F

About the ROMs

Emulators are legal; game ROMs usually aren't. So instead of shipping someone else's games, the three cartridges here were written for this page from scratch — a ~100-line Python assembler DSL emits the bytecode, and a reference interpreter verified each ROM headlessly before it ever touched the browser. Paddles is 324 bytes; the entire starfield demo is 103. Writing for a machine this small is a puzzle in itself.

⬇ Drop a .ch8 file anywhere on this page to run it. Homebrew ROMs are freely available from the CHIP-8 community if you want to test drive more.