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.

Golden Sun: The Broken Seal
The 2001 original, from the storm in Vale to Venus Lighthouse. Start here to see Camelot’s core architecture at its clearest.

Golden Sun: The Lost Age
The 2002 sequel on the same code, expanding to an eight-member party, 3D summons, the Lemurian Ship, and Sunshine’s Forge.
Guide
How both games work under the hood, division by division. Start in The Broken Seal or The Lost Age.

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

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

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

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

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

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

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

Shops, sanctums, and Sunshine’s Forge
Artifact restocking, inns, sanctum revivals, and forging rare materials into equipment in Yallam.

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

Camelot’s hidden debug rooms
Hidden scene selectors, flag editors, sound tests, and developer test rooms preserved on retail cartridges.

How The Lost Age evolved
A code-level comparison of everything the 16 MB sequel changed, scaled up, and carried over.

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.

Sol Sanctum Elemental Star Room
The four Elemental Star statues, rising stepping-stone pillars, and the ambush that sets both games in motion.

Venus Lighthouse Aerie
Bobbing floating platforms, the Shaman’s Rod standoff, and the chained scripts running the first game’s finale.

Crossbone Isle
The hidden island off the Tolbi-bound ship, its Growth vines, waterfall Nut, and the cave beneath.

Lemuria
The hidden city beyond the Sea of Time, King Hydros’s palace, the Spring of Lemuria, and Lunpa’s tower.

Air’s Rock
The purple monolith south of Yampi Desert, Wind Stones, whirlwind statues, and the climb to the Reveal tablet.

Mars Lighthouse Aerie
The stormy summit of the final lighthouse, facing the Doom Dragon, and lighting the last beacon.
Source
Every function, struct, macro, and table cross-linked from the decompiled code. Browse every file in The Broken Seal or The Lost Age.

battle_ability.c
Exact damage, healing, elemental power and resistance math, status turn counts, and the Djinn bonus roll.

battle_enemy_ai.c
How every enemy picks among its eight actions by strategy, falling back to defend after 16 failed choices.

game_classes.c
Counts element levels in tenths from set Djinn to choose each character’s class series, stat multipliers, and Psynergy.

field_world_map.c
The 16×16 wrapping metatile grid, per-scanline perspective view, and the frozen BG1 backdrop held behind menus.

battle_effect_canvas.c
The 128×128 brightness canvas, VBlank transfer and trail decay, background darkening, Eclipse, and the Doom Dragon.

sound.c
Music and SFX dispatch, volume and tempo ramps, resuming tracks after a jingle, and an uncalled sound test.
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.
git clone https://github.com/PascalPixel/alchemy
git clone https://github.com/PascalPixel/alchemy-gcc
make -C alchemy-gcc install
cd alchemy
makeSee the build guide on GitHub for macOS, Linux, and Windows prerequisites, or browse the C reference, glossary, and contributing guide.