o
odinpkg.dev
packages / library / chip8-odin

chip8-odin

f578cc7library

Chip-8 Emulator in Odin

No license · updated 6 months ago

Screenshot

Introduction

This is a CHIP-8 Virtual Machine built in Odin.

Resources

These were the most useful CHIP-8 references used during development:

Requirements

You need to have SDL2 installed, including development headers.

On macOS:

brew install sdl2

If necessary, ensure your library path includes SDL2:

export LIBRARY_PATH="$LIBRARY_PATH:/opt/homebrew/lib"

On Ubuntu/Linux:

sudo apt update
sudo apt install libsdl2-dev pkg-config

Make sure you also have Odin installed. You can download it from odin-lang.org or install it via package manager.

Usage

To use this project, follow these steps:

  1. Clone the repository to your local machine:
git clone <repository_url>
cd <repository_name>
  1. Build and run the program with the path to your game file:
cd src
odin build . -file -out:../chip8
../chip8 /path/to/game

Or build and run in one step:

cd src
odin run . -- /path/to/game

Debug Logging

Debug logging is enabled by default and outputs to debug.log. The logger is configured in the main procedure.

Games

You can find public-domain CHIP-8 games here.

License

This project is released under an open license for educational and personal use.