Skip to content

ashmitahaldar/mayoCHIP8

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 

Repository files navigation

A CHIP-8 emulator written in C++.

Future extensions:

  • Add sound
  • Create basic GUI taskbar, for loading ROMs etc.
  • Create debugger

Referenced from the following links:

Building

Prerequisites

  • C++17 compatible compiler (clang, g++, MSVC)
  • CMake 3.16 or later
  • SDL2

macOS

Install SDL2 via Homebrew:

brew install sdl2

Linux

sudo apt-get install libsdl2-dev

Windows

Download SDL2 development libraries from libsdl.org

Build Steps

cmake -S . -B build -DCMAKE_BUILD_TYPE=Release
cmake --build build

If CMake can't find SDL2, specify the path:

cmake -S . -B build -DSDL2_DIR=/opt/homebrew/lib/cmake/SDL2 -DCMAKE_BUILD_TYPE=Release

Running

The emulator requires three command-line arguments:

./build/mayochip8 <scale> <delay> <rom_path>
  • scale: Window scale factor (e.g., 10 for 10x zoom)
  • delay: Cycle delay in milliseconds (e.g., 2)
  • rom_path: Path to a CHIP-8 ROM file

Example

./build/mayochip8 10 2 roms/test_opcode.ch8

Controls

  • X → 0
  • 1-3 → 1-3
  • Q-E → 4-6
  • A-D → 7-9, A-C
  • Z-C → D-E, F
  • ESC → Quit

About

A CHIP-8 emulator written in C++.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors