Skip to content

3mpee3mpee/chip-8-rust

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

CHIP-8 Emulator in Rust

A simple, cross-platform CHIP-8 emulator written in Rust. This project aims to provide a clean, idiomatic, and educational implementation of the classic CHIP-8 virtual machine, including graphics, keyboard, and sound support.

Features

  • Full CHIP-8 instruction set support
  • 64x32 monochrome display with scaling
  • Keyboard input mapping
  • 8-bit delay and sound timers
  • Beep sound when the sound timer is active
  • Modular, idiomatic Rust codebase

Getting Started

Prerequisites

  • Rust (latest stable recommended)
  • Cargo
  • rodio (audio backend, added as a dependency)

Building

Clone the repository:

git clone https://github.com/3mpee3mpee/chip8emu.git
cd chip8emu

Build the project:

cargo build --release

Running

To run the emulator with a CHIP-8 ROM:

cargo run --release -- path/to/your_rom.ch8

Controls

  • CHIP-8 keys are mapped to your keyboard (see src/keyslog.rs for details).
  • Press Esc or close the window to exit.

Project Structure

  • src/cpu.rs — CPU, registers, and timer logic
  • src/memory.rs — Memory and fontset
  • src/instructions.rs — Instruction decoding and execution
  • src/display.rs — Display rendering and main loop
  • src/audio.rs — Sound timer and beep playback
  • src/emu8.rs — Emulator initialization
  • src/keyslog.rs — Keyboard mapping

Screenshots

pingpong airplane

Credits


Happy emulating!

About

CHIP-8 Emulator in Rust

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages