LarssonOliver/zhip8
Zig CHIP-8 Emulator
masterI built this project with the intention of learning Zig. I used the following CHIP-8 references during the implementation process:
Started in Zig 0.10.0, left for a while and then ported to, and finished in
Zig 0.13.0.
The current implementation is lackluster in the graphics department, but this project is not about implementing OpenGL graphics, it is about understanding Zig as a language.
Compilation using zig build produces a ./zig-out/bin/zhip8 binary.
zig build
Help page:
$ ./zig-out/bin/zhip8 --help
[-h] [-f <INT>] <ROM>...
-h, --help
Display this help and exit.
-f, --frequency <INT>
CPU frequency in Hz, default 700.
<ROM>...
Running the unit tests is done with:
zig build test --summary all
The inputs are very rudimentary, but the mapping of keys are as follows:
1 2 3 4 1 2 3 c
q w e r \ 4 5 6 d
a s d f / 7 8 9 e
z x c v a 0 b f
Exiting the program is done by hitting <ESC>.