Skip to content

lfritz/chip8

Repository files navigation

chip8

CHIP-8 emulator written in Zig.

CHIP-8 emulator screenshot

I built this as my December Adventure in December 2024 to learn Zig and get a bit of experience with low-level programming. It’s pretty basic, but it does load and run CHIP-8 programs.

The project includes three Zig programs:

main.zig is the main emulator
bin.zig  transforms hexadecimal programs into binary ones
hex.zig  transforms binary programs into hexadecimal ones

The only dependencies are Zig and raylib. Build it with

zig build

The file cafe.hex contains a Hello, World! type program. You can run it with:

zig run bin.zig -- cafe.hex CAFE
./zig-out/bin/chip8 CAFE

For more CHIP-8 programs, take a look at github.com/JamesGriffin/CHIP-8-Emulator/tree/master/roms or github.com/dmatlack/chip8/tree/master/roms. The screenshot at the top is the BRIX game available from both.

About

A CHIP-8 emulator written in Zig

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages