Debug Mode
Retail cartridges of Golden Sun: The Lost Age still contain Camelot's built-in developer toolkit behind a single global flag, along with four hidden boot starts and twelve test rooms across five scene overlays.
How DebugMode is gated
Inside syInit() in games/tla/src/system/system_start_up.c, boot code clears
one global byte before the main routine starts:
DebugMode = 0;No normal gameplay path ever sets DebugMode to a non-zero value; only an
unreachable sprite viewer writes to it. When DebugMode is non-zero in memory,
the retail cartridge activates Camelot's developer hooks across the field
engine, the battle engine, the main routine, and the sound driver:
- 325-scene selector (
Start + Bon the field): Lists all 325 scenes by internal code (DELY00,WORLD,SHOPTEST,YAMTEST2) and entrance ID (mnDebugSceneSelectRuninwindow/). - 4,096-flag editor (
Select + Bon the field): Inspects and toggles every bit inGameFlags(mnDebugFlagEditorRuninwindow/). - Live palette editor (
Start + Lon the field): Edits GBA hardware palettes directly (fdPaletteEditorRuninfield/). - Movement, boot, and battle tools: Walk-through-walls (
L), single-tick freeze and step (Start + SelectviaDebugPaused), four hiddengmMainRoutineRunboot starts, battle instant victory, an enemy status inspector, a sound test, and 12 test rooms.
Code reference
- Debug mode & test rooms (
games/tla/src/debug/): FullDebugModeshortcut table, cheats, and the five debug overlays (test_scenes.c,level.c,shop_test.c,psynergy_test.c, andpsynergy_test_2.c).