Yet another Chip-8 interpreter, this time written in C++ using GLFW and OpenGL as its graphics library. It uses Dear ImGui to draw the GUI.
Because I wanted to get my hands dirty with modern C++. Last time I did C++ was C++98 2 years ago for school.
CPU Interface
2021-10-15-174233-c.mp4
Screen recording of the snake game running with the chip-8 interpreter
In theory, it should run anywhere where Dear ImGui and C++ runs and OpenGL is available. But I only tested it on Windows.
You will need cmake, llvm, make and git.
-
$ git clone https://github.com/gargakshit/chip-8 --recursiveUse
--recursiveas the repo contains GLFW and Dear ImGui as submodules -
$ cmake -Bbuild -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER="clang++" -G "MinGW Makefiles" .This will produce
MinGW Makefileswithclang++as theC++compiler. You can optionally add the flag-DCMAKE_BUILD_TYPE=Releaseto generateMinGW Makefilesfor the release build. The release build is optimized. -
$ cmake --build buildThis will build the binary. If everything is successful, the interpreter binary will be produced with
build/chip8.exeas the path. At this point, you could run your favoriteChip-8"ROMs" by dragging them and dropping it onto the binary in the file explorer, or by using a terminal and runningbuild/chip8 path/to/my/program.ch8. I have included some programs in theprograms/directory to play with (shout out to the original program authors)
You can also build with VS and MSVC toolchains, but I have not tested them personally
Yes.
