conferences | speakers | series

GBForth: Using Forth to understand the Game Boy

home

GBForth: Using Forth to understand the Game Boy
FOSDEM 2019

During this talk we'll get a good understanding of Game Boy programming by reverse-engineering a ROM using Forth. We go beyond just decompiling the ROM to assembly and show how we created a cross-compiler that allows writing Game Boy games in Forth as well. You'll get to see how Forth interacts with the Game Boy hardware, and how the language can be extended to easily render sprites or play sounds for example.

We show you how to use Forth to incrementally refactor Game Boy bytecode into higher levels of abstraction. No black boxes. No magic. This way you can understand and appreciate every layer of the hardware and CPU instructions one by one. A similar approach can help you understand other systems (NES comes to mind) and create a language that is more comfortable than ASM or C to work with.

The talk is accessible to developers without former Game Boy, Forth or compiler experience.

Topics covered: - Go through the basics of Game Boy hardware - Explain how rendering graphics works on a Game Boy - Outline the challenges of working with the Game Boy memory - Show how to reverse-engineer a binary using Forth - Describe the process of writing the cross-compiler - Talk about using GBForth to write Game Boy games

Speakers: Tijn Kersjes David Vázquez Púa