Chip8topia is a Chip8 emulator written in C++ for Windows, Linux, macOS and WebAssembly. It uses OpenGL/WebGL for the rendering and ImGui for the UI. The application is compiled with CMake and uses Vcpkg for most dependencies. For the WebAssembly version, it uses Emscripten to compile with vcpkg for most dependencies as well.
It can emulate the original Chip8, the SCHIP1.1, SCHIPC and Xo-Chip.
Platforms:
- Windows
- Linux
- macOS
- WebAssembly
Emulated consoles:
- Chip8
- SCHIP1.1
- SCHIPC
- Xo-Chip
Chip8topia Tools | Chip8topia Debug Tools |
---|---|
Invaders (Chip8) | Car (SCHIP) | T8NKS (Xo-Chip) |
---|---|---|
Alien Inv8sion Title Screen (Xo-Chip Octo) | Alien Inv8sion Gameplay (Xo-Chip Octo) |
---|---|
- Desktop and Web version
- Chip8, SCHIP1.1, SCHIPC and Xo-Chip support
- Pause/Resume/Restart the emulation
- Change the emulation speed
- Change the game colors
- Fullscreen mode
- Rom loader
- Sound
- Registers viewer
- Stack viewer
- Memory Editor
- Virtual Keypad
- Disassembly
- Disassembly controls (break, step, run, reset)
- Breakpoints
- Planes viewer
1 | 2 | 3 | C |
---|---|---|---|
4 | 5 | 6 | D |
7 | 8 | 9 | E |
A | 0 | B | F |
1 | 2 | 3 | 4 |
---|---|---|---|
Q | W | E | R |
A | S | D | F |
Z | X | C | V |
Major:
- Add Xo-Chip audio
Minor:
- Cleanup the full handling of the sound emulation
- Restarting a game when playing big xo-chip games will not reload the game from the start (we should reset memory and reload the game rom)
- Improve disassembly (check TODO in the Chip8topiaDisassembly.cpp and Chip8topiaDisassembler)
- chip8.gulrak.net
- chip-8.github.io
- tobiasvl.github.io
- Timendus/chip8-test-suite
- Timendus/silicon8
- Timendus/alien-inv8sion
- johnearnest.github.io
- johnearnest.github.io/chip8Archive
- johnearnest.github.io/Octo
- jacobsebek SDL2 audio callback demo
- https://github.com/JohnEarnest/chip8Archive
- https://archive.org/details/Chip-8RomsThatAreInThePublicDomain
- Vcpkg
- SDL2
- GLAD
- stb
- spdlog
- ImGui
- ImGuiFileDialog
- ImGui Memory Editor
- ImGuiNotify
- IconFontCppHeaders
- Font-Awesome
- emscripten-browser-file
Before building, be sure to fetch all the git submodules and install vcpkg.
To fetch the submodules:
git submodule update --init --recursive
If you want to update the submodules:
git submodule update --remote
Once you have fetched the submodules and installed vcpkg, you can build the project. Go to the root of the project and create a build directory.
Note Be sure to change the path to vcpkg or emscripten if necessary in the following commands.
Use the following command to set up the build:
cmake -B [build directory] -S . -DCMAKE_TOOLCHAIN_FILE=[path to vcpkg]/scripts/buildsystems/vcpkg.cmake
Then build with:
cmake --build [build directory]
Use the following command to set up the build:
emcmake cmake -B [build directory] -S . -DCMAKE_TOOLCHAIN_FILE=~/vcpkg/scripts/buildsystems/vcpkg.cmake -DVCPKG_CHAINLOAD_TOOLCHAIN_FILE=${EMSDK}/upstream/emscripten/cmake/Modules/Platform/Emscripten.cmake -DVCPKG_TARGET_TRIPLET=wasm32-emscripten "-DCMAKE_EXE_LINKER_FLAGS=-s USE_SDL=2 -s FULL_ES3=1 -s WASM=1 -s EXPORTED_RUNTIME_METHODS=[ccall] -s ALLOW_MEMORY_GROWTH=1 -s EXPORTED_FUNCTIONS=[_main,_malloc,_free] --preload-file ../../Chip8Games --preload-file ../../shaders --preload-file ../../fonts" -DCMAKE_BUILD_TYPE=Release
then build with:
emmake make -C [build directory]
The project uses GitHub Actions to build and publish the desktop builds to the GitHub release page and publish the WebAssembly build to GitHub Pages.
Quentin MOREL :
- @Im-Rises
- https://github.com/Im-Rises