o
odinpkg.dev
packages / library / odin-chip8

odin-chip8

687e3dalibrary

A CHIP-8 emulator written in Odin.

MIT · updated 1 year ago

odin-chip8

A CHIP-8 emulator written in Odin.

odin-chip8

Building and running

Note: This has only been tested on macOS arm64, but it should work on all platforms on which Odin can run.

Desktop

  • Build the application.
make build-desktop
  • Run the application and pass a ROM as the only positional argument.
./build/desktop/app.bin ../../roms/BRIX

Web

Note: The web build is currently hardcoded to the Space Invaders ROM.

  • Build the application.
make build-web
  • Run it.
cd build/web
python -m http.server # or your preferred method for running an HTTP server
  • Navigate to http://localhost:8000

As a library

Raylib is used as the frontend in the app package in this repository, however, there is no particular frontend implementation tied to the CHIP-8 library in lib/chip8. You could use the chip8 package as an emulator library and add your own frontend with another graphics library in place of Raylib or the web build.

Why?

I'm early in my Odin learning and emulators have begun to interest me, so it seemed like a great opportunity to combine the two. Yes, there are many CHIP-8 emulators out there, but this one is mine written in Odin.

Acknowledgements

License

MIT