Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/letmaik/chip8
🕹 CHIP-8 emulator written in AssemblyScript
https://github.com/letmaik/chip8
assemblyscript chip-8-emulator
Last synced: 4 days ago
JSON representation
🕹 CHIP-8 emulator written in AssemblyScript
- Host: GitHub
- URL: https://github.com/letmaik/chip8
- Owner: letmaik
- License: mit
- Created: 2020-10-09T22:04:46.000Z (about 4 years ago)
- Default Branch: master
- Last Pushed: 2020-10-17T21:02:23.000Z (about 4 years ago)
- Last Synced: 2024-10-26T05:08:36.835Z (18 days ago)
- Topics: assemblyscript, chip-8-emulator
- Language: TypeScript
- Homepage: https://letmaik.github.io/chip8/
- Size: 219 KB
- Stars: 5
- Watchers: 4
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# CHIP-8 emulator written in AssemblyScript
https://letmaik.github.io/chip8/
Keys:
```
1 2 3 4
Q W E R
A S D F
Z X C V
```## CHIP-8 resources
### Docs
https://github.com/mattmikolay/chip-8/wiki/CHIP%E2%80%908-Technical-Reference
http://devernay.free.fr/hacks/chip8/C8TECH10.HTM
### Unit tests
https://github.com/SnoozeTime/chip8/blob/master/test/opcode_test.cc
https://github.com/DavidJowett/chip8-emulator/blob/master/test/chip8_test.c
### Roms
https://github.com/dmatlack/chip8
https://github.com/JohnEarnest/chip8Archive
https://github.com/corax89/chip8-test-rom
## Development notes
### TypedArray views
When AssemblyScript grows heap memory, then all TypedArray views returned to JS become unusable/detached.
That's why a TypedArray view should be accessed directly before it is used in JS, without doing any other work in AssemblyScript that might grow memory. Keeping long-lived views is unsafe in general.Note that as-bind avoids such potential issues by always returning copies instead of views.
This is less efficient but safer for general usage, though also a bit confusing as it's not obvious that a copy happens. Updating the array inside AssemblyScript would obviously not be reflected in the copy.
See also https://github.com/torch2424/as-bind/issues/47.