

In fact someone is doing a WASM Gameboy emulator in AssemblyScript, so I’m definitely not the first. Running emulators in the browser isn’t new and I’d imagine some people have had some fun porting other emulators using emscripten. The preinstalled ROM is a test suite used to test the CPU: The end result being gomeboycolor WASM edition (warning: ~5mb or so download), go on, try it out, load some ROMs on it that you’ve illegally downloaded 1.Īlternatively try out the demo below, click “start” to run the emulator and “stop” to stop it. It was exciting enough for me to blast out furious torrent of commits. This absolutely blew my mind, here was some old code, written for a non browser environment in a language not supported by browsers, running in the browser. Obviously, not rendering anything to the page, but there was stuff printing to the developer tools console at least to indicate the emulator was running. Much to my surprise though, compiling the project using the new WASM target actually worked.Īs in, within 5 minutes of commenting out code related to GLFW/GL calls, there was something running in the browser. Going back to old code is like looking at old photos of yourself. If only I had a decently sized project written in Go that wasn’t some trivial TODO list manager 🤔 Hello, old friend There’s nothing one likes more than experimental APIs so this got me thinking, what could I do to test out this new WASM target? You see, a few weeks ago Go 1.11 came out, and with it came the promise of experimental support for compiling Go code to WebAssembly. However, as the passage of time progressed, it landed on the pile of mostly-done-but-not-finished projects and left largely abandoned. It was a very frustrating, but rewarding experience that I’ve been dining out on in job interviews ever since. I ported my Gameboy Color emulator to WebAssemblyĪround five years ago I wrote a Gameboy Color emulator in Go.
