Skip to content
A CHIP-8 emulator in Rust
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.


A complete CHIP-8 emulator in Rust, which runs most ROMS you can find in the wild. It keeps the CPU at 500 Hz, and draws onto the screen at 60 Hz.

A demonstration GIF of the emulator running invaders.


Execute cargo run filename, where filename is a file in the roms directory.


Implemented in The cycle function is where most things happen: two bytes are fetched from the program counter, timers are delayed if necessary (at 60 Hz as per spec), and the CPU branches depending on the instruction fetched.

The load_rom function reads and copies a ROM file and in-memory, starting at the program base pointer, at 0x200.

Each instruction is implemented in its own function in that same file.


The CPU writes onto a 64x32 array that represents video memory. A display implementation must read from this array and upscale the source to get something visualizable. This project provides an SFML-based implementation; take a look at for the Display trait definition, and for our implementation.


The CHIP-8 specification requires a single 'beep' sound, which plays as long as the sound timer is not zero. We generate 0.5 seconds of a pure sine wave, which is a bid ad-hoc, but has worked well so far.


The roms folder contains a collection of ROMS from this project: all credits due to the respective authors.


  • Debugger.
  • Assembler/disassembler (from/to Chipper).
You can’t perform that action at this time.