This is an implementation of a CHIP-8 emulator written in Elm.
Online demo can be found here: http://dragonwasrobot.github.io/chip-8/
A range of ROMS are already included - all of which are in public domain.
The ROMS cavern, chipquarium, delaytimer, heartmonitor, morsecode, and
randomnumber were included from https://github.com/mattmikolay/chip-8
Credit to Thomas P. Greene. and Matthew Mikolay for providing proper documentation on the CHIP-8 language and its extensions.
Ensure you have node.js 24 and Elm 0.19.1 installed. The project uses mise-en-place for managing compiler/runtime versions and task management.
With Elm installed, perform the following steps:
$ mise watch dev
$ mise run serve
in two different terminal windows/tabs. These commands together do the following:
- Checks formatting with
elm-format. - Checks linting rules with
elm-review. - Recompiles Elm to JavaScript.
- Reruns tests.
- Setup a tiny local HTTP server to serve CHIP-8 source files.
If you don't want to use mise you can consult the different scripts found in
package.json and run a way you prefer.
- Run the command
./build.shto compile the source, then - open
docs/index.htmlin your favorite browser.
The tests are written using elm-test and elm-verify-examples. To run the tests, perform the steps:
- Run the command
npm installto installelm-testandelm-verify-examples, - run the command
mise run testto generate the documentation tests found in the Elm code, and run all tests in thetestsfolder.
