Skip to content

0xagvz/Chip8-Emulator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Chip-8 Emulator

In this repository you will find an emulator for the CHIP-8 console, written from scratch in C++.

Thanks to Austin Morlan for the excellent guide on how to develop it. You can read it here.

Requirements

  • C++17 compatible compiler (e.g., GCC or Clang)
  • CMake (3.10 or higher)
  • SDL2 for graphics and input handling

How to build it

You can build the project easily using CMake. Open your terminal in the project's root folder and run:

mkdir build
cd build
cmake ..
make

And then, how to Run

Once compiled, you can run the emulator by providing the window width, window height, and the path to a CHIP-8 ROM file.

./chip8_emulator <width> <height> <path_to_rom.ch8>

Where can i find some games?

Here! CHIP-8 Archive - Games for CHIP-8

Controls

The original CHIP-8 used a 16-key hexadecimal keypad (0-F). This emulator maps the original keys to the left side of your keyboard as follows:

Keyboard CHIP-8 Hex Key
1, 2, 3, 4 1, 2, 3, C
Q, W, E, R 4, 5, 6, D
A, S, D, F 7, 8, 9, E
Z, X, C, V A, 0, B, F
  • ESC: Close the emulator.