Skip to content

machinetech/chip8

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

71 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

CHIP-8 Build Status

A CHIP-8 and Super CHIP-8 (SCHIP) emulator written in the Rust programming language. A few sample game screenshots below. The project uses the MIT license.

Brix

Brix

There is also a short video clip of the game on YouTube.

Blinky

blinky.png

Space Invaders

space_invaders_title.png

space_invaders.png

Pong

pong.png

Tetris

tetris.png

H.Piper

hpiper.png

Car

car.png

Super Trip

super_trip.png

Super Worm

super_worm.png

Ant

ant.png

Requirements

RUST

The emulator compiles against the master branch of Rust. See the Rust documentation for installation of the Rust binaries, including the Rust package manager Cargo.

SDL2

The emulator uses the cross platform media library SDL2 for access to audio, keyboard and graphics hardware. Windows and Mac OSX binaries are available for download from the SDL website.

Ubuntu:

sudo apt-get install libsdl2-dev
export LD_LIBRARY_PATH="${LD_LIBRARY_PATH}:/usr/local/lib"

HomeBrew:

brew install sdl2  
export LIBRARY_PATH="${LIBRARY_PATH}:/opt/homebrew/lib"

Running games

A few games are included in the roms folder. Many more are available on the internet.

cargo run roms/brix.ch8

Keys

The original CHIP-8 specification had a 16 key hexadecimal keypad with the following layout:

1 2 3 c
4 5 6 d
7 8 9 e
a 0 b f

However, for the sake of convenience, the layout has been remapped onto a standard keyboard. Bear in mind that the documentation for ROMS found on the internet most likely will specify action keys according to the original mapping.

1 2 3 4
q w e r
a s d f
z x c v

Below are some additional keypresses that are also not in the official specification:

Enter or Return Pause
Backspace or Delete Reset
Esc Exit

Code diagram

pong.png

Reporting problems

If anything should go wrong, please report the issue here and I will look into it. Thanks!

References

About

A CHIP-8 and Super CHIP-8 (SCHIP) emulator written in the Rust programming language.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages