This is my CHIP-8 emulator written in Haskell. Since I've become interested in emulation, I decided a CHIP-8 emulator would be a good starting project. I also used this project to teach myself Haskell, and to get used to a TDD approch to software development.
While developing this project, I used this tutorial to help me understand the basics of building a CHIP-8 emulator. I also used this wikipedia page which contains helpful documentation on each CHIP-8 opcode.
You will need to have Stack setup first before you can run this project. Read this documentation to learn how to setup Stack.
Note that this project has been developed and tested in Linux. I have not tested this project in either the Windows or Mac operating systems.
The following command will build the project and move the executable to the ~/.local/bin
folder:
$ stack install
You can then easily run the emulator from any directory:
$ lazy-chip8 "the/path/to/your/rom"
While developing locally, you can build and run the executable using the following stack commands:
$ stack build
$ stack exec lazy-chip8 "the/path/to/your/rom"
This project contains a test suite that tests all of the CPU opcodes and logic. You can run unit tests using the following command:
$ stack test