Analysis model: gpt-5.5 xhigh Revision model: GPT-6 Astra (user-reported) Last edited: 2026-09-20 04:42:40 UTC
The UFO Project by Orange and NoooN - Technical Dissection
The UFO Project's thin red outlines are chiefly stored bitmap animation. A bytecode interpreter selects and repeats compressed 320×200 pictures. The ending adds a real image-sampling effect: one picture expands through a fixed-point sampler, while a second is keyed over it with small offsets.
This corrects the earlier article's inference of an unresolved line/vector renderer from the artwork's appearance. The apparent ending menu is also scripted imagery: the recovered path plays fixed picture sequences and tests Escape, without selecting alternate endings from arrow or Enter input.
Sources And Original Inputs
The December 1995 MS-DOS production is credited to Orange and NoooN. Its decoded credit pictures name Zeb for art/concept and Barti for code/music:
The recovered archive and useful payloads match the earlier recorded hashes:
| Input | Bytes | SHA-256 |
|---|---|---|
ufo.zip |
345523 | a5823dddde0552e6083bcc9eb60d4c90ac82e709971d4cfc5df64b2e69d8a8ee |
UFO.EXE |
22880 | ae7d744ff742d17667579b865b2e80825b0c74b2d37afdfc36fcfd5bb52f0b3c |
UFO.UFO |
333456 | f806f72d346577cb449d7230ac6951e8ac29ccc36d2e48a318eaeef8dfdd0010 |
The executable is PKLITE-packed. Executing its original MZ relocations and
unpacker at three declared DOS load segments reaches the same image-relative
entry, 0x36cc0, without an intervening OS interrupt in those unpacking tests.
The bootstrap requests protected code/data bases corresponding to the loaded
image and transfers to offset 0x1943.
Addresses below are image-relative protected coordinates. In the mapped
native run the image base is 0x8240; its pointers are interpreted relative
to that base. A pointer that denotes VGA therefore contains 0xa0000-0x8240,
not necessarily the physical address itself. Original code slices and the
complete scene-data tail match fourteen live saves.
The older 233951-byte depklite output remains a historical inspection span,
not an independently proved child-executable extent. The renderer addresses
here come from original unpacking and live code joins. In particular, the
retrace helper used by this path is 0x164f; the old raw-offset label
0x1cd2 was not a demonstrated equivalent.
Native Runtime Capture
Two complete local runs returned naturally to DOS without keyboard or mouse
input. DOSBox-X 2024.03.01, commit 02f36ba, used a normal 486 core, fixed
60000 cycles, 32 MiB RAM, S3 VGA, surface output and no scaler/aspect correction.
Guest GUS was configured at 240h, IRQ 5, DMA 3. Host audio used SDL dummy output.
The mapped run supplies the media below: 7305 ZMBV graphics frames at
640×400, with rate 2190197/31250, lasting 104.228638 seconds. Native
frame numbers and timestamps start at that graphics stream's frame zero;
preceding text-mode capture is excluded. Host elapsed time and timer counters
are separate measurements. The first run has 7297 graphics frames and is
retained as an independent no-input run, not mixed into the media timeline.

