Title screen drawing (Menu/FDLogo.alr, title*_?s.cso + executable)

What script built-in 0x6023 draws: the title is not a set of menu sprites but a small multi-pass scene of its own (code 0x140276600–0x14027a850): a scrolling cloud plane, the logo in two layers, nine animated flame sheets, a start prompt, a legal line, and a five-level glare built from the frame itself. Addresses are for Store build 1.3.25854.2. Read in the executable and its six title shaders; the quad tables were pulled out of the straight-line code with a symbolic tracer and checked against the sprite sizes of the user’s FDLogo.alr. H where code and data agree (marked), M otherwise. Nothing here was compared with footage yet.

This extends the menus run’s group 6 notes (state machine, 0x6020–0x6027) and corrects one of them: the sound bank Title_Logo.bin that 0x8046 / 0x8047 load is sound only (“Sound banks”); every picture of the title comes from Menu/FDLogo.alr.

Files and resources

State and timing (0x6022 tick, 0x140276d50)

Globals: state 0x14059dd90, state start frame T0 0x14059dd94, frame counter F 0x14059dd98 (F += 1 at the end of every tick while state ≠ −1; this is the increment the menus run did not locate), and four levels recomputed every tick: A 0x14059dda4 (background and base logo), B 0x14059dda8 (prompt, flames, final logo), C 0x14059ddb4 (logo glow), D 0x14059ddac (prompt pulse). Each tick starts from A = B = C = 0, D = 0.6. A colour set word 0x14059dd8c picks one of three tints in every pass; it is only ever written 0, so the gold set below is the one in use (sets 1 and 2 are dead code).

State Per tick (t = F − T0)
0 T0 = F, state = 1
1 intro A = (t / 40)² for t < 40, else 1. With u = t − 10, for u > 0: C = 0.5 − 0.5 cos(π u / 50) for u < 50; 0.75 + 0.25 cos(π (u / 50 − 1)) for 50 ≤ u < 100; 0.5 from u = 100. For u > 90: B = ((u − 90) / 25)². When u > 115: T0 = F, state = 2
2 idle A = B = 1, C = 0.5, D = 0.8 − 0.2 cos(π t / 20) (period 40 ticks, 0.6 … 1.0)
3 / 4 leaving (confirm / cancel) r = T0 − F + 50, counting 50 → 0; at r = 0 state = −1. A = (r / 40)² for r < 40, else 1. With w = r − 10, for w > 0: w > 25: C = 0.2 + 0.3 (w − 25) / 15 and B = ((w − 25) / 15)²; w ≤ 25: C = 0.1 − 0.1 cos(π w / 25), B = 0
−1 nothing (levels stay 0)

So the glow swells to full at tick 60, settles to half at 110, the prompt and flames fade in over ticks 100–125, and the screen is idle from tick 126 (H for the arithmetic; the cosine is the C library cosf). 0x6024 (skip) and 0x6025 (confirm / cancel) set T0 = F with the new state, as the menus run wrote down.

Drawing (0x6023, 0x140279e70)

All 2-D quads use titleV_vs (position from the 2-D transform buffer, four UV sets, each offset by vertex constants c92–c95) and positions in the menu’s 640 × 480 design space; every coordinate carries a +1/32 offset (34.03125 and so on; whole numbers are given below). The full-screen quads span x −106.625 … 746.375, y 0 … 480, which is the 16:9 frame of the PC port around the 4:3 design area (M). Vertices are 44 bytes: position x y, packed colour, four UV pairs (helper 0x14027a640 draws one quad). Order per frame, all to the back buffer:

  1. Glare source (blending off): the glow logo and the prompt (0x140278360, argument 0), then the nine flames with maximum blending (0x140278930).
  2. Glare chain (0x140277020, blending off): the frame so far is sampled (viewport rectangle of the frame texture) into level 0 with title_glare_ps, then each level into the next. Then per level: 8 blur passes along x and 16 along y with title_blur_ps, ping-ponging between the level’s two textures (the result ends in the first). Tap offsets through c92–c95: (−2.07585, −0.548137, 0.548137, 2.07585), divided by 640 for x and by 480 for y, the same UV step on every level. c92–c95 are zeroed afterwards.
  3. Clouds: target back to the back buffer, then the cloud plane (below). It is opaque and covers the whole frame, so step 1’s pixels survive only inside the glare.
  4. Base logo (0x140279640, argument 0): sprite 0 at (47, 153)–(607, 249), colour (1, 1, 1, A), normal alpha blending.
  5. Glare, multiplied in (0x140279aa0, argument 0; blend source = destination colour, destination = one): the five levels as full-screen quads, each (0.8, 0.8, 0.8, 1).
  6. Additive layer (source one, destination one): glow logo and prompt again (argument 1: the prompt without its pulse), the nine flames, then the five glare levels with colour (1, g, g, 1), g = 1, 0.75, 0.75², … per level (argument 1).
  7. Final logo (0x140279640, argument 1): sprite 0 again with colour (1, 1, 1, B), normal alpha blending; then the legal line (0x140279410): sprite 4 at (136, 379)–(504, 395), colour (1, 0.5, 0.2, 0.75 B), u running 0 … 1.09524 (past the edge: the port’s quirk).
  8. Texture stages 0–3 are cleared.

