CHIP-8 implementation in Rust, compiled to wasm. Live Demo
-
All CHIP-8 standard features
-
Includes 90 ROMs from CHIP-8 pack
-
Emulates afterglow in old phosphor screen to reduce flickering (can be turned off)
-
Handles 3 implementation quirks that can be enabled:
- Shift quirk: opcodes 8xy6 & 8xyE shift Vy instead of Vx
- Load/Store register quirk: opcodes Fx55 & Fx65 won't increase I register by x + 1
- Sprite wrapping quirk: when parts of sprite are drawn outside of display, wrap it instead of clipping it
-
Lightweight page (transfer size < 30kb, total size < 70kb)
Install all the tools needed:
- Rust toolchain and wasm-pack
- NodeJS and yarn
- (Optional) wasm-opt from binaryen toolchain
Clone this repo and install Node packages
git clone https://github.com/faizilham/chip8-rs.git
cd chip8-rs
yarn install
Build project
yarn build
Build result will be available in dist/
directory
CHIP-8 PC Keyboard
1 2 3 C 1 2 3 4
4 5 6 D Q W E R
7 8 9 E A S D F
A 0 B F Z X C V
All included ROMs have descriptions and default quirk configuration data, taken from mir3z's chip8 project with some modification