Chip-8

A browser-playable CHIP-8 emulator built in C and compiled to WebAssembly.

This browser-playable CHIP-8 emulator is written in C with Raylib and compiled to WebAssembly with Emscripten. Click or tap the canvas to focus it before using the keyboard.

Controls

  • Spacebar: Pause or resume emulation

The emulator uses the standard CHIP-8 hexadecimal keypad layout:

1 2 3 C
4 5 6 D
7 8 9 E
A 0 B F

Build for the Web

Compile the project with the Emscripten SDK and link it against Raylib’s web library:

emcc -o main.html src/main.c -Os -Wall C:/raylib/raylib/src/libraylib.web.a -I. \\
-Iinclude -IC:/raylib/raylib/src -L. -LC:/raylib/raylib/src/libraylib.web.a -s \\
USE_GLFW=3 -s ASYNCIFY -s WASM=1 --preload-file resources@/resources --shell-file minshell.html -DPLATFORM_WEB

Source code: chip8-raylib