Skip to content

JustDoom/8ChocChip

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

8ChocChip

Discord X (formerly Twitter) Follow Static Badge GitHub

8ChocChip is a Chip8 emulator. It was created to help me learn and understand how emulators work. I plan to support other Chip8 variants in the future with many other features like save states, per program configs, etc.

Features

There are a couple of things left to do until I would say it works well enough

  • Proper flag/feature compatibility unlike many out there
  • Get emulator to run at a decent speed
  • Windows Support
  • MacOS Support
  • Switch to SDL from SFML
  • Save state
  • Configurable keys
  • Database for auto setting selector
  • Other Chip8 variants
  • Per program settings (Keybindings, graphics, sounds, etc)
  • Discord Rich Presence support
  • JIT mode
  • Proper installation method

Supported Platforms

  • GNU/Linux - Should work on any distro that will let you run plain executable files from the last few years at least
  • Windows 7 - Make sure to install Visual Studio 2017 Needs testing since I changed some compiler stuff
  • Windows 8(.1), 10, 11
  • Windows 95
  • Windows 98
  • Windows XP
  • Windows Vista
  • MacOS 9
  • MacOS X
  • MacOS

Usage

Just launch the downloaded executable and you are good to go. Some programs/games can be found here.

For a proper test suite you can check out https://github.com/Timendus/chip8-test-suite

Commands

--speedtest - Enabled speedtest mode. Can slightly increase performance by disabling some features that stop it from running at full speed.

--rom <path to rom> - Immediately launches into the specified ROM instead of the menu.

--instructions <instruction count> - The amount of instructions to run per frame (60fps).

--debug - Enabled printing extra debug information to the console

Building

Debian/Ubuntu

Install dependencies

sudo apt-get install build-essential git make \
        pkg-config cmake ninja-build gnome-desktop-testing libasound2-dev libpulse-dev \
        libaudio-dev libjack-dev libsndio-dev libx11-dev libxext-dev \
        libxrandr-dev libxcursor-dev libxfixes-dev libxi-dev libxss-dev libxtst-dev \
        libxkbcommon-dev libdrm-dev libgbm-dev libgl1-mesa-dev libgles2-mesa-dev \
        libegl1-mesa-dev libdbus-1-dev libibus-1.0-dev libudev-dev \
        libpipewire-0.3-dev libwayland-dev libdecor-0-dev liburing-dev

Clone the repository through the command line, or another option you may have

git clone https://github.com/JustDoom/8ChocChip.git

Download and project dependencies

git submodule update --init --recursive

Configure CMake

mkdir -p build
cd build
cmake .. -DCMAKE_BUILD_TYPE=Release

Build

cmake --build . --config Release

The generated files will be inside the build/bin directory

Windows

I don't have a Windows machine set up to test so for now just follow the workflow

Credits

Thanks to these two blogs that helped me through creating this emulator.

Libraries