Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

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

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.