Analysis model: gpt-5.5 xhigh

Flight by Kosmic - Technical Dissection

Release year: 1995

Released: 18 April 1995

Flight is Kosmic's first MS-DOS demo, released for NAID 1995, where the party index lists it as the third-place PC demo. The archive is a large Watcom/DOS4GW program wrapped around WGT 5.0 graphics routines, DSIK 2.0 music playback, RIFF/DSMF modules, 3DS meshes, GIF/PCX imagery, sprite/map data, and several custom packed data blocks.

The release note explains the unusually high 8 MB memory requirement: most graphics and tables are preloaded at the start so the demo can move between music-synchronized parts without visible pauses. The executable supports that claim. Its initialized data object contains the names for four numbered resource sets, four DSM modules, many image/model/table assets, and table-building messages; the code opens those resource sets and then drives a small 3D engine, WGT image decoders, palette paths, and full-frame blitters.

Old contact and distribution details from the release text are deliberately omitted.

Sources:

Offset notation:

This is a static pass through the released files. Watcom runtime, DOS4GW, WGT, and DSIK code are separated from show-specific code where the binary makes that distinction visible.

Archive Identity

The Scene.org NAID 1995 demo index lists:

flight          "Flight" by Kosmic                                       #3

The zip used here is:

eb462bf267de8d67afa2846b29a0e80e555a9a6461b70eae8a4d89e770772ea2  flight.zip

Payload:

DOS4GW.EXE     265,420 bytes
FILE_ID.DIZ        407 bytes
FLIGHT.000     552,514 bytes
FLIGHT.001     240,341 bytes
FLIGHT.002     343,250 bytes
FLIGHT.003      99,903 bytes
FLIGHT.EXE     286,320 bytes
FLIGHT.NFO      18,232 bytes
LEV.DSM        156,499 bytes
MIXOLOG.DSM    428,175 bytes
POA.DSM        209,499 bytes
THINGS.DSM     126,688 bytes

Payload hashes:

dd9f4f342533f99570475b62e53231a468de2e3d83e4fc31e80c27d3a7d6b49c  DOS4GW.EXE
2f35ea103975669fe8097361eef32b38afa93a8a979b80861c41313d4bf5712d  FILE_ID.DIZ
8053c82616606f11a238a0c7cba41a6f30c596d0f8141009e0d37ab1b4092459  FLIGHT.000
5323cf82fe9aceb7213a0b25eec72200ad728d5d56bc7b432995ebb27c07a518  FLIGHT.001
cb1e36d245782552a8b5b94bdfdd551a4fc4b80186c3e04be20d08314e118ef0  FLIGHT.002
2b62b6e9919ef45b25c6aee5726f2b81a5df4d881a24a45fecb12bdb34730730  FLIGHT.003
9d422ee77c971ddb6113c784820bd2c7105ec9e18218ff5ef5f785a23426edd8  FLIGHT.EXE
475d900f293a0f01f9af39749d399abf0649f2253a05ea63f7fd7d0e01093820  FLIGHT.NFO
944bb8d9411f6afd3d7197b7d9742db29bd370a68f83de6810211a10cdbee5d2  LEV.DSM
816ddec4946fe8977d7775530619c0f95892057c9bae3a9b168aeb07b02fc2b7  MIXOLOG.DSM
39a733b8d2a5bff0ce67bf9e230cb745a7c20b8b9714f13afc961d80173f6f28  POA.DSM
55c56dee3519b0e20981e873f86cce9a16df3eb70152e663d69ef41ae4819664  THINGS.DSM

The four modules are RIFF files with DSMF at byte 8. The title fields name Mixology, things part 2, and "Peace or Annihilation" -BM; LEV.DSM has a blank visible title in its leading bytes.

The release note names the visible credits as GooRoo, BarryE, Maelcum, Floss, B00MER, and Leviathan. The executable's end-title string block repeats the same split: code, 3D system, graphics, four songs, design, and library credits for WGT 5.0 and DSIK 2.0.

LE / DOS4GW Layout

FLIGHT.EXE is an LE protected-mode executable for DOS4GW. The MZ stub's lfanew points to the LE header at exe+0x2998.

Important LE fields:

LE header:              exe+0x2998
entry object:           1
entry EIP:              0x1b85c
stack object:           2
initial ESP:            0x244be0
page size:              0x1000
object count:           2
data pages file start:  exe+0x10400

Object table:

object 1: size 0x285c7, base 0x10000, flags 0x2005, pages 1..41
object 2: size 0x244be0, base 0x40000, flags 0x2003, pages 42..47

