Credit to: https://tobiasvl.github.io/blog/write-a-chip-8-emulator/ https://en.wikipedia.org/wiki/CHIP-8 for explanations on how the chip8 interpreter works.
https://austinmorlan.com/posts/chip8_emulator/ for implementations of some opcodes.
Raylib was used for handling graphics and controls, as well as the build template. https://github.com/raysan5/raylib
ALL Operating Systems require a C compiler.
GCC is recommended
Windows will either require MinGW64 or Visual Studio to be installed.
Linux will require packages for:
ALSA for audio, Mesa for OpenGL accelerated graphics and X11 for windowing system.
The raylib quickstart template is included. Reference https://github.com/raylib-extras/raylib-quickstart for details on how to run the build script for your specific OS.
The following steps do NOT apply to Windows
- Go into
build
directory$ cd build
- Run premake script:
Windows:
$ .\premake5.exe gmake2
MacOS:$ ./premake5.osx gmake2
Linux:$ ./premake5 gmake2
- Go back into root and run
$ make
- Executable will be in
bin/Debug/
- Run
build-MinGW-W64.bat
- Run the generated
.sln
file - Develop the game in Visual Studio
There are some test ROMS included. You can either run those or your own chip8 roms.
Syntax for using the emulator: $ ./chip8 <scale-factor> <path-to-rom>