Skip to content

Chip-8 emulator written in Zig to practice for more ambitious projects.

License

Notifications You must be signed in to change notification settings

giodueck/Chip-8

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Chip-8

Chip-8 emulator written in Zig to practice for more ambitious projects.

Building

To build, simply run zig build. This will fetch Raylib and build it from source, in addition to the emulator. The binary will then be in zig-out/bin/chip-8.

Running programs

To run a program run:

./zig-out/bin/chip-8 program.ch8

A Chip-8 program consists of a binary file which is loaded into the system's memory and executed. The test roms included in roms/ (source in the Progress & Tests section below) are examples of Chip-8 programs made to test the emulator's accuracy.

For normal programs and games, including ones originally made for Chip-8 interpreters of the gool ol' days, one source is here, but there are many more.

Progress & Tests

Run tests with zig build test or zig test src/test.zig.

The test suite is the one at https://github.com/Timendus/chip8-test-suite. The current progress:

  • CHIP-8 splash screen
  • IBM Logo
  • Corax+ opcode test
  • Flags test
  • Quirks test
  • Keypad test
  • Beep test

Some parts of the code were made with possible variant support in mind. In case I ever implement Super Chip-8:

  • Quirks test
  • Scrolling test

Resources

About

Chip-8 emulator written in Zig to practice for more ambitious projects.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages