Skip to content

An XO-CHIP / SuperChip / CHIP-8 emulator in Rust+WASM

Notifications You must be signed in to change notification settings

dustinbowers/rust-chip8

Repository files navigation

Multi-platform XO-CHIP Emulator

Build action Build action

An XO-CHIP emulator written in Rust using Macroquad for rendering, meant to be compiled to WASM. Includes support for CHIP-8 predecessors as well

Currently supported extensions:

Screenshots

Live Demo

Play with the live demo here: https://dustinbowers.com/rust-chip8

What is CHIP-8?

Chip-8 is a simple, interpreted, programming language which was first used on some do-it-yourself computer systems in the late 1970s and early 1980s. The COSMAC VIP, DREAM 6800, and ETI 660 computers are a few examples. These computers typically were designed to use a television as a display, had between 1 and 4K of RAM, and used a 16-key hexadecimal keypad for input. The interpreter took up only 512 bytes of memory, and programs, which were entered into the computer in hexadecimal, were even smaller.

(source)

Build

The Makefile includes various targets:

Target Description
make build Build debug binary
make release Build release binary
make wasm Build debug WASM
make wasm-release Build release WASM
make web-server Run basic-http-server from the ./dist directory at http://localhost:4000
make build-test-web Build debug WASM and run webserver from ./dist
make build-test-web-release Build release WASM and run webserver from ./dist

Usage

Binary:

Usage: chip8 <Filename> <CHIP Mode> <Ticks-per-frame>

<Filename> - path to ROM File
<CHIP Mode>
        1 - CHIP-8
        2 - SuperChip Modern
        3 - SuperChip Legacy
        4 - XO-Chip
<Ticks-per-frame> - Number of instructions emulated per frame

Locally hosted WASM:

make build-test-web-release

and browse to http://localhost:4000

Note

All ROMs in this repo were gathered together from various places around the internet, and credit for each goes to their respective authors

Useful links

Releases

No releases published

Packages

No packages published