ch8emu is a simple Chip-8 interpreter written in Rust. This program allows you to run programs written for the Chip-8 virtual machine, a popular platform for retro gaming enthusiasts and hobbyists.
-
Ensure you have Rust installed. If not, follow the instructions at rustup.rs to install it.
-
Clone the repository:
git clone https://github.com/RiccardoSegala04/ch8emu cd ch8emu
-
Build and run the emulator:
cargo run
This will run the default IBM logo test program
-
Load a Chip-8 ROM by providing the file path as a command-line argument:
cargo run roms/your-rom.ch8
-
Try out some of the ROMs in the
roms
directory. You can find more ROMs online, or you can write your own.
This project requires SDL2 to be installed on your system. If you don't have it installed:
- On macOS, you can install it using Homebrew:
brew install sdl2
- On Debian-based Linux distributions, you can install it using apt:
sudo apt-get install libsdl2-dev
- On Red Hat-based Linux distributions, you can install it using yum:
sudo yum install SDL2-devel
- On Arch Linux, you can install it using pacman:
sudo pacman -S sdl2
- On Windows, you can download the development libraries from the SDL website.
The Chip-8 keypad is emulated using your computer's keyboard. The default key mapping is as follows:
1 2 3 C => 1 2 3 4
4 5 6 D Q W E R
7 8 9 E A S D F
A 0 B F Z X C V
Feel free to contribute to this project! Whether you want to add features, fix bugs, or improve documentation, your contributions are welcome.