https://github.com/doodlewind/merry8
📺 Chip-8 emulator for web.
https://github.com/doodlewind/merry8
chip-8 emulator
Last synced: over 1 year ago
JSON representation
📺 Chip-8 emulator for web.
- Host: GitHub
- URL: https://github.com/doodlewind/merry8
- Owner: doodlewind
- Created: 2016-12-25T11:33:57.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2018-05-16T12:26:14.000Z (about 8 years ago)
- Last Synced: 2024-10-11T22:48:18.876Z (over 1 year ago)
- Topics: chip-8, emulator
- Language: JavaScript
- Homepage: http://ewind.us/h5/merry8
- Size: 39.1 KB
- Stars: 55
- Watchers: 5
- Forks: 6
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# merry8
Chip-8 emulator for web.
## API
Besides the demo, you can simply `npm install merry8` and run it in your own project!
``` js
import Merry8 from 'merry8'
// Provide chip-8 rom, canvas element and its default width.
const merry8 = new Merry8(rom, {
el: '#app',
width: 500
})
merry8.run()
```
### `merry8.run()`
Start emulator main loop.
### `merry8.press(key: number)`
Emulate a key press, `key` ranges from 0 to 15.
## Development
For a quick start, `npm run demo` and open `localhost:9001`.
To test cpu instructions, simply run `npm test`.
## Changelog
* `0.3.0` - 2017/11/19
* Expose emulator API.
* Support multi emulator instances.
* Rewrite project structure with class syntax.
* Fix test failure.
* Migrate to `babel-preset-env`.
* `0.2.1` - 2017/03/25
* Migrate to rollup.
* `0.2.0` - 2016/12/25
* Migrate view layer to canvas.
* `0.1.0` - 2016/12/25
* Implement interpreter and GUI with basic PONG support.
## License
MIT