Field Menus, Intro & Credits
This page is a guide to the games/tla/src/menu/ folder of the Alchemy project,
where the field menu system, opening intro, and ending credits of Golden Sun:
The Lost Age are all kept.
Opening the menu on the field runs the code here for Psynergy, Djinn, Item, and Status, all expanded for an eight-member party with four characters per page plus sorting, reorder, and reference shortcuts. This folder also holds two standalone resident modules for the pre-Title intro sequence and the ending credits.
The sections below give implementation notes on the Start-to-close unwind, live Djinn stat previews, and the self-playing Echo tutorial, followed by a file map of every source file. The conceptual architecture is described in Dialogue, Menus & Shops.
Implementation notes and TLA shortcuts

- Start-to-close unwind: A small event watches for
Startand sets one shared unwind flag. Every nested blocking prompt treats that flag asB, backing out to the icon bar from any depth. - Party-only vs. deferred field actions (
menu_use.c): Healing, equipping, and Djinn swaps run directly inside the menu. World-affecting Psynergy writes a request intoFIELD_STATEand unwinds sofdEngineRuncasts it on the field. - Live-copy Djinn preview (
menu_djinn_preview.c): Clones the character'sUNIT, applies the actual Djinni change, callsgmUnitCalculate(Game logic & tables), shows exact stat and class diffs, and restores the clone if cancelled. - Self-playing Echo tutorial: When Echo joins near Daila, the real Djinn screen opens and feeds synthetic button presses roughly 1.5 seconds apart.
- 8-member pagination and convenience shortcuts: Character selectors
paginate four characters per page. Status lets
LandRreorder the active front four, Item addsL + Asorting and hold-Requipped-gear preview, and Djinn adds a 7-topicSelectreference screen. Cursor positions persist per character in heap-allocatedMenuState.
File map
| File(s) | Role |
|---|---|
menu.c, menu_internal.h | Parent translation unit #includeing the field menu parts in ROM order |
menu_psynergy.c, menu_item.c, menu_status.c | Psynergy (L and R shortcuts), paginated Item (L + A sort, hold R), and 3-page Status (L and R reorder) |
menu_djinn.c, menu_djinn_preview.c | Djinn screen (Select 7-topic help) and live-copy stat preview |
menu_use.c, menu_shared.c, menu_icons.c, menu_tables.c, *_strings.c, menu_tiles.list.tsv | Action dispatch, shared prompt helpers, icons, tables, strings, and stubs.s |
title_intro.c, title_stubs.s | Standalone resident module for the pre-Title intro (publisher and Camelot logos, vertical valley pan, logo assembly) |
credits.c, credits_background_decode.s, credits_stubs.s | Standalone resident module for the ending staff roll, scrolling Book One prologue crawl, and ending image scroll |
Source files
| File | Description |
|---|---|
credits.c | The staff credits: the battle backdrops behind them, the lines that scroll past, and the scrolling images with their border strips. |
djinn_menu_strings.c | The Djinn menu's labels, as each edition words them. |
menu.c | The menu object: the field menu's Psynergy, Djinn, Item and Status screens, the party member chooser and the pieces they share. |
menu_djinn.c | The Djinn menu: its backdrop screen, the Djinn list and the screen's loop. |
menu_djinn_figures.c | The Djinn figures the Status and Djinn menus show, the five status icons, and the statuses the Status screens list. |
menu_djinn_preview.c | The Djinn menu's preview of a set, standby, give or trade before it is made, the party member's "Char. |
menu_icons.c | The menus' small pictures and the party row: the Djinn preview's stat arrows and Psynergy icons, the arrows that hop beside a page of four party members, the cursor that moves among them, and the party members' figures standing over the menus. |
menu_internal.h | What every part of the menu object shares: its includes and the declarations its parts disagreed on. |
menu_item.c | The item menu, as far as this object holds it: the field menu's Item screen, its command loop, Use, the first screen's setup and the item icons. |
menu_pattern_masks.c | Pairs of 4bpp rows of dots in colour 5, each reaching further right than the last, that mnBuildPatternTiles XORs into its tile pairs. |
menu_psynergy.c | The Psynergy menu: the field menu's Psynergy screen, the party member and Psynergy lists, targets, and the L and R shortcuts. |
menu_shared.c | The pieces the menu screens share: windows, the status panel, numbers, icons, the party figures, the hand cursor, paged lists, palettes, the cancel sound and text colours. |
menu_status.c | The party member chooser and the Status menu: its party member row and its status, Psynergy, range and equipment pages. |
menu_strings.c | The menus' labels, as each edition words them: the item menu's key hints and the signs and units beside a number. |
menu_tables.c | The menus' tables: the hand cursor's bob, the item list's sort orders, the cursor widths over the item commands and the Status screen's rows, and the sprites and icons the Djinn and Status screens load. |
menu_use.c | Using an item or Psynergy from the menu: what it does to the party, and the sound it plays. |
status_panel_strings.c | The status panel's labels, as each edition words them. |
title_intro.c | The title intro, the publisher's and Camelot's logos, the title screen and the palette fade they use. |
| File | Description |
|---|---|
djinn_menu.h | The Djinn menu: its lists, backdrop and state, the fields of a Djinni's list entry, and the Djinn tutorial's lines. |
menu.h | What the menus share with the window module, the shops and the debug rooms: the item list's sort orders, the strings and tables the menus draw from, and the functions each side calls of the other. |
paged_list.h | The paged list a menu page draws and moves through. |
stubs.h | The stub calls into the menu module, as the other modules' code calls them. |