~/talk

Writing a Game Boy Emulator in OCaml

Talkat Functional Conf 2025 · 2025-01-24..01-25· [functional-programming]
slides:none on file

CAMLBOY is a Game Boy emulator written in OCaml that runs in the browser and aims to boot real cartridges like Pokémon. Implementation focuses on a functor-based CPU that depends on a bus interface so the CPU can be unit-tested with a mock bus, avoiding tight coupling to cartridge, RAM, and IO devices. Instruction decoding uses GADTs for instruction typing to express varying argument and result types, and the project shows concrete design choices and tradeoffs that make testing and correctness tractable.

AI-written summary · about

  1. 0:00Introduction and motivation
  2. 2:08Understanding emulators
  3. 4:13Addressing tight coupling
  4. 6:51Applying OCaml functors
  5. 9:01Instruction set challenges
  6. 12:32Implementing GADTs
  7. 15:21The learning cycle
  8. 16:51Criteria for projects
~/search
type to search 6,249 conferences, 138,987 speakers and 185,172 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.