Object 1 is the code and data object. Object 2 has only a small initialized prefix in the file and a large zero-filled tail for heap/stack space. Carving object 2's initialized prefix from the last six pages gives 22,151 bytes. That prefix contains the setup strings, library names, asset names, credits, and WGT/DSIK messages.

The LE entry at obj1+0x1b85c lands in Watcom C startup, not in the show sequencer. It is surrounded by Watcom run-time strings and DOS4GW/DPMI helper calls. The interesting show code is lower in object 1 and is reached after the runtime has created the flat-memory environment.

Resource Map

The resource names are held in obj2 and referenced by raw offsets from object

  1. There is no single plain directory at the start of FLIGHT.000 through FLIGHT.003; the resource access path is through WGT library helpers. The string offsets make the part split visible:
obj2+0x0544  MIXOLOG.DSM
obj2+0x05a8  flight.000
obj2+0x0c40  THINGS.DSM
obj2+0x0c78  flight.001
obj2+0x0dc8  POA.DSM
obj2+0x0dfc  flight.002
obj2+0x118c  flight.003
obj2+0x1228  LEV.DSM

The first resource set is the largest and contains most of the opening show material. Code-backed asset references include:

apresents.gif    difflirend.gif   h256.gif        akig256.gif
tabarn.gif       crush.gif        mo.gif          check.gif
winter.gif       green.gif        yellow.gif      ice.gif
mit1.cmp         womit2.cmp       acet1.cmp       t2.cmp
t3.cmp           st4.cmp          flymono.cmp     kosmic.cmp
yinyang.cmp      green.lzw        kfmfopen.3ds    title.dat
fly.3ds          voxel.lzw        greypal.pal     fuzzy.lzw
ellip.3ds        yellow.txt       ice.3ds         icetrans.lzw
face.3ds         light.dat        light.lzw       mor*.gif / mors*.dat

The later sets line up with the terrain, planet, and road/seagull sections:

flight.001: lands2.cel, h256.gif, ship2.3ds, shade.dat, face.txt
flight.002: ship2.3ds, earth.gif, texture.pcx, shade.dat, face.txt,
            terminal GIFs, font data, man.3ds
flight.003: road.spr, road.wmp, gull.txt, gull.gif, bird4.3ds,
            seagull.spr

Magic-byte scanning supports that split. Valid 3DS chunks are visible at:

FLIGHT.000: offsets 40, 222804, 235443, 281521, 307911, 366124
FLIGHT.002: offset 40
FLIGHT.003: offset 95195

GIF87a streams appear 16 times in FLIGHT.000, 13 times in FLIGHT.001, 5 times in FLIGHT.002, and once in FLIGHT.003. FLIGHT.003 also starts with a WGT sprite file marker, matching the road.spr and seagull.spr names.

This is why the archive looks like a hybrid instead of a neat file system: some assets are raw standard formats, some are WGT sprite/map/font files, and some are compact custom payloads consumed by show-specific helpers.

Main Show Chain

The main show sequence begins around obj1+0x480c. In simplified form:

obj1+0x480f  call 0x12238          ; setup / save state
obj1+0x4816  call 0x43f0           ; local init
obj1+0x481b  call 0x121b0          ; likely WGT mode/init path
obj1+0x4820  eax = 0x05a8          ; "flight.000"
obj1+0x4825  edx = 0
obj1+0x4827  call 0x117e0          ; open current resource set
obj1+0x4840  call 0x1a8f0          ; set viewport clipping
obj1+0x485d  call 0x1aad8          ; allocate/create visible surface
obj1+0x4867  call 0x1a630          ; select surface
obj1+0x486c  call 0x1ac90          ; display/graphics setup
obj1+0x4871  call 0x4420
obj1+0x4876  call 0x5050           ; preload first part assets
obj1+0x487b  call 0x1acc0          ; wait / timing helper
obj1+0x488a  call 0x44e0
obj1+0x488f  call 0xc7f0
obj1+0x4894  call 0xf050           ; planet / terminal section
obj1+0x4899  call 0x10618          ; road / seagull section
obj1+0x48a6  print obj2+0x05b4     ; final thank-you string

The important point is that flight.000 is opened once at the top, and later calls open the other resource sets as needed. obj1+0xf050 opens flight.002; obj1+0x10618 opens flight.003.

First Part Preload