Native frames 3786..3996, every second frame, at 54.019..57.015 seconds. The 106 source samples retain their exact captured RGB values; GIF timing rounds to 3.02 seconds. This is stored picture playback through the original script, not newly generated line geometry.
The Sidecar Is A Compressed Module And Picture Collection
Main entry 0x63c allocates a 200000-byte music-conversion destination,
loads ufo.ufo, calls the DLZ expansion wrapper at 0x34840, and stores:
expanded = depack(loadedFile); // [0x31a]
sceneBase = expanded + 0x235fc; // [0x316]
convertMusic(expanded, musicDestination);
The file header's allocation expression is:
size = ((source[14] << 14) & 0xffff0000) | LE16(source + 15);
It gives 835070 bytes. The original decoder at 0x34927 consumes all
333456 source bytes and produces exactly that output size, leaving a following
32-byte canary intact. An independent bitstream/back-reference decoder
reproduces every output byte.
The decoder consumes control bits least-significant-bit first from 16-bit words. A leading one emits a literal byte. Zero enters short/long backward reference forms whose extra bits select distance and length; copying advances one byte at a time, permitting overlapping back-references. The short-form special marker distinguishes continuation from end-of-stream. It is a compressed stream with explicit termination, not a directory of raw lines.
After expansion, 6CHN occurs at the ordinary module signature offset
0x438 (1080). The raw occurrence at compressed-file offset 0xa4 did not
establish an uncompressed module at file offset zero. The expanded module has
31 sample headers, 19 active order entries and 16 six-channel patterns:
1084-byte header/order/signature area
+ 16 × 64 × 6 × 4 pattern bytes = 24576
+ 119232 sample bytes
= 144892 = 0x235fc
This independent module-length calculation lands exactly on the startup's scene pointer. The remaining 690178 bytes contain 91 consecutive FORM/PBM records, with no unexplained tail. All of that scene region matches all fourteen mapped memory saves. This establishes music/picture ownership without claiming a complete music-converter or audio-playback replay.
Picture Directory And Byte-Run Decoder
The executable contains 91 little-endian DWORD offsets at 0x24..0x18f.
Each is relative to sceneBase; all 91 equal independently parsed FORM
boundaries. Every shipped picture is 320×200, with eight-bit indices,
compression value 1, a 768-byte CMAP and a compressed BODY.
Consumer 0x130b validates FORM/PBM, the width bytes for 320 and compression
- Its chunk walker at
0x13ecstarts after the fixed BMHD area and skips chunks using a 16-bit big-endian length plus even padding. That suffices for these files; it is not a general, fully validated 32-bit IFF parser. The independent parser checks full FORM/chunk lengths through the exact file end.
The pixel loop is a byte-run decoder:
remaining = width * height; // 64000 for every shipped picture
for (;;) {
control = *source++;
n = control < 128 ? control + 1 : 257 - control;
if (n > remaining) break;
remaining -= n;
if (control < 128) copyLiteralBytes(n);
else repeatNextByte(n);
}
waitRetrace();
Control 80h would repeat 129 bytes in this consumer, rather than act as a
ByteRun no-op. None of the shipped BODY streams uses that control, so the
difference does not alter these decoded pictures.
The termination check has a less obvious consequence: after producing exactly
64000 pixels, the original reads one additional control byte before the
subtraction-underflow exit. For 46 records it reads the zero BODY pad; for
45 it reads the following FORM's initial F. The final record has padding,
so every such byte is inside the actual expanded data. No allocator-tail byte
is silently supplied by the model. The independent decoder consumes exactly
each declared BODY; the original consumer's extra read is recorded separately.
Opaque Pictures, Keyed Pictures And Palette Ownership
0x130b writes every decoded pixel, including zero, to pointer [8]. It
converts the CMAP components with >>2 into palette buffer [0x20], then
patches byte components 0x8d=29, 0x1b=10, 0x1c=12, 0x1d=25.
The related consumer 0x122a skips zero pixels and retains their previous
destination values. It uses the same compressed-body grammar but omits those
four palette patches. This is the ending's keyed overlay. It does not imply
that ordinary scripted pictures preserve trails or draw individual line
segments over an old frame.
Both consumers reset the DAC write index at port 3c8h. The full component
upload occurs separately in 0x1670, which sends the 768 prepared bytes to
3c9h. Keeping preparation and upload separate avoids assigning the wrong
palette to an intermediate memory state.
All 91 pictures were decoded through both original consumers: 182 complete 64000-pixel/768-palette comparisons against independent references. Keyed cases use nonzero destination history, and output canaries remain intact. Original opaque decoding plus actual DAC-output replay yields 89 distinct picture RGB images matching 6062 frames of the mapped native capture. The two remaining pictures are sampler inputs, covered by the ending below. Output identity alone does not determine the active decoder: pictures 89/90 also match where the keyed transition equals their standalone decoded image. The fixed caller establishes their actual role as overlays.

