Building a GameBoy emulator with Elixir and Scenic
summary
Builds a working GameBoy emulator that decodes the full opcode set (256 plus a 256‑entry prefixed table), renders tiles and sprites via the Scenic texture API instead of drawing ~65,000 rectangles, and handles timing quirks like HBlank/VBlank and interrupt-driven callbacks so screens don’t show garbage. Uses Elixir and Scenic, targets the hardware’s 4 MHz CPU and its 65K memory, discovers precomputing every tile variants explodes to ~5 GB, and ends with a playable though not fully optimized emulator.
AI-written summary · about
chapters (18)
- 0:00Introduction and motivation
- 2:58Why build a GameBoy emulator
- 6:10What is a GameBoy and emulator
- 8:17GameBoy hardware components
- 13:08Understanding GameBoy instructions
- 15:22Implementing CPU instructions
- 15:46Rendering the GameBoy screen
- 17:34What is Scenic library
- 20:23Rendering tiles with Scenic
- 22:31Optimizing tile rendering
- 24:40Demo of the emulator
- 25:36Debugging rendering issues
- 26:27GameBoy screen rendering mechanics
- 27:31Interrupts and CPU interaction
- 29:24Expanding the emulator with interrupts
- 31:19Challenges and edge cases
- 32:23Value of attending conferences
- 34:14Closing thoughts and thanks
related talks
35mBuilding a GameBoy emulator with Elixir and Scenic
18mEmulating the Nintendo Game Boy CPU with Elm
56mEmulating a Game Boy in .NET 6
10mState of Retro Gaming in Emacs
43mLive coding an Escher painting using Scenic
45mEmulating a 6502 System in JavaScript
37mEmulators, Immutability, and Time Travel
29mEmulating With JavaScript
