A CHIP-8 interpreter/emulator written in Rust using SDL2 for graphics and input handling.
This project implements a CHIP-8 interpreter, which can run CHIP-8 ROMs. CHIP-8 is an interpreted programming language developed in the 1970s, primarily used for creating simple video games on microcomputers.
- Complete CHIP-8 CPU emulation
- Graphics display (64x32 pixels, scaled for modern displays)
- Keyboard input handling
- Built-in font set support
- Memory management
- SDL2-based rendering
- Rust (2021 edition or later)
- SDL2 development libraries
sudo apt-get install libsdl2-devbrew install sdl2Download SDL2 development libraries from SDL's website or install via MSYS2.
- Clone the repository:
git clone https://github.com/yourusername/chip8-interpreter.git
cd chip8-interpreter- Build the project:
cargo buildTo run the interpreter, load one of the roms in the roms/games folder. For example:
cargo run roms/games/Space_Invaders_[David Winter].ch8src/main.rs: Main entry point and SDL2 initializationsrc/chip8/: Core emulator componentscpu.rs: CPU implementation and instruction handlingmemory.rs: Memory managementdisplay.rs: Display handlingkeyboard.rs: Keyboard input processingconstants.rs: System constants and font data
To run tests, load one of the test roms in the roms/test folder. For example:
cargo run roms/test/1-chip8-logo.ch8This project is licensed under the MIT License - see the LICENSE file for details.