The main development for the CHIP-8 emulator was quite fun to work on. While it was fairly “simple” for an emulator, it was still a nice challenge for someone getting into emulator development like myself. Unfortunately, because of life, I did a terrible job documenting the process. I do remember having a few small hiccups with one of the more involved opcodes. After resolving that, I was able to quickly move on to the WebGL and JavaScript interop code.
My plan for the emulators is to try to make the core logic of each a Go package that can be wrapped with a frontend. Throughout this series, I will try to maintain the frontend as JavaScript/WebAssembly. To achieve this for the CHIP-8 emulator, I added basic hooks that can be set for the core. These hooks enable the client to determine how to draw and play sound.
- Before I move to the next emulator, I want to add debug features into the WebGL interface (I’ve started some with the green thing! Press
uto toggle). For feature completeness, the emulator could also be made to support the different CHIP-8 quirks, although I may not implement those.