Crisp8-sdl is a reference frontend for the crisp8 backend using SDL2 for cross platform audio, video and input.
Run the program and supply a rom file:
crisp8-sdl --rom <path-to-rom>
Run the program without arguments or with --help
to print a messsage describing the usage.
Unfortunately modern keyboards lack a good equivalent to the chip-8's keypad. The default mappings are shown in the tables below, but it should be easy to change them by modifying inputCB
in src/callbacks.c
if you so desire.
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 |
Building crisp8-sdl requires a c compiler (mingw gcc on windows or you're on your own), make, cmake, SDL2 and SDL2_mixer. If you're on linux I trust you can install the libraries with your package manager; windows is unfortunately more complicated.
First and foremost you have to clone this git repository to your local machine and cd into it, afterwards follow the instructions for your OS.
- Create a build directory and cd into it
mkdir build
cd build
- Execute cmake. This will also compile and set up linking to crisp8 which is included as a submodule. If you don't want this the easiest way is probably to remove the add_subdirectory part of CMakeLists.txt. Now that I think about it I should probably add an option for that..
cmake ..
- Execute make
make
- Optionally execute make install to install the program to wherever you defined CMAKE_PREFIX_DIR to be
make install
If you only want to install crisp8-sdl and not crisp8 you can run
make install/local
- Profit?
I appologize in advance to everyone who tries this. It works, but it is not fun.
- Install the SDL2 development libraries for mingw from here to a directory of your choice.
- Install the SDL2_mixer development libraries for mingw from here to a directory of your choice.
- Create a build directory in your cloned crisp8-sdl directory and cd into it
mkdir build
cd build
- Execute cmake and set
SDL2_DIR
to<your-sdl2-installed-dir/cmake>
,SDL2_MIXER_PATH
to<your-sdl2_mixer-installed-dir>
cmake -DSDL2_DIR:PATH="<your-sdl2-installed-dir>/cmake" -DSDL2_MIXER_PATH:PATH="<your-sdl2_mixer_installed_dir>" ..
- Execute make (or mingw32-make or whatever you have installed)
mingw32-make
- Execute make install. You have to do this on windows for it to find the libraries properly. Run make install/local If you only want to install crisp8-sdl and not crisp8 (this is probably what you want).
mingw32-make install
Or:
mingw32-make install/local
Q: Why doesn't this use the debugging interface of crisp8?
A: I didn't feel like writing a debugger.
Q: Why doesn't this include my question?
A: Asked questions don't belong in this section.
GPL3