Skip to Content
The Alchemy Project

The Alchemy Project

A study of Golden Sun (2001) and Golden Sun: The Lost Age (2002) for Nintendo’s Game Boy Advance, written from their reconstructed source code. The source is a clean-room matching decompilation, reconstructed with LLMs from the retail cartridges alone, for study and preservation.

Camelot’s original source code was never released. With readable C and assets reconstructed from all twelve regional cartridges, every page here explains how both games work from facts in the code, not from playtesting, illustrated with recordings of every town, room, cutscene, battle, and ability.

Guide

How both games work under the hood, division by division. Start in The Broken Seal or The Lost Age.

Isaac waiting on a town conversation while animations keep running behind the scenes
The system library

How the game ticks

One blocking tick call and the main routine’s engines keep cutscenes, battles, and menus reading as plain C.

Exploded 3D view of Game Boy Advance background layers and sprites forming a town
World, Scenes & Maps

Towns, maps, and stacked layers

Four flat 2D hardware tile layers sorted by height let characters walk behind roofs and under bridges.

Ending credits scenes crossfading with hardware palette blends in Golden Sun
Graphics & Sound

Graphics, palettes, and MIDI audio

Indexed PNGs, shared tilesets, hardware palette fades, and MusicPlayer2000 MIDI tracks.

Camelot’s 3D battle camera orbiting 360 degrees around heroes and monsters on the Game Boy Advance
Battle & Effects

Swinging 3D battle camera

Fixed-point math projects heroes, monsters, and spells onto scaled 2D sprites and a zoomed backdrop.

A weapon unleash playing out in a Golden Sun battle
Battle Effects

Summons and battle effects

How weapon unleashes, brightness canvases, screen shakes, and summons play out frame by frame.

The Lost Age World Map tilting live between flat 2D overhead and per-scanline horizon perspective
The Lost Age · World

Tilted perspective World Map

Per-scanline affine interrupts bend a flat continent and the open ocean into a curving horizon.

Dialogue windows zooming open in Golden Sun
Dialogue & UI

Animated windows and compressed text

Zooming dialogue boxes, voice blips, Huffman-compressed scripts, and grammar rules across six languages.

Sunshine forging an item in Yallam in Golden Sun: The Lost Age
The Lost Age · Shops

Shops, sanctums, and Sunshine’s Forge

Artifact restocking, inns, sanctum revivals, and forging rare materials into equipment in Yallam.

Isaac using Move Psynergy to push a stone pillar in Golden Sun
Field Engine

Field Psynergy and puzzles

Moving pillars, climbing ladders, casting field Psynergy, and height-based collision across every map.

Camelot’s hidden map select debug menu in Golden Sun
Debug Mode

Camelot’s hidden debug rooms

Hidden scene selectors, flag editors, sound tests, and developer test rooms preserved on retail cartridges.

The multi-element summon Zagan in Golden Sun: The Lost Age
Sequel Comparison

How The Lost Age evolved

A code-level comparison of everything the 16 MB sequel changed, scaled up, and carried over.

Setting a Djinni to Standby in Golden Sun’s party menu
RPG Data & Rules

Djinn, classes, and RPG rules

Unified fighter structs, from-scratch stat recalculation, Djinn class tables, and 4,096 story flags.

Places

Rendered maps, story flags, and recorded cutscenes for every playable room. Browse the full atlas for The Broken Seal or The Lost Age.

Source

Every function, struct, macro, and table cross-linked from the decompiled code. Browse every file in The Broken Seal or The Lost Age.

Verify the source

Building the source checks it. Every C file, indexed PNG, MIDI track, WAV sample, and .po dialogue catalog has to come out identical to the original cartridge, compared by checksum, in each of the twelve editions across Japanese, English, German, Spanish, French, and Italian. No original game ROMs are distributed in the repository.

Terminal
git clone https://github.com/PascalPixel/alchemy
git clone https://github.com/PascalPixel/alchemy-gcc
make -C alchemy-gcc install
cd alchemy
make

See the build guide on GitHub for macOS, Linux, and Windows prerequisites, or browse the C reference, glossary, and contributing guide.

system/ (boot, ticks, memory, saves)
field/ (walking, Psynergy, World Map)
battle/ (turns, AI, effects, summons)
scene/ (201 towns, dungeons & cutscenes)
graphics/ (~2,100 editable PNGs)
sound/ (MIDI music & WAV samples)
text/ (6 language .po files)