obj1+0x5050 is the most readable first-part preload routine. It calls a GIF loader at obj1+0x91f4, a CMP/custom loader at obj1+0x7c30, and a 3DS loader path at obj1+0x0f50.

The function starts by setting the current drawing height, then loads images by string offsets:

obj1+0x5068  eax = 0x0610          ; "apresents.gif"
obj1+0x5073  edx = 0x20d538
obj1+0x5078  call 0x91f4

obj1+0x5087  eax = 0x0620          ; "difflirend.gif"
obj1+0x508c  call 0x91f4

obj1+0x509b  eax = 0x062c          ; "h256.gif"
obj1+0x50a0  ecx = 0x33
obj1+0x50a5  call 0x91f4

Then it loads the compact .cmp payloads into a table:

obj1+0x517c  eax = 0x0698          ; mit1.cmp
obj1+0x5181  call 0x7c30
obj1+0x5186  [0x21b7f8] = eax

obj1+0x518b  eax = 0x06a4          ; womit2.cmp
obj1+0x5190  call 0x7c30
obj1+0x5195  [0x21b7fc] = eax

...

obj1+0x51f4  eax = 0x06e8          ; yinyang.cmp
obj1+0x51fe  call 0x7c30
obj1+0x5203  [0x21b818] = eax

It then loads LZW and 3DS assets:

obj1+0x5208  eax = 0x06f4          ; green.lzw
obj1+0x520d  call 0x91f4
obj1+0x521f  [0x1e02d4] = eax + 4

obj1+0x5224  eax = 0x0700          ; kfmfopen.3ds
obj1+0x5229  ebx = 0x20d538
obj1+0x522e  call 0x0f50

obj1+0x5233  eax = 0x0710          ; title.dat
obj1+0x523a  esi = 1
obj1+0x523f  call 0x48b8

After setup, 0x5050 enters a 3D scene path:

obj1+0x52a3  push camera/target values
obj1+0x52bb  call 0x00c0           ; set/normalize one vector
obj1+0x52d2  call 0x0050           ; set/normalize another vector
obj1+0x52e9  call 0x0030           ; store camera position
obj1+0x52ee  call 0x0130           ; build camera basis

obj1+0x52f3  edx = [0x18ac]        ; object/scene count
obj1+0x5304  eax = 0x173a70        ; scene record array
obj1+0x530a  call 0x0250           ; project one object
obj1+0x5316  ecx += 0x115d         ; next object record

The first part is not "just playback". It preloads files, builds shade and translucency tables, loads 3DS meshes, and repeatedly sends model records through the same 3D path used elsewhere.

GIF Loader Inner Loop

obj1+0x91f4 is the WGT-style GIF reader used by many named images. It:

  1. Opens the current resource container.
  2. Seeks/locates the named member.
  3. Reads the GIF header and logical screen descriptor.
  4. Optionally reads the global color table.
  5. Allocates an output block sized from width and height.
  6. Converts the palette from 8-bit channel values to VGA DAC scale.
  7. Calls an LZW image-data decoder.

The header path checks for GIF and reads dimensions:

obj1+0x92c1  ebx = 13
obj1+0x92cd  ecx = [0x243108]      ; open file handle / WGT stream
obj1+0x92d3  call 0x12357          ; read 13 bytes
obj1+0x92e2  edi = 0x085c          ; expected "GIF"
obj1+0x92eb  repz cmpsb

obj1+0x930d  ax = [esp+6]          ; width
obj1+0x9317  ax = [esp+8]          ; height
obj1+0x9321  al = [esp+0x0a]       ; packed flags
obj1+0x9329  color_bits = (flags & 7) + 1

The palette conversion loop is a real hot setup loop because every byte of the GIF palette is divided down to VGA's 0..63 DAC range:

obj1+0x94dd  edx = 0
palette_loop:
obj1+0x94df  eax = edx
obj1+0x94e2  eax = eax * 3
obj1+0x94e5  bl = [palette + eax + 0]
obj1+0x94e8  bl >>= 2
obj1+0x94eb  cl = [palette + eax + 2]
obj1+0x94ef  [palette + eax + 0] = bl
obj1+0x94f2  cl >>= 2
obj1+0x94f5  bh = [palette + eax + 1]
obj1+0x94f9  [palette + eax + 2] = cl
obj1+0x94fd  bh >>= 2
obj1+0x9500  edx++
obj1+0x9501  [palette + eax + 1] = bh
obj1+0x9505  cmp dx, 0x100
obj1+0x950a  jl palette_loop

