Get the latest tech news

Emerald Source Code Commentary


A book that examines and explains the source code of Emerald, one of the most popular video games ever made, based on the decompilation work of PRET.

At the ancient end, one spends too much time keeping mental track of registers and status flags to perceive the game; at the other extreme, the code in its totality (to include all the underlying drivers and libraries) is so large that not one single person actually does understand all of it. Aside from that, there are a few reasons to hesitate from referencing it heavily: some of the functionality is unlocalized, the comments are in Japanese and in a pre-Unicode encoding that will not render correctly in modern editors, the way in-game text is represented is a nightmare and the variables (which in C must always be in ascii) are written in improvised wasei-eigo indecipherable to anyone but the original programmers: Therefore, this commentary is built on the stellar work of PRET (Pokemon Reverse Engineering Tools) to produce a new body of decompiled source code that compiles exactly to the official English release of the Emerald ROM down to the last byte.

Get the Android app

Or read this on Hacker News

Read more on:

Photo of Emerald Source Code

Emerald Source Code