Quads of 0x140278360 (title_general_ps: texture × vertex colour, alpha = texture alpha × vertex alpha; samplers clamped):

Quad Sprite Rectangle Colour (gold set)
glow logo 1 (34, 139)–(610, 251) (C, 0.9 C, 0.4 C, 1)
start prompt 3 (177, 312)–(465, 352) (288 wide for a 304 px picture) (p, 0.8 p, 0.4 p, 1), p = B × D (argument 0) or B (argument 1)

Flames (0x140278930), all with colour (q, 0.9 q, 0.4 q, 1), q = B × C. Frame f = (F + offset) & mask; cell column f & 7, row f >> 3; u from (64 col + 0.5) / 512 to (64 col + 63.5) / 512, v the same with the row over the sheet height (1024 for sprites 7 and 8, 512 for 9–11) (H: the masks and divisors match the sheet sizes):

# Sprite Rectangle Offset Mask Note
1 7 (42, −104)–(221, 164) 0 127
2 8 (334, −57)–(451, 177) +24 127
3 9 (427, 5)–(535, 221) −16 63
4 10 (49, 45)–(128, 203) +24 63
5 8 (198, 68)–(275, 209) +44 127
6 11 (369, −57)–(503, 211) 0 63 bottom-right u uses +65.5 instead of +63.5 (as shipped)
7 8 (278, 144)–(357, 212) +24 127 mirrored in u
8 10 (495, 24)–(580, 212) −28 63
9 11 (278, 84)–(357, 212) +24 63 mirrored in u

Glare quads (0x140279aa0): level n’s first texture on all four stages, the four UV sets shifted by (±0.5 / 640, ±0.5 / 480) (one sign pair per set), title_glare_ps.

Cloud plane

A 3-D quad drawn with title_cloud_vs / title_cloud_ps under a perspective projection of its own: vertical field of view 60°, aspect 1.29825 (= 592 / 456), near 1, far 100, camera at the origin looking along +z. Static vertices (48 bytes each: position, colour, four UV pairs):

Vertex Position UV 0 UV 1 UV 2 UV 3
0 (−38.2, 8, 13.7) (0, 0) (2.3, 0.5) (0.4, 0.3) (0, 0.3)
1 (38.2, 8, 13.7) (2, 0) (0.3, 0.5) (2.4, 0.3) (1, 0.3)
2 (38.2, −29.4, 50.5) (2, 1.7) (0.3, 2.2) (2.4, 2) (1, 1)
3 (−38.2, −29.4, 50.5) (0, 1.7) (2.3, 2.2) (0.4, 2) (0, 1)

The near edge sits on the top of the view and the far edge on the bottom (8 = 13.7 tan 30°, 29.4 ≈ 50.5 tan 30°), so the plane fills the frame and recedes downwards (H, geometry checked against the projection).

The other two pixel shaders

Other built-ins around the title

Implementation notes for the rebuild

  1. Draw the title from FDLogo sprites 0, 1, 3–11 with the tables above; drive it from the decoded tick (levels A, B, C, D, frame counter F stepping once per menu tick) so the existing state machine needs no change beyond exposing the four levels and F.
  2. Passes in order: glare source into an off-screen copy (glow logo, prompt, flames with max blending on black), five-level downsample (256 × 192 halving to 16 × 12) with 8 horizontal + 16 vertical four-tap blur passes per level, cloud plane, base logo (alpha A), glare multiplied in at 0.8 per level, additive glow logo + prompt + flames + tinted glare levels, final logo (alpha B), legal line. In Godot: one SubViewport for the glare source, the chain as five pairs of small SubViewports (or one shader looping the taps), a canvas shader per title_* pixel formula; nothing here needs a 3-D scene except the cloud quad, which can be a canvas polygon with the projected corners (the projection is fixed) and perspective-correct UVs.
  3. Keep the UV accumulation of the cloud plane per draw, the +1/32 position offset, the stretched prompt (288 for 304 px), flame 6’s 65.5 and the legal line’s u past 1 with clamping: they are the shipped picture.
  4. The 4:3 design area sits in the middle of a 16:9 frame; full-screen quads and the cloud plane cover the whole frame, the logo quads keep their 640 × 480 coordinates.
  5. Movies: answer 0x312D and 0x312B “done” at once (no movie playback), so the logos movie and the idle demo fall through to the title; list as a placeholder.
  6. The title sound bank calls (0x8046–0x804A) can stay as loaded / no-op until the jingle cue is decoded.