Native frame 3785, at 54.005 seconds, matches the original opaque bitmap and palette output. The outlines, moon, craft and lettering belong to the stored picture.
Scripted Animation And The Apparent Menu
Interpreter 0x140d reads bytecode at [0x1409]+[0x194], where 0x194 is
a byte cursor. The first fixed script occupies 0x198..0x308, with 165
commands including its terminator. The second occupies 0x309..0x315, with
six commands. Their operations are:
| Opcode | Bytes | Action |
|---|---|---|
00 |
2 | Decode one indexed picture opaquely and upload its palette |
01 |
2 | Wait using ten times the operand minus elapsed counter ticks |
02 |
5 | Alternate two picture indices, with interval and repetition bytes |
03 |
6 | Cycle three picture indices, with interval and repetition bytes |
05 |
1 | Clear 64000 VGA bytes, reset the elapsed counter and wait for retrace |
ff |
1 | Return |
The two-/three-picture operations explain much of the movement without a runtime geometry engine. Complete original interpreter tests request exactly 346 and 23 pictures respectively, matching independent expansion of the bytecode under declared no-Escape/tick inputs. These are draw-request counts, not counts of presented native frames.
The two-/three-picture wait helper skips waiting when interval-elapsed is
signed nonpositive. Opcode 1 has a separate LOOP path without that guard;
zero or underflowed counts must not be normalized into a harmless zero delay
in a general model. The tests supply explicit ticks and do not reconstruct
every timer/retrace scheduling boundary. An unsupported opcode also does not
advance the cursor; the dispatcher retries while checking Escape.

Native frames 5212..5422, every second frame, at 74.365..77.362 seconds. The checkboxes and wording are pixels in scheduled images. This clip preserves 106 captured samples in 3.02 seconds; it is not a recording of user choices.
The recovered chain tests port 60h for Escape. No arrow/Enter selection
changes its picture pairs. The first script uses indices 0..86; on ordinary
return the caller runs fixed pairs 88/89, then 87/90, and afterward the
second fixed script uses 86/85 before clearing and waiting. Both native runs
completed with no keyboard or mouse input.
The Ending's Fixed-Point Bitmap Sampler
The ending is more than direct playback. Helper 0x34620 requests two
65536-byte blocks from the program's private heap, then creates source and
work selectors. Original descriptor setup adds the image base to the relative
pointer, requests an inclusive limit of ffffh, and sets 32-bit data rights.
The selectors provide a 64 KiB source window and a separate work buffer.
Entry 0x804 first decodes picture 88 or 87 into the source block through the
opaque consumer, uploads that palette and resets counter [0x0c]. The
controller at 0x1217 increments elapsed [0x190] and adds aaaah to
[0x0c], wrapping both DWORDs.
For a counter held fixed within a frame, preparation forms:
q = signed_truncate_toward_zero(counter / 320);
xFixed = u32(0x1400000 - counter) >> 1;
yFixed = u32(0x0c80000 - (u32(counter * 5) >> 3)) >> 1;
step = rol32(q, 16);
At counter zero the sampler starts at the source centre, with zero step.
As the counter grows toward 0x1400000, its source window expands toward
the full picture. This is sampling from stored pixels, not computing new
outline geometry.
Rotated Accumulators And ADC Carry
The original loop clears output rows 0, 2, …, 198. On odd rows it emits
320 samples through an unrolled sequence of two loads, two ADCs and a word
store. FS:[BX] uses the 16-bit offset, even though the accumulator
arithmetic uses EBX:
for (y = 0; y < 200; ++y) {
if ((y & 1) == 0) clear320Bytes(output + 320*y);
else {
p = rol32(xFixed, 16);
sum16 = low16(p) + low16(320 * high16(yFixed));
carry = sum16 > 65535;
p = (p & 0xffff0000) | low16(sum16);
for (x = 0; x < 320; ++x) {
output[320*y+x] = source[low16(p)];
wide = uint64(p) + step + carry;
p = low32(wide);
carry = wide >> 32;
}
}
yFixed = u32(yFixed + q);
}
The initial 16-bit address-add carry feeds the first ADC. Later 32-bit overflows feed the next ADC; they are not added retroactively to the current pixel read. A floating-point coordinate replacement would lose that exact carry behaviour. The source address wraps at 65536, with no separate 64000-pixel clamp.
For a stable counter in 0..0x1400000, the derived source coordinates stay
inside the 64000 authored pixels. A deliberate test above that threshold,
0x140aaaa, reads 640 bytes from the allocation's tail. That exercises the
real 16-bit addressing rule against declared nonzero padding; it does not
prove the native run made those overshoot reads. The live source allocations
also contain nonzero tail bytes, so zero-filling an arbitrary source tail
would be unjustified.
Keyed Overlay, Displacement And Final Copy
After the sampler has produced all 64000 work pixels, the code sets the keyed destination to:
work + ((counter >> 16) & 0x15)
+ 320 * ((counter >> 16) & 3);
The horizontal term is a bit mask, not a modulus of fifteen. The same counter bits correlate the X/Y offsets. The maximum displacement is 981 bytes; the last possible overlay write is work byte 64980, inside the 65536-byte allocation. Those tail writes are outside the following display copy, which transfers exactly the first 64000 bytes.
Picture 89 or 90 is then decoded through the zero-keyed consumer. It can repopulate rows the sampler cleared. Its own unpatched CMAP supplies the last full palette upload. A 16000-DWORD copy presents the composite to VGA. Every visible work pixel was rebuilt before the overlay; no previous visible frame is needed as a feedback input.

