README.md 3.65 KB
Newer Older
João Magalhães's avatar
João Magalhães committed
1
# [CHIP-Ahoyto](https://chip-ahoyto.joao.me) 🍪
João Magalhães's avatar
João Magalhães committed
2

João Magalhães's avatar
João Magalhães committed
3
CHIP-8 emulator written in Rust 🦀.
4

João Magalhães's avatar
João Magalhães committed
5
6
The goal of this project is purely experimental and a learning tool for rust.

João Magalhães's avatar
João Magalhães committed
7
8
The work of this emulator was inspired/started by [jc-chip8](https://github.com/joao-conde/jc-chip8).

João Magalhães's avatar
João Magalhães committed
9
You can check a working version of the emulator at **[chip-ahoyto.joao.me](https://chip-ahoyto.joao.me)**
João Magalhães's avatar
João Magalhães committed
10

11
12
13
## Goals

* Performance 🏎
João Magalhães's avatar
João Magalhães committed
14
* Separation of concerns 🖖
João Magalhães's avatar
João Magalhães committed
15
16
* Simplicity 😀
* Compatibility 🪛
17

João Magalhães's avatar
João Magalhães committed
18
19
## Features

João Magalhães's avatar
João Magalhães committed
20
* Drag and drop support for ROMs
João Magalhães's avatar
João Magalhães committed
21
22
23
* Pallet switching
* Visual diagnostics
* Variable CPU frequency
24
25
26
* Multiple engine implementations (classic and neo)
* Full compliant with test CHIP-8 ROMs
* RAM snapshot saving and loading
João Magalhães's avatar
João Magalhães committed
27
* [WebAssembly](https://webassembly.org) support 🌐
João Magalhães's avatar
João Magalhães committed
28

29
30
## Deployments

João Magalhães's avatar
João Magalhães committed
31
32
| Provider  | Stable  | URL                                                                  |
| --------- | ------- | -------------------------------------------------------------------- |
João Magalhães's avatar
João Magalhães committed
33
| Cloudfare | `True`  | [chip-ahoyto.joao.me](https://chip-ahoyto.joao.me)                   |
João Magalhães's avatar
João Magalhães committed
34
| Netlify   | `True`  | [chip-ahoyto.netlify.app](https://chip-ahoyto.netlify.app)           |
João Magalhães's avatar
João Magalhães committed
35
| Cloudfare | `True`  | [chip-ahoyto.joao.me](https://chip-ahoyto.joao.me)                   |
João Magalhães's avatar
João Magalhães committed
36
| Cloudfare | `True`  | [chip-ahoyto.pages.dev](https://chip-ahoyto.pages.dev)               |
37
| Cloudfare | `True`  | [prod.chip-ahoyto.pages.dev](https://prod.chip-ahoyto.pages.dev)     |
João Magalhães's avatar
João Magalhães committed
38
| Cloudfare | `True`  | [stable.chip-ahoyto.pages.dev](https://stable.chip-ahoyto.pages.dev) |
João Magalhães's avatar
João Magalhães committed
39
| Cloudfare | `False` | [master.chip-ahoyto.pages.dev](https://master.chip-ahoyto.pages.dev) |
40

41
42
43
44
45
46
## Crate Features

| Name     | Description                                                              |
| -------- | ------------------------------------------------------------------------ |
| `quirks` | Allows CHIP-8 quirks runtime evaluation, comes at a performance penalty. |

João Magalhães's avatar
João Magalhães committed
47
48
## Build

49
50
51
52
53
54
### Library

```bash
cargo build
```

João Magalhães's avatar
João Magalhães committed
55
### WASM for Node.js
João Magalhães's avatar
João Magalhães committed
56
57
58
59
60
61

```bash
cargo install wasm-pack
wasm-pack build --release --target=nodejs -- --features wasm
```

João Magalhães's avatar
João Magalhães committed
62
63
64
65
### WASM for Web

```bash
cargo install wasm-pack
66
67
wasm-pack build --release --target=web --out-dir=frontends/web/lib -- --features wasm
cd frontends/web
68
npm install && npm run build
69
cd dist && python3 -m http.server
João Magalhães's avatar
João Magalhães committed
70
71
```

João Magalhães's avatar
João Magalhães committed
72
73
## Reason

João Magalhães's avatar
João Magalhães committed
74
And... yes this is the real inspiration behind the emulator's name:
João Magalhães's avatar
João Magalhães committed
75

João Magalhães's avatar
João Magalhães committed
76
<img src="https://gitlab.stage.hive.pt/joamag/chip-ahoyto/raw/master/res/chips-ahoy.jpeg" alt="Chips Ahoy" width="200" />
João Magalhães's avatar
João Magalhães committed
77

78
79
## Inspiration

João Magalhães's avatar
João Magalhães committed
80
81
82
Many articles and websites helped me in this quest to build the emulator these are some of them.

### Documentation
83

João Magalhães's avatar
João Magalhães committed
84
* [Guide to making a CHIP-8 emulator](https://tobiasvl.github.io/blog/write-a-chip-8-emulator)
João Magalhães's avatar
João Magalhães committed
85
86
* [Writing a CHIP-8 emulator with Rust and WebAssembly](https://blog.scottlogic.com/2017/12/13/chip8-emulator-webassembly-rust.html)
* [Wikipedia - CHIP-8](https://en.wikipedia.org/wiki/CHIP-8)
João Magalhães's avatar
João Magalhães committed
87
* [itch.io - OctoJam 6](https://itch.io/jam/octojam-6)
88
* [CHIP-8 Archive](https://johnearnest.github.io/chip8Archive)
João Magalhães's avatar
João Magalhães committed
89

João Magalhães's avatar
João Magalhães committed
90
91
92
93
### Articles

* [Revisiting Chip-8](https://faizilham.github.io/revisiting-chip8)

João Magalhães's avatar
João Magalhães committed
94
95
96
## License

CHIP-Ahoyto is currently licensed under the [Apache License, Version 2.0](http://www.apache.org/licenses/).
João Magalhães's avatar
João Magalhães committed
97
98
99

## Build Automation

João Magalhães's avatar
João Magalhães committed
100
[![Build Status](https://github.com/joamag/chip-ahoyto/workflows/Main%20Workflow/badge.svg)](https://github.com/joamag/chip-ahoyto/actions)
João Magalhães's avatar
João Magalhães committed
101
102
[![crates Status](https://img.shields.io/crates/v/chip-ahoyto)](https://crates.io/crates/chip-ahoyto)
[![npm Status](https://img.shields.io/npm/v/chip-ahoyto.svg)](https://www.npmjs.com/package/chip-ahoyto)
João Magalhães's avatar
João Magalhães committed
103
[![License](https://img.shields.io/badge/license-Apache%202.0-blue.svg)](https://www.apache.org/licenses/)