Skip to content

RiccardoSegala04/ch8emu

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ch8emu

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. Screenshot 2024-01-23 alle 18 49 45

Getting Started

  1. Ensure you have Rust installed. If not, follow the instructions at rustup.rs to install it.

  2. Clone the repository:

     git clone https://github.com/RiccardoSegala04/ch8emu
     cd ch8emu
  3. Build and run the emulator:

    cargo run

    This will run the default IBM logo test program

  4. Load a Chip-8 ROM by providing the file path as a command-line argument:

    cargo run roms/your-rom.ch8
  5. Try out some of the ROMs in the roms directory. You can find more ROMs online, or you can write your own.

Dependencies

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.

Controls

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

Contribute

Feel free to contribute to this project! Whether you want to add features, fix bugs, or improve documentation, your contributions are welcome.

About

A Chip-8 emulator written in Rust

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages