GoMulator - Game Boy Emulator in WebAssembly

I built a Game Boy emulator in Go that runs in the browser using WebAssembly. You can play any Game Boy ROM directly in this page.

Features

  • Full Game Boy CPU emulation
  • PPU (Picture Processing Unit) with accurate rendering
  • Sound support
  • Save states (browser localStorage)
  • Built with Go and compiled to WASM
  • Runs at native 60 FPS

Try it yourself

Upload a Game Boy ROM file below and start playing. The emulator supports both DMG (original Game Boy) and some GBC (Game Boy Color) features.

Load ROM File

Select a Game Boy ROM file (.gb) to start playing

Controls

  • Arrow Keys: D-pad
  • Z: B button
  • X: A button
  • Enter: Start
  • Tab: Select
  • F3: Toggle FPS display

</div>

Technical Details

The emulator is written in pure Go using:

  • Custom CPU implementation (Sharp LR35902)
  • Cycle-accurate timing
  • Scanline-based PPU rendering
  • APU (Audio Processing Unit) implementation
  • Ebiten game engine for rendering

Check out the source code on GitHub.

Build Tags

The project uses Go build tags to support both native and WASM targets:

  • Desktop builds with SDL2 backend
  • WASM builds with Canvas API backend
  • Optional debug mode for instruction tracing

Performance

The WASM build runs surprisingly well, maintaining 60 FPS on most systems. The Go WASM runtime is efficient, and the emulator uses minimal allocations during gameplay.