Native frames 5930..6140, every second frame, at 84.610..87.606 seconds. All 106 samples preserve their captured colours and occupy 3.02 seconds.
Twenty complete original setup/sampler/keyed-overlay/palette/copy cases match the independent model, including captured and boundary counter values, with nonzero source/work tails and canaries. The two live transition saves also match the complete authored source pictures in their actual allocations.
A broader replay verifies 953 original transition states accounting for 961 native frames. Each selected case executes the sampler, zero or one explicit original-controller calls between sampling and overlay placement, the keyed decoder, the DAC upload and the complete screen copy. All displayed RGB bytes agree with the matching native candidates.

Native frame 6073, at 86.650 seconds. Its complete RGB output matches the original sampler and keyed overlay at the tested counter state.
These are full-frame output matches, not a recovered interrupt instruction history. The code reads the counter multiple times during preparation and again during overlay placement/exit. A memory save can therefore retain a quotient and counter from different moments. The controlled replays do not claim to predict CPU/beam timing or every possible interleaving.
Control, Release Order And A Cleanup Defect
The transition checks Escape only after its initial source load and a complete
sample/overlay/copy. Its unsigned loop continues at exactly 0x1400000 and
returns only above that value, unless Escape is seen. Returning from the first
transition does not by itself skip the second: the caller still makes the
second fixed-pair call before releasing both blocks, then checks Escape before
the final script. Twenty-one keyboard/threshold cases verify these branches;
arrow and Enter scan codes do not select different endings.
The source private block/selector is released before the work block/selector. Original allocation and release wrappers were executed with declared heap returns and DPMI services, checking pointer slots, descriptor bases/limits and release order. Their slots are not cleared, so later retained bytes are not proof an allocation remains active.
There is a separate wrong final-free argument. Startup records the
expanded allocation in [0x31a] and its interior scene pointer in [0x316].
Common cleanup at 0x7f1 passes [0x316] to private free 0x1d0e, which
expects a block header sixteen bytes before its argument. That is an interior
pointer 0x235fc bytes after the allocation base.
The ending save corroborates the difference: the real allocation has a KMMB
header immediately before it; the bytes before the scene pointer are module
sample data. Original callsite replay verifies the erroneous argument through
a free hook. It does not execute a speculative malformed free or claim a
visible fault, leak or allocator corruption. Natural return to DOS does not
prove every cleanup request was valid.
Verification Boundaries
The new evidence covers original carrier execution to its hand-off, complete DLZ expansion, the exact module/picture split, all 91 directory records, both bitmap consumers, fixed scripts, the late sampler/compositor, native image correspondence and selected allocation/control/release paths.
Original OS service hooks and controller-call insertions remain declared
inputs. Guest physical A0000 is not assumed to be the emulator's video
backing; native RGB comes from the recorded ZMBV stream. This is not a complete
music/DMA replay, universal file/parser safety proof, restored descriptor-table
snapshot or cycle-accurate interrupt/scanout model. The earlier line-renderer,
procedural-tunnel and interactive-choice interpretations have been replaced
by the recovered source/consumer mechanisms.