Skip to content

iensu/chipeyte

Repository files navigation

Chipeyte - a Chip-8 emulator

A Rust implementation of the Chip-8 emulator.

Chipeyte running Space Invaders

Running the emulator

Requirements

Instructions

  1. Clone this repository.
  2. Build the executable by running $ cargo build --release --features "sdl2-ui" in the project root directory.
  3. Find some game ROMs, I recommend Zophar Domain's Chip-8 Games Pack
  4. In the project root directory, run $ ./target/release/chipeyte path/to/the/game

Using Nix

If you use Nix with Flakes support you can run Chipeyte like so without the need to install any of the required software listed above.

$ nix run .# ./programs/drawing01.c8

Controls

Original Chip-8 keyboard had 16 buttons with the following layout:

,---------------.
| 1 | 2 | 3 | C |
|---|---|---|---|
| 4 | 5 | 6 | D |
|---|---|---|---|
| 7 | 8 | 9 | E |
|---|---|---|---|
| A | 0 | B | F |
`---------------´

In Chipeyte, this has been keyboard layout translated into:

,---------------.
| 6 | 7 | 8 | 9 |
|---|---|---|---|
| Y | U | I | O |
|---|---|---|---|
| H | J | K | L |
|---|---|---|---|
| N | M | , | . |
`---------------´

Motivations

The purpose of this project is to learn the lower-level workings of a simple computer as well as basic systems programming in Rust.

The goal is to implement a working Chip-8 simulation not looking at any implementation examples, but solely through reading documentation about the workings of the Chip-8 language.

References and sources

How to write an emulator

Cowgod's Chip-8 reference

http://mattmik.com/files/chip8/mastering/chip8.html

Chip-8 manual

Wikipedia: CPU

About

A Chip-8 implementation in Rust

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published