Skip to content

tklynsma/chip8

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Chip8 emulator

Description

A CHIP-8 emulator written in C++ using SDL2.

CHIP-8 is an interpreted programming language, developed by Joseph Weisbecker. It was initially used on the COSMAC VIP and Telmac 1800 8-bit microcomputers in the mid-1970s. CHIP-8 programs are run on a CHIP-8 virtual machine. It was made to allow video games to be more easily programmed for said computers. (From wikipedia)

Screenshots

Brix

Ufo

Build & Usage

This project requires cmake, SDL2 and SDL2_mixer. For compilation run the following commands:

mkdir build
cd build
cmake ..
make

This should create two executables: chip8_emulator and chip8_tests. To use the emulator you need to provide the path to the ROM file as argument. Some existing ROM's can be found in the /roms directory. For example to load Tetris use:

./chip8_emulator ../roms/Tetris

Input

The computers which used the Chip-8 VM had a 16-key hexadecimal keypad. This layout has been mapped as follows:

   Hex. Keypad                      Keyboard
+---+---+---+---+               +---+---+---+---+
| 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 |
+---+---+---+---+               +---+---+---+---+

In addition it is possible to increase the emulation speed by pressing + and to decrease the emulation speed by pressing -. Note that this does not affect the delay and sound timers, which are both updated at a constant rate of 60Hz.

Resources

About

Chip-8 emulator written in C++ using SDL2.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published