Field Menus, Intro & Credits
This page is a guide to the games/tbs/src/menu/ folder of the Alchemy project.
Its code drives the field menu for Psynergy, Djinn, Items, and Status alongside
the opening title sequence and ending credits.
When Select or A is pressed in an open spot on the field, this folder's
call-stack menu opens over the map. From it, the player can cast healing
Psynergy, swap Djinn, manage gear, or inspect character stats. Two standalone
resident modules also live alongside it here: one for the pre-Title opening
sequence and one for the ending credits.
The sections below cover how the menu unwinds nested prompts on a single Start
press, previews live Djinn stat changes, and runs the self-playing Flint
tutorial, followed by the full file map. The conceptual architecture is
described in
Dialogue, Menus & Shops.
Implementation notes

- Start-to-close unwind: A small event watches for
Startand raises one flag that every nested blocking prompt treats asB, unwinding any prompt depth back to the icon bar without tracking depth. - Party-only vs. deferred field actions (
menu_use.c): Healing, equipping, and Djinn swaps run inside the menu. Field Psynergy writes a request intoFieldStateWorkand unwinds sofdEngineRuncasts it on the field. - Live-copy Djinn preview (
menu_djinn_preview.c): Clones the character'sUNIT, actually applies the Djinni change, callsgmUnitCalculate(Game logic & tables), renders exact stat and class arrows, and restores the clone if cancelled. - Self-playing Flint tutorial: Opens the real Djinn screen and feeds synthetic button presses roughly 1.5 seconds apart.
- Persistent cursors (
MenuState): Heap-allocated state preserves each character's last cursor position across reopenings. While the menu is open, scene actors hide and unmarked overlay events pause.
File map
| File(s) | Role |
|---|---|
menu.c | 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), Item (6 greyed-out and active commands), and 3-page Status screens |
menu_djinn.c, menu_djinn_preview.c, menu_djinn_figures.c | Djinn screen, live-copy stat preview, and character Djinn figures |
menu_use.c, menu_shared.c, menu_icons.c, menu_tables.c, menu_strings.c | Action dispatch, shared prompt helpers, icons, tables, strings, menu_tiles.list.tsv, and stubs.s |
title_intro.c, title_stubs.s | Standalone resident module for the pre-Title opening sequence |
credits.c, credits_stubs.s, credits_background_*.s | Standalone resident module for the ending staff roll (crossfading 128-colour battle backgrounds) |
Source files
| File | Description |
|---|---|
credits.c | The credits at the end of the game: the staff names, drawn line by line into a ring of sprite tiles, scroll up over battle backgrounds that crossfade behind them. |
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 that the Colosso scenes open, and the pieces they share. |
menu_djinn.c | The Djinn menu: its screen, the Djinn list, help, and choosing the Djinn to set, put on standby, give or trade. |
menu_djinn_figures.c | DjinnFigures: the row of four figures the Status and Djinn menus show, placed by an event and eased in and out. |
menu_djinn_preview.c | Previewing a Djinn change before it is made, the chosen party member's status, and the checks that keep the party members' Djinn counts even. |
menu_icons.c | The stat and Djinn arrows and the Psynergy icons the menus load into VRAM blocks. |
menu_internal.h | What every part of the menu object shares: its includes, and the macros and types more than one part uses. |
menu_item.c | The item menu: the field menu's Item screen, the command loop, the party member and item lists, and Use, Equip, Give, Drop, Remove and Details. |
menu_pattern_masks.c | The six row masks mnBuildPatternTiles XORs into the Psynergy range icons' tile pairs: colour 5 growing one pixel at a time from the centre outward. |
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 and the Start watch. |
menu_status.c | The party member chooser and the Status menu: its party member row, status page, Psynergy page and equipment page. |
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 menu tables: cursor bobbing, sort orders, highlight widths and resource ids. |
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 view rising up a peak towards the sun and its lens flare until the flash into the title picture and its "Press Start" prompt; the publisher's and Camelot's logos; and the palette fade the intro uses. |
| File | Description |
|---|---|
djinn_menu.h | The Djinn menu: its list tables, backdrop and state, and the fields of a Djinni's list entry. |
menu.h | The menus: the field menu's Item, Psynergy, Status and Djinn screens, the title and the credits, with the tables, strings and pictures they share. |
paged_list.h | PAGED_LIST, what a menu returns. |
stubs.h | The menu, title and credits modules' stub calls: the Item, Psynergy, Djinn and Status screens, the party member chooser, the title, the logos and the staff credits. |