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.
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
- 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 2017Needs 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
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
--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
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
I don't have a Windows machine set up to test so for now just follow the workflow
Thanks to these two blogs that helped me through creating this emulator.
- Timendus Chip8 Test Suite - An incredible test suite for Chip8
- Guide to making a CHIP-8 emulator - This one is a great resource on creating a proper emulator
- Emulator Development Discord - A really nice discord about emulator development
- SDL - UI, graphics, input and sounds
- SDL-ttf - Text fonts
- SDL-image - Images
- nlohmann/json - Library to manage save data (like directories that hold ROMs) and possible future config files
- nicbarker/clay - UI layout library