Skip to content
Tech News
← Back to articles

I built a Game Boy emulator in F#

read original get Game Boy Emulator Kit → more articles
Why This Matters

Nick Kossolapov's development of a Game Boy emulator in F# demonstrates the potential for building complex, cross-platform emulators using functional programming. This project not only deepens understanding of computer architecture but also showcases how modern languages can be used to recreate classic hardware experiences, benefiting both developers and enthusiasts. It highlights the importance of accessible, open-source tools in preserving gaming history and advancing emulator technology.

Key Takeaways

I built a Game Boy emulator in F# Nick Kossolapov · April 2026

I’ve been working as a software engineer for over 8 years at this point, and admittedly I’ve never understood how computers actually work. So I figured I’d try to learn how they work by emulating one. Sorry Ben Eater, I’m not going to build one just yet.

I spent hundreds of hours as a kid catching Pokémon, so the Game Boy was the perfect candidate: real hardware, relatively simple in scope, and something with a strong personal connection.

Instead of jumping straight into it, I first did From NAND to Tetris. It was a great course, and it made me really understand the fundamentals of computers, like registers, memory, and the ALU. Then to get used to building an emulator, I built a CHIP-8 emulator in F#: Fip-8.

A few months later, and after many nights of going to bed at 2 AM even though I told myself I’d only work on it for an hour or two, I have a working Game Boy emulator: Fame Boy. Complete with sound and runs on desktop and web.

I wanted to have the emulator work on both desktop and web, so I focused on having a simple interface between the emulator core and whatever frontend is running it.

The interface between the frontends and core is essentially just two arrays and two functions:

framebuffer - a 160x144 array of shades (white, light, dark, black).

- a 160x144 array of shades (white, light, dark, black). audiobuffer - a ring audio buffer at sample rate of 32768 Hz with read and write heads.

- a ring audio buffer at sample rate of 32768 Hz with read and write heads. stepEmulator() - a function that executes one CPU instruction and returns the number of cycles taken.

... continue reading