Reading — step 1 of 5
Read
~1 min readCHIP-8 Architecture
What CHIP-8 Is
CHIP-8 is an interpreted virtual machine designed in 1977 for hobby computers (RCA COSMAC VIP). It became famous as the simplest possible VM: 35 instructions, 4 KiB RAM, 16 registers, 64x32 monochrome display.
Why emulate it?
- Smallest possible VM: ~500 LOC of Python or C.
- Excellent first emulator project: shorter than NES, simpler than Game Boy.
- Public domain ROMs: Pong, Tetris, Space Invaders.
- Bridge to bigger emulators: same patterns scale to NES, Game Boy.
Specs:
- CPU: custom interpreter, no real chip.
- RAM: 4096 bytes (0x000-0xFFF).
- 0x000-0x1FF: reserved for interpreter (font set lives here).
- 0x200-0xFFF: program ROM + work RAM.
- Registers: 16 8-bit (V0-VF). VF is flag/carry.
- Index register I: 12-bit (memory address).
- PC: 12-bit, starts at 0x200.
- Stack: 16 levels of return addresses.
- Sound timer: 8-bit, 60 Hz. Beeps if non-zero.
- Delay timer: 8-bit, 60 Hz.
- Display: 64x32 monochrome bitmap.
- Input: 16-key hex keypad.
Frequency:
- ~500 instructions per second (variable).
- Timers tick at 60 Hz.
- Display refresh at 60 Hz.
Each instruction is 2 bytes (big-endian). 35 unique opcodes. Easy to decode.
Real implementations:
- Octo (web-based, Tom Wickline): runs ROMs + has IDE.
- mGBA (handheld emulator): supports CHIP-8.
- Many hobby projects in every language.
Modern variants:
- SuperChip (1991): adds 64x64 hi-res mode + more keys.
- XO-Chip (2014): 16 colors, audio, big memory.
For our build: classic CHIP-8 only. Simple + complete.
Reference: Cowgod's CHIP-8 Technical Reference (the canonical doc).
Discussion
Ask a question, share an insight, or help someone who’s stuck.
Sign in to post a comment or reply.
Loading…