Skip to content

gopi487krishna/zc8

Repository files navigation

zc8

Build Passing

zc8 is a lightweight Chip-8 emulator implemented in Zig, designed to provide a clean and minimal implementation of the classic Chip-8 virtual machine. It is well-suited for experimentation, and running retro games.

The emulator is compiled to WebAssembly using Emscripten, allowing it to run directly in the browser. SDL3 is used for handling graphics and input and sound.

This project was developed as a way to gain hands-on experience with Zig, WebAssembly, Emscripten, and emulator development.

https://zc8.cooldev.in/

📸 Screenshots

Pong Blinky
Space Invaders Breakout

🔨 Building zc8

Setting Up Dependencies

NixOS

nix develop

Note

To Resolve the emscripten cache issue : NixOS/nixpkgs#139943 (comment)

Non NixOS

Compiling zc8

zig build -Dtarget=wasm32-emscripten -Doptimize=Debug --sysroot "$(em-config CACHE)/sysroot"
  • Copy over the zc8.js and zc8.wasm to website directory and run emrun index.html inside website directory

Running Tests

zig build test --summary all

📚 Resources

Website Design Ideas

📥 Contributing

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

Please make sure to update tests as appropriate.

📜 License

MIT

About

A chip 8 emulator written in Zig

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published