That is a straight 256-entry RGB table pass. It writes the same table back in place, preserving the GIF color order while reducing each component by two bits.

CMP / Compact Block Loader

obj1+0x7c30 is the loader used for .cmp blocks. The calling convention is:

eax = obj2 string offset for member name
return eax = allocated buffer, or zero if no current resource set is open

The function opens the current library stream, locates the named member, reads the member byte count, allocates memory, reads the member into that buffer, and returns the buffer pointer. It is library code, but Flight's preload routine uses it heavily.

The companion expansion-looking loop at obj1+0x7d40 walks a buffer made of a length word followed by a color byte:

obj1+0x7d54  edx = [block] - 4
obj1+0x7d60  triplets = edx / 3
obj1+0x7d65  source = block + 4
obj1+0x7d6e  ah = [source + 2]     ; fill byte
obj1+0x7d75  edx = ah
obj1+0x7d7b  bx = [source]         ; run length
obj1+0x7d7e  eax = destination
obj1+0x7d80  call 0x14520          ; fill/copy helper
obj1+0x7d85  source += 3
obj1+0x7d8a  dx = [source - 3]
obj1+0x7d8f  destination += dx
obj1+0x7d91  loop until triplets done

So those .cmp files are not opaque blobs to the show. They feed a compact run/byte stream used for masks, titles, or transition imagery.

VGA and Palette Helpers

Several low-level video helpers are small enough to identify exactly.

obj1+0x3510 writes one DAC entry:

obj1+0x3516  edx = 0x03c8
obj1+0x351b  out dx, al            ; palette index
obj1+0x351c  al = saved red
obj1+0x351f  edx = 0x03c9
obj1+0x3524  out dx, al            ; red
obj1+0x3525  al = bl
obj1+0x3527  out dx, al            ; green
obj1+0x3528  al = cl
obj1+0x352a  out dx, al            ; blue

obj1+0x3530 waits for vertical retrace by polling VGA input status port 0x03da:

wait_not_in_retrace:
obj1+0x3538  in al, dx
obj1+0x3539  test al, 8
obj1+0x353b  jne wait_not_in_retrace

wait_in_retrace:
obj1+0x3544  in al, dx
obj1+0x3545  test al, 8
obj1+0x3547  je wait_in_retrace

obj1+0x12860 uploads a contiguous palette range:

obj1+0x1286c  edx = 0x03c8
obj1+0x12873  out dx, al           ; first DAC index
obj1+0x12874  eax = index * 3
obj1+0x12884  palette += index * 3
loop:
obj1+0x12895  al = [palette+0]
obj1+0x12897  out dx, al
obj1+0x12898  al = [palette+1]
obj1+0x1289e  out dx, al
obj1+0x1289f  al = [palette+2]
obj1+0x128a3  out dx, al
obj1+0x128a2  index++
obj1+0x128ab  jle loop

obj1+0x6600 programs a tweaked VGA mode from a register table. It copies 10 dwords from obj1+0x59c0 to the stack, sets sequencer register 4 to 0x06, sets map mask register 2 to 0x0f, writes the misc output byte to 0x03c2, unlocks CRT timing register 0x11, and then streams register/value pairs to 0x03d4.

The core sequence:

obj1+0x6640  edx = 0x03c4
obj1+0x664b  eax = 0x0604
obj1+0x6650  rep movsd             ; copy local register table
obj1+0x6652  out dx, ax
obj1+0x6654  eax = 0x0f02
obj1+0x6659  out dx, ax
obj1+0x665b  al = [esp]
obj1+0x665e  edx = 0x03c2
obj1+0x6663  out dx, al
...
obj1+0x66a9  eax = [esp+ecx]
obj1+0x66ac  out dx, ax            ; CRT timing register/value word

The plane-clear helper at obj1+0x66d0 sets all four VGA planes writable and fills 0x3e80 bytes, which is 16,000 bytes. That is the byte count for one planar 320x200 frame plane:

obj1+0x66d4  al = 0x0f
obj1+0x66d6  dx = 0x03c4
obj1+0x66da  ah = 0x02
obj1+0x66dc  out dx, ax            ; map mask = all planes
obj1+0x66e8  eax = [frame pointer]
obj1+0x66ef  ebx = 0x3e80
obj1+0x66f4  call 0x14520          ; fill

Text-Mode Setup UI

The setup/status UI uses direct writes to color text memory at 0xb8000. obj1+0x3570 draws filled character cells:

obj1+0x3577  eax = y * 4
obj1+0x357e  eax += y              ; y * 5
obj1+0x3580  eax <<= 4             ; y * 80
obj1+0x3583  x += y * 80
obj1+0x3585  eax = x * 2
obj1+0x358c  eax += 0xb8000

The inner loop writes alternating character and attribute bytes:

row_loop:
    column = 0
cell_loop:
obj1+0x35a6  eax++
obj1+0x35ab  [eax-1] = character
obj1+0x35ae  eax++
obj1+0x35b4  [eax-1] = attribute
obj1+0x35b7  if column < width: repeat
obj1+0x35bc  eax += (80 - width) * 2
obj1+0x35c0  if row < height: repeat

This is why the setup screen has crisp block UI elements without using BIOS text output for every cell.

3D Engine Data Layout

BarryE's 3D path uses small binary records rather than a general scene graph. The static offsets make the layout readable:

vertex record size:       0x2e bytes
face/object record size:  0x2b bytes
projected x:              vertex + 0x24
projected y:              vertex + 0x28
projected flag:           vertex + 0x2d
camera-space depth:       vertex + 0x14

The globals around 0x173a34 through 0x173a70 hold camera vectors, scene counts, and object records. 0xa1ac8 is a face/triangle record array in the large data area. 0x7a988 and 0x7a98c are the visible-face list and depth keys filled by the projection pass.

Small vector helpers:

obj1+0x0010  dot(a,b):
    a.y*b.y + a.x*b.x + a.z*b.z

obj1+0x0050  store and normalize vector into 0x173a54..0x173a68
obj1+0x00c0  store and normalize vector into 0x0a1abc..0x0a1ac4
obj1+0x0670  cross product, then normalize

obj1+0x0130 builds a camera basis. It subtracts the camera position from the target, computes horizontal and full lengths, then stores reciprocal-scaled basis terms:

dx = target_x - camera_x
dy = target_y - camera_y
dz = target_z - camera_z

horizontal = sqrt(dx*dx + dy*dy)
distance   = sqrt(horizontal*horizontal + dz*dz)

right/forward/up basis terms are written to:
0x1e02c4, 0x173a6c, 0x1e02d0, 0x1e02cc,
0x1e02c8, 0x1e02e0, 0x1e02dc, 0x1e02d8

The code uses the x87 FPU here, not fixed-point integer math. The heavy pixel copying is integer/byte work, but camera basis construction is floating point.

3D Projection Inner Loop

obj1+0x0250 projects model faces into screen space. The setup:

obj1+0x025d  screen_half_width  = width  * 0.5
obj1+0x026d  screen_half_height = height * 0.5
obj1+0x0279  first_face = [eax]
obj1+0x027b  last_face  = [eax+4]

Each face record contains three vertex indices. The loop multiplies each index by 0x2e and adds the model vertex base:

obj1+0x029c  ecx = face_index * 0x2b + 0xa1ac8
obj1+0x02a5  edx = [ecx+0] * 0x2e + vertex_base
obj1+0x02e6  ebx = [ecx+4] * 0x2e + vertex_base
obj1+0x02ee  ecx = [ecx+8] * 0x2e + vertex_base

For each vertex, if the projected flag is clear, it subtracts the camera position and computes camera-space depth:

rel_x = vertex.x - camera.x
rel_y = vertex.y - camera.y
rel_z = vertex.z - camera.z

depth =
    rel_x * basis_zx +
    rel_y * basis_zy +
    rel_z * basis_zz

vertex.depth = depth

If all three depths are behind the camera, the face is skipped:

obj1+0x0401  compare 0 with v0.depth
obj1+0x040b  compare 0 with v1.depth
obj1+0x0415  compare 0 with v2.depth
obj1+0x041d  if all non-positive: skip face

For a visible vertex, it computes horizontal and vertical camera coordinates, does perspective divide by depth, adds the half-screen center, rounds to integer, and sets the projected flag:

screen_x = round((camera_x_axis / depth) * focal + half_width)
screen_y = round((camera_y_axis / depth) * focal + half_height)

vertex + 0x24 = screen_x
vertex + 0x28 = screen_y
vertex + 0x2d = 1

Then it rejects faces whose three vertices are all left, right, above, or below the viewport. Surviving faces are queued:

obj1+0x062e  depth_sum = v0.depth + v1.depth + v2.depth
obj1+0x0637  depth_key = depth_sum * constant
obj1+0x0640  depth_table[visible_count] = depth_key
obj1+0x0647  visible_count++

This is a classic early-1990s demo 3D compromise: transform once per vertex, cache the projected coordinates, reject aggressively, then feed a small visible-face list to the drawing path.

3D Draw Inner Loop

obj1+0x2130 draws the projected faces. It first clears the projected flag for each vertex:

obj1+0x2149  i = 0
obj1+0x2153  vertex += 0x2e
obj1+0x215d  [vertex - 1] = 0     ; projected flag byte at +0x2d
obj1+0x2161  repeat for vertex count

Then it sorts or orders the visible-face table:

obj1+0x2165  ecx = 0x2110
obj1+0x216a  ebx = 8              ; element size
obj1+0x216f  eax = 0x7a988        ; visible face table
obj1+0x2176  call 0x0b10          ; table order helper

The draw loop pulls each face index, expands it to three vertices, and copies the projected coordinates into shared temporary words:

obj1+0x21b5  esi = face_index * 0x2b + 0xa1ac8
obj1+0x21be  v0 = [esi+0] * 0x2e + vertex_base
obj1+0x21ca  v1 = [esi+4] * 0x2e + vertex_base
obj1+0x21d6  v2 = [esi+8] * 0x2e + vertex_base

obj1+0x21dd  temp_x0 = [v0+0x24]
obj1+0x21e8  temp_y0 = [v0+0x28]
obj1+0x21f3  temp_x1 = [v1+0x24]
obj1+0x21fe  temp_y1 = [v1+0x28]
obj1+0x2209  temp_x2 = [v2+0x24]
obj1+0x2214  temp_y2 = [v2+0x28]

For flat/edge-marked faces, it selects the face color and draws flagged edges:

obj1+0x2236  al = [face+0x2a]
obj1+0x223b  call 0x12858          ; current draw color / palette slot

obj1+0x2240  if face.flags & 4: line(v0,v1)
obj1+0x2267  if face.flags & 2: line(v1,v2)
obj1+0x228e  if face.flags & 1: line(v2,v0)

Filled faces go through the later path starting at obj1+0x22be. That branch computes a plane/depth term with FPU math, stores a per-face value at 0x1e0310, then proceeds into the triangle filler.

The line drawer at obj1+0x12910 starts with endpoint tests and signed delta setup:

obj1+0x12919  if x0 == x1: special case
obj1+0x12922  if y0 == y1: special case
obj1+0x1292b  dy = y1 - y0
obj1+0x12934  dx = x1 - x0
obj1+0x12942  if dy < 0: y_step = -1 else y_step = 1

So the engine has both wire/edge drawing and filled-triangle paths. The opening title/flight objects and later bird/ship/man objects all reuse this same record format.

Blit and Clip Helpers

obj1+0x1a8f0 sets the active viewport, clamping the requested rectangle to the current width and height:

obj1+0x1a8f2  store left x
obj1+0x1a906  clamp top y to >= 0
obj1+0x1a90d  load screen width
obj1+0x1a914  clamp right x to width - 1
obj1+0x1a923  clamp bottom y to height - 1
obj1+0x1a92b  store bottom
obj1+0x1a932  store right
obj1+0x1a939  store top

obj1+0x1a950 is a clipped block copy into the active frame. It reads a WGT-style image header, clips the destination rectangle, computes the visible span width, and then either copies rows directly or calls a masked/translucent row helper:

copy_row:
obj1+0x1aa55  ecx = visible_width
obj1+0x1aa59  esi = source_row
obj1+0x1aa5b  edi = dest_row
obj1+0x1aa66  rep movsd
obj1+0x1aa6d  rep movsb
obj1+0x1aa77  source_row += source_pitch
obj1+0x1aa82  dest_row += screen_pitch
obj1+0x1aa85  repeat until bottom clipped row

The direct path is a normal row blit. The alternate path calls obj1+0x22828 per row, which is likely the transparent or masked version used by sprites and overlays.

Planet / Terminal Section

obj1+0xf050 opens the third resource set and prepares the planet/terminal sequence:

obj1+0xf076  eax = 0x0dfc          ; "flight.002"
obj1+0xf087  call 0x117e0

obj1+0xf091  eax = 0x0e08          ; "ship2.3ds"
obj1+0xf098  call 0x0f50

obj1+0xf11b  eax = 0x0e14          ; "earth.gif"
obj1+0xf120  call 0x91f4

obj1+0xf12f  eax = 0x0e20          ; "texture.pcx"
obj1+0xf139  call 0x1c858

obj1+0xf154  eax = 0x0e2c          ; "shade.dat"
obj1+0xf159  call 0x4a60

It then selects the surface, loads face/table data, adjusts camera coordinates, starts POA.DSM, and loops through the 3D path:

obj1+0xf1b1  camera_y += constant
obj1+0xf1c3  camera_z += constant
obj1+0xf1e2  call 0x154d0          ; sound/timer value
obj1+0xf1e7  call 0xefb0           ; load/start POA.DSM
obj1+0xf22c  push camera target
obj1+0xf245  call 0x00c0
obj1+0xf25c  call 0x0050
obj1+0xf273  call 0x0030
obj1+0xf27a  call 0x0130
obj1+0xf281  per-object call 0x0250
obj1+0xf2be  call 0x2130           ; draw visible faces

The embedded terminal text strings in this section include scan/capture messages and final Flight credits. The code evidence shows they are part of the same resource set as the earth texture, terminal GIFs, font, and man.3ds.

Road and Seagull Section

obj1+0x10618 opens the final resource set:

obj1+0x1061e  eax = 0x118c          ; "flight.003"
obj1+0x10623  edx = 0xc8            ; height-like parameter
obj1+0x10628  ebx = 8
obj1+0x1062d  ecx = 0x1e
obj1+0x10632  call 0x117e0

It then loads the road sprite, road map, gull text table, gull image, bird 3DS model, and seagull sprite:

obj1+0x106bd  edx = 0x1198          ; road.spr
obj1+0x106c9  call 0x1cb80

obj1+0x106d8  edx = 0x11a4          ; road.wmp
obj1+0x106e4  call 0x1d030

obj1+0x109a4  eax = 0x11b4          ; gull.txt
obj1+0x109a9  call 0x11fd1

obj1+0x10b06  eax = 0x11d4          ; gull.gif
obj1+0x10b10  call 0x91f4

obj1+0x10b21  eax = 0x11e0          ; bird4.3ds
obj1+0x10b28  call 0x0f50

The road.wmp prepass at obj1+0x10900 builds a 32x32 lookup using a map sampler:

outer_y = 0
while outer_y != 0x400:
    inner_x = 0
    while inner_x != 0x400:
        call 0x1d9d0           ; sample map / height / tile
        color = table[result]
        call 0x1a950           ; draw/copy small block
        inner_x += 0x20
    outer_y += 0x20

The final frame copy is explicit and large. obj1+0x10881 copies exactly 0x3e80 dwords, i.e. 64,000 bytes:

obj1+0x10871  ecx = 0x3e80
obj1+0x10881  esi = [0x24175c] + 4
obj1+0x10887  edi = [0x2430b4]
obj1+0x10890  rep movsd

This is a full 320x200 chunky frame transfer into the active WGT frame buffer. It repeats while the timer/music value at 0x3928 remains positive:

obj1+0x10892  cmp [0x3928], 0
obj1+0x10899  jg 0x10788

The road/seagull section also uses the 3D record arrays. Code around obj1+0x10b70 and obj1+0x10c14 copies bands of 0x2b-byte face records with rep movsd/rep movsb. That is the same face-record size used by the 3D engine, so the section appears to animate or shift model/face slices rather than rebuilding the whole structure from scratch each frame.

Sound Path

The setup strings and module loader strings identify DSIK 2.0 and several sound devices. The code reads BLASTER and ULTRASND environment variables and has setup strings for Sound Blaster, PAS, Windows Sound System, and Gravis UltraSound.

The show code starts modules by string offset. Example for POA.DSM:

obj1+0xefb0  call 0x17484
obj1+0xefb6  eax = 0x0dc8          ; "POA.DSM"
obj1+0xefbd  call 0x196c0          ; load DSM module
obj1+0xeff2  eax = loaded module
obj1+0xf005  call 0x15468
obj1+0xf014  call 0x17590
obj1+0xf019  call 0x155e5

The same pattern appears for the other DSM names. The module files are not inside the numbered resource containers; they are separate RIFF/DSMF files in the zip.

What Each Part Does

From static evidence, the show is organized roughly as:

  1. Text/setup path: sound-card selection and direct 0xb8000 cell drawing.
  2. Opening: flight.000, MIXOLOG.DSM, GIF title imagery, table building, first 3DS scene, and packed title/mask assets.
  3. Flight/voxel/ice/face material: 3DS objects, LZW/GIF images, shade and translucency tables, and repeated use of the shared projection/draw path.
  4. Terrain/ship part: flight.001, THINGS.DSM, land cell data, ship model, shade table, and face table.
  5. Planet/terminal part: flight.002, POA.DSM, earth GIF, PCX texture, terminal images/font, ship/man objects, scan/capture strings, and credits.
  6. Road/seagull part: flight.003, LEV.DSM, WGT sprite/map files, gull text, gull image, bird model, seagull sprite, map prepass, and full-frame copies.

The codebase is a mixture of C runtime, WGT/DSIK library code, and compact show-specific routines. The most demo-specific inner loops are the 3D projection/draw pair, the road/map sampler, the table-building and packed-block expanders, and the full-frame blit loops. The palette and GIF routines are library-origin code, but they are still central to how Flight can preload so many assets and keep the show moving without loading stalls.

Runtime-To-Code Concordance

This page does not currently include runtime screenshots or a derived GIF; the .gif strings above are mostly the demo's own bundled WGT/GIF asset names. The concordance below therefore maps the intended show stages from the release files and sequencer calls to code paths, not to captured frame thumbnails.

startup / setup UI
    Watcom/DOS4GW enters at obj1+0x1b85c, then show setup reaches
    obj1+0x480c. The visible text-mode setup/status interface is direct
    B8000h character-cell drawing at obj1+0x3570, while VGA retrace and DAC
    helpers live at obj1+0x3510/0x3530.

opening preload and first 3D scene
    obj1+0x4827 opens flight.000 through the WGT resource path, then
    obj1+0x5050 loads apresents.gif, difflirend.gif, h256.gif, compact .cmp
    transition blocks, green.lzw, kfmfopen.3ds, and title.dat. The part then
    builds camera vectors and sends scene records through obj1+0x0250.

image-backed title and transition material
    GIF-backed stills and LZW/CMP payloads are not passive decoration. The GIF
    loader at obj1+0x91f4 checks the GIF header, allocates image storage,
    converts 256 RGB palette entries to VGA DAC scale, and calls the LZW
    decoder. The CMP expander at obj1+0x7d40 turns length/color triplets into
    filled runs for masks or transition planes.

shared 3D object material
    Camera-basis setup at obj1+0x0130 uses the FPU, projection at
    obj1+0x0250 caches screen x/y/depth in 0x2e-byte vertex records, and
    obj1+0x2130 orders/draws visible 0x2b-byte face records. That explains the
    repeated 3DS assets in the opening, terrain/ship, planet/terminal, and
    bird/man sections.

planet / terminal sequence
    obj1+0xf050 opens flight.002, loads ship2.3ds, earth.gif, texture.pcx,
    shade.dat, terminal GIF/font material, and starts POA.DSM. The visible
    planet/terminal material is therefore a resource-set switch plus the same
    projection/draw path, not a hard-coded one-off screen.

road / seagull finale
    obj1+0x10618 opens flight.003, loads road.spr, road.wmp, gull.txt,
    gull.gif, bird4.3ds, and seagull.spr. The road prepass at obj1+0x10900
    samples a 32x32 grid through obj1+0x1d9d0, while obj1+0x10881 performs the
    explicit 0x3e80-dword full 320x200 frame copy repeated while the timer or
    music gate at 0x3928 remains positive.

music synchronization
    DSM modules stay outside the numbered resource containers. Module start
    paths such as obj1+0xefb0 load POA.DSM through DSIK and call the playback
    setup chain. The main sequencer groups visual sections around those module
    changes: MIXOLOG.DSM for the early set, THINGS.DSM for the middle material,
    POA.DSM for the planet/terminal section, and LEV.DSM for the road/seagull
    ending.

The practical runtime model is consistent: open one resource set, preload its images/models/maps/tables, run a timed visual loop using WGT surfaces and the shared 3D or map/blit paths, then switch to the next resource set and DSM module. That is the code-level explanation for the release note's 8 MB memory requirement: Flight spends RAM on pre-expanded assets so it can keep section transitions synchronized instead of loading everything on demand.

Why It Felt Fancy in 1995

Flight spends memory to buy timing. It keeps multiple DSM modules beside four large resource sets, preloads and expands images/tables, uses WGT to get fast chunky blits, and runs a reusable FPU-based 3D path over 3DS assets. That gives it a production style closer to a multimedia engine than a tiny one-effect intro: many assets, many sections, and a consistent transition rhythm.

The inner loops are not all handmade assembler; several are Watcom-generated C or WGT library paths. But the structure is coherent:

That matches the release note's design goal: use a large RAM footprint to keep the visible show continuous.