Lavender

A Game Boy Advance emulator that runs in your browser. 🎮

It is written in Rust and compiles to WebAssembly, with a graphics backend that is powered by WebGL.

In laymans terms, this means that it can run on essentially any device with a modern browser, and is performant and efficient enough to even run on smart phones with only minimal power draw.

Upload your ROMs to sync them (and your game saves) between all of the devices that you want to use Lavender on.

Coming soon

The book

Along with the available source code, I also wrote a book about the internals of the Game Boy Advance and how to emulate it. It covers an exciting range of topics, such as...

  • Technical Specifications
  • CPU Architecture
  • Instruction encoding
  • Memory Layout
  • BIOS: What you should know
  • ROM file layouts
  • Interacting with the outside world
    • IO Registers and CPU interupts
    • VRAM, Palette, and Object details
  • How cartridge save files work
  • Testing your emulator for accuracy
Read the book

The code

The emulator is open source and available as a reference implementation for those who want an easy to understand code base to read through while they build their own emulator.

  • No magic header files
  • No nasty abbreviated constant names
  • No magical pointer nonsense
  • Names should be descriptive and memorable
  • Lots of inline comments
Github