Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/faizilham/chip8-rs
CHIP8 implementation in Rust, compiled to wasm
https://github.com/faizilham/chip8-rs
chip8 emulator rust wasm
Last synced: 3 months ago
JSON representation
CHIP8 implementation in Rust, compiled to wasm
- Host: GitHub
- URL: https://github.com/faizilham/chip8-rs
- Owner: faizilham
- License: mit
- Created: 2019-11-05T16:04:08.000Z (about 5 years ago)
- Default Branch: master
- Last Pushed: 2022-12-11T14:42:48.000Z (about 2 years ago)
- Last Synced: 2024-08-01T21:39:04.297Z (6 months ago)
- Topics: chip8, emulator, rust, wasm
- Language: JavaScript
- Size: 796 KB
- Stars: 9
- Watchers: 1
- Forks: 1
- Open Issues: 9
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-made-by-indonesian - chip8-rs - `CHIP8 implementation in Rust, compiled to wasm` *by [Faiz Ilham](https://github.com/faizilham)* (C)
- made-in-indonesia - chip8-rs - `CHIP8 implementation in Rust, compiled to wasm` *by [Faiz Ilham](https://github.com/faizilham)* (C)
README
chip8-rs
========
CHIP-8 implementation in Rust, compiled to wasm. [Live Demo](https://faizilham.github.io/lab/chip8/)Features
--------
- 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:1. Shift quirk: opcodes 8xy6 & 8xyE shift Vy instead of Vx
2. Load/Store register quirk: opcodes Fx55 & Fx65 won't increase I register by x + 1
3. 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)
How to Build
------------
Install all the tools needed:
- [Rust toolchain](https://rustup.rs) and [wasm-pack](https://github.com/rustwasm/wasm-pack)
- [NodeJS](https://nodejs.org/en/download/) and [yarn](https://yarnpkg.com/lang/en/)
- (Optional) wasm-opt from [binaryen toolchain](https://github.com/WebAssembly/binaryen)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
Keymapping
----------
```
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
```
Included ROMs
------------
All included [ROMs](roms/) have descriptions and default quirk configuration data, taken from
[mir3z's chip8 project](https://github.com/mir3z/chip8-emu) with some modification