This is a CHIP8 emulator that I developed in JavaScript. I was looking for a puzzle to keep my mind busy over the holidays. I was also looking for an opportunity to explore developing an application using an online IDE. I never built an emulator before, so this was my attempt to build one. I used Repl.it as my online IDE.
I primarily used the CHIP-8 Wikipedia page as a guide. The emulator has 4KB of memory, 16 8-bit registers, 64x32 display, and 16 keys.
I was particularly interested in seeing how the machine works at each step, so that I spent most of the time developing views to show the changes that are happening on the memory and the registers. There is also a view for the instructions to show the flow of the execution.
The entire code can run as a standalone web page. There are no dependencies to any other tools.
Choose a game and click the Load
button. Once the game is loaded, you can either click the Step
button to step through each individual insturction, or you can click the Start
button to run the emulator. At any point in time, you can click the Stop
button to stop the emulator. If you woud like to load a different game, simply click the Reset
button.
The source code is provided under MIT License.