Analysis model: gpt-5.5 xhigh

Performance by Logic Design - Technical Dissection

Performance won the PC demo competition at Bizarre 1995. Its final archive contains one 947,013-byte executable, but that file is not one conventional program. It is a small DOS process manager followed by two setup programs and sixteen separately packed effect executables. The manager loads each child, relocates it, transfers control, catches its DOS exit, frees its memory and reuses the same segment for the next effect.

That architecture is the key to the demo. Four silent runtime snapshots restore four different children at the same CS=1EE5h, then stop inside their live loops: the opening image deformation, the texture tunnel, a clipped object renderer and the late polygon sorter. The analysis below follows those instructions rather than treating the 3D scenes as an unexplained sequence of pictures.

Release year: 1995

Identity And Original Evidence

Item Recovered fact
Production Performance by Logic Design
Competition release 9 September 1995; first in the Bizarre 1995 PC demo competition
Final archive perf_fin.zip, 935,907 bytes
Archive SHA-256 f5c2fed038f36e125c339ab17c8d033168db558e1427ad0582cf77188ad20679
PERFORM.EXE 947,013 bytes; SHA-256 cac62202496d5752d9de02dd3223a204ef0f411a23d01a34fb647d77949118e5
Code Jace, with Balance credited as coder
Graphics Rogue and Unicorn; end picture by Unique
Music Rogue and Jenkins
Design Rogue

The placing, platform and credits agree across the Demozoo production record, the Pouet production record and the original Scene.org party archive. The included PERFORM.DOC says the final version followed four weeks after the party build and replaced the timer routines so the demo would also work on Pentium machines. It asks for a 386 or better, 580 KiB free conventional memory and an optional 512 KiB Gravis UltraSound; its own recommendation is a 486 and VLB graphics.

The Outer EXE Is A Loader, Not The Demo Body

The distributed carrier begins with LZEXE 0.91. Restoring that layer produces a 4,160-byte MZ executable with SHA-256:

2b67ce75440708ea88cdbcb41718ac9ace09ea4f7799f32f8a428b9319675d27

Its 512-byte header gives an entry at load-image offset 013Fh. The important code starts by shrinking its own DOS block, probing the largest available allocation and rejecting machines with less than roughly the documented 580 KiB. It then walks past the environment strings to the executable pathname, opens that same file and seeks to offset 06FBh. That is where the first embedded MZ begins.

The loader routine at 033Fh is a compact implementation of DOS EXEC:

  1. Read the child's 28-byte MZ header.
  2. Compute the byte length from e_cp and e_cblp.
  3. Seek past the child's header.
  4. Read the load image in chunks of at most F000h bytes into a newly allocated block at load_segment + 10h.
  5. Read each four-byte relocation and add the load segment to its target word.
  6. Build the new SS:SP and patch a far jump with the child's CS:IP.
  7. Clear the general registers and jump into the child.

The code is explicit about the relocation pass:

read_relocation:
    mov  ah,3Fh             ; DOS read
    mov  cx,4
    mov  dx,0737h           ; offset:segment pair
    int  21h
    mov  bx,[0739h]         ; relocation segment
    add  bx,load_segment+10h
    mov  es,bx
    mov  di,[0737h]         ; relocation offset
    add  es:[di],load_segment+10h
    dec  word [074Dh]
    jnz  read_relocation

Calling the children sequentially would normally lose control at INT 21h, AH=4Ch. The loader therefore saves interrupt vector 21h from IVT addresses 0000:0084 and 0000:0086, installs its own handler at CS:03F3, and catches termination. The handler restores the loader's private stack, walks and frees the child's recorded allocations, and returns to the code that advances to the next MZ. Other DOS calls are chained to the original handler.

This is not an overlay table linked into one executable. Each visual part is a real DOS child with its own header, stack, relocations and termination call. The outer program turns a sequence of ordinary exits into one continuous show.

Eighteen Embedded Programs And A Trailer Index

Following every MZ's declared byte length gives an exact chain from 06FBh to E72C4h: child 0 is a 2,908-byte bootstrap, child 1 is a 315,799-byte shared setup/data program, and children 2 through 17 are the sixteen visual parts. The final 129 bytes contain sixteen little-endian (offset, size) pairs plus a terminal byte 10h:

Effect File offset Packed MZ bytes Effect File offset Packed MZ bytes
2 04E3EEh 24,106 10 0939A3h 40,689
3 054218h 22,457 11 09D894h 75,093
4 0599D1h 30,078 12 0AFDE9h 38,256
5 060F4Fh 26,722 13 0B9359h 41,785
6 0677B1h 31,354 14 0C3692h 25,465
7 06F22Bh 31,982 15 0C9A0Bh 37,605
8 076F19h 68,088 16 0D2CF0h 71,226
9 087911h 49,298 17 0E432Ah 12,186

Children 1 through 17 carry a WWP marker and are WWPACK-compressed. The available shareware WWPACK 3.04a identifies the format but reserves unpacking for its registered build; UNP 4.12 does not reconstruct these modules. That is where runtime memory becomes more useful than another signature guess.

Runtime Restoration Proves The Reused Arena

The final archive was run in DOSBox-X 2026.01.02 with a fixed 30,000-cycle 486, GUS disabled, the no-sound path selected, SDL's dummy audio backend and no host audio capture. In a DOSBox-X save, raw guest RAM begins at byte 0088h of the Memory component. The CPU component begins with CPU_Regs; the segment block begins at its byte 00EBh. Those layouts expose both the current MCB chain and the exact CS:EIP at the save instruction.

Every captured visual child owns the DOS block beginning at MCB 1ED4h, has a PSP at 1ED5h, and begins code at segment 1EE5h. The loader frees one child and gives the same address to the next. A following allocation supplies the framebuffer or scene workspace.

Visible part Indexed child Effect MCB paragraphs Saved CS:EIP Physical instruction
Opening image deformation 2 5844h 1EE5:0E3C 1FC8Ch
Pale texture tunnel 8 2CA7h 1EE5:514B 23F9Bh
Metallic object scene 13 22BCh 1EE5:A02E 28E7Eh
Late galaxy/terrain scene 16 38DDh 1EE5:5C73 24AC3h

No WWP marker remains in those blocks. The running program has already expanded the children, so the recovered bytes are the code the emulated CPU is actually executing. The four restored code images are 361,280, 182,640, 142,016 and 232,656 bytes respectively.

Effect 2: A 104x64 Affine Sampler, Then A Strange Repack

The opening face is not a sequence of stored reveal frames. Child 2 allocates a 64 KiB work segment and advances six phase accumulators by 5Ch, 4Bh, B0h, 73h, 3Dh and 8Fh. Each is reduced through a 1,024-entry trigonometric table. Products of those samples form two source-coordinate increments and two row increments.

The hot routine at 1708h draws 64 rows. Each row executes 26 iterations and emits four pixels, giving a 104x64 transformed image. The source coordinates live as two packed 16.16 accumulators in EDX and ESI; DH and BL select a byte from a 256x128 source, while ADC BL,CL carries the fractional advance:

    mov  bp,26
four_pixels:
    and  dh,7Fh
    mov  bh,dh
    add  edx,esi
    mov  ah,[bx]
    adc  bl,cl

    and  dh,7Fh
    mov  bh,dh
    add  edx,esi
    mov  al,[bx]
    adc  bl,cl
    shl  eax,16

    ; same pair once more
    add  di,4
    dec  bp
    mov  es:[di],eax
    jnz  four_pixels

The next pass does not copy those rows normally. For each source dword it writes the four bytes at destination offsets +9, +6, +3 and +0, advances the destination by 12, and adds 0288h between rows. A third routine selects one of nine small offset patterns and adds 26 dwords across 59 rows into the work page. The visible woven/dithered reveal comes from this affine sample, three-byte-spaced repack and additive composite, not from a video-like asset.

Performance opening affine face deformation

The same child polls VGA input-status port 03DAh before presenting a frame and programs palettes through 03C8h/03C9h. One snapshot stopped at 0E3Ch, the second half of the classic wait-for-retrace pair.

Effect 8: Four Texture Fetches Per Dword Store

The pale tunnel's snapshot landed on the decrement at 514Bh, in the hottest part of its span mapper. The routine clips endpoints against scene bounds, computes the span length and derives two texture-coordinate increments. Spans up to 126 pixels use reciprocal tables through FS; longer spans fall back to signed division. DS is then changed to the texture segment.

The aligned path handles four pixels per branch:

    ror  ebp,2             ; convert pixel count to dword count
    sub  di,4
dword_loop:
    mov  bh,dh
    add  edx,esi           ; advance packed fractional coordinates
    mov  al,[bx]           ; texture sample 0
    adc  bl,cl

    mov  bh,dh
    add  edx,esi
    mov  ah,[bx]           ; sample 1
    adc  bl,cl
    shl  eax,16

    mov  bh,dh
    add  edx,esi
    mov  al,[bx]           ; sample 2
    adc  bl,cl

    mov  bh,dh
    add  edx,esi
    mov  ah,[bx]           ; sample 3
    adc  bl,cl
    rol  eax,16

    add  di,4
    dec  bp
    mov  es:[di],eax
    jnz  dword_loop

An unaligned prefix writes bytes until DI & 3 becomes zero, and a byte tail handles the remainder. The surrounding loop advances the endpoint records and the destination by 320 bytes per row. Thus the tunnel is conventional affine texture mapping made fast for a 386/486: reciprocal lookup when possible, packed fractional state, an aligned four-pixel body and no call inside the hot loop.

Performance affine texture tunnel

Effect 13: Clipping Is Part Of The Span Setup

The metallic-object child uses a related but not identical renderer. At 9F9Ah it takes successive endpoint records from a 16-entry ring, compares them against clip bounds at 000Eh and 0010h, and records four boundary conditions in bits 0 through 3 of a flag byte. Out-of-range coordinate differences beyond +126 or below -126 take separate correction paths; ordinary differences index signed reciprocal tables through FS.

The main write loop begins at A102h:

    inc  bp
span:
    mov  [di],eax          ; packed value for this pixel/column
    add  edi,esi           ; fractional pointer/attribute step
    adc  ax,bx             ; carry into integer component
    dec  bp
    jnz  span

Before reaching it, the four clip bits choose whether to interpolate from the original edge, the low boundary or the high boundary. The code multiplies the distance to the selected boundary by a precomputed increment, adjusts both the integer word and the high fractional part in EDI, and only then enters the branch-minimal writer. The effect's irregular rotating forms therefore still come through explicit clipped edge spans; they are not blitted prerenders.

Performance metallic object renderer

Effect 16: Backface Test And A Two-Pass Radix Sort

The late scene gives the clearest view of the object pipeline. Polygon records hold three vertex indices and sometimes a fourth; D6D8h is the triangle sentinel. Every index is shifted left by three, proving an eight-byte projected vertex record. The routine reads the vertices, rejects polygons outside the vertical bounds, and forms a signed 32-bit determinant from two edge products. The DEC EDX / JNS decision at 5C1Ah is its facing test.

Accepted polygons receive a depth key. Three vertex depths are shifted right by three and added; a fourth is included unless the sentinel marks a triangle. Triangles double the sum, while quads multiply it by one and a half. After a bias and rotate, the key and polygon reference are appended as one dword.

The striking part is the sorter at 5CADh. It clears 512 bytes, counts records into 256 four-byte buckets, converts those counts to destination pointers, and distributes the dwords by one key byte. Then it swaps the source and destination pointers with a 16-bit rotate and runs the same pass a second time:

pass:
    xor  eax,eax
    mov  di,586Ch
    mov  cx,128
    rep  stosd             ; clear 256 word counts / pointers

count:
    mov  bx,[si]
    add  si,4
    and  bx,01FEh
    add  word [bx+586Eh],4
    loop count

    ; prefix sums turn counts into write pointers

scatter:
    mov  eax,[si]
    mov  bx,ax
    and  bx,01FEh
    ror  ax,8
    mov  di,[bx+586Ch]
    add  si,4
    mov  [di],eax
    add  word [bx+586Ch],4
    loop scatter

    rol  eax,16            ; exchange the two list pointers
    dec  byte [5D31h]
    jnz  pass

That is a stable two-pass, base-256 radix sort over the 16-bit key. It avoids an O(n log n) comparison sort and preserves a predictable memory-access pattern on a 486. The sorted list then feeds the renderer for the galaxy-backed and terrain-like polygon scenes.

Performance galaxy and polygon terrain

The Visual Sequence Is Mostly A Change Of Child

The direct silent run shows why the executable organization works well. The opening deformation, Rogue title, illustrated creature and orb, pale tunnel, space scene, metallic objects, soft shaded forms and late landscape each have their own data and code budget. Instead of keeping every renderer resident, the manager retains shared state, replaces the current child in the 1ED5h arena and allocates only the work pages that child asks for.

Performance illustrated creature and moving orb

This also explains the abrupt stylistic cuts. They are executable boundaries, not merely branches in a single master frame loop. The common signatures -- mode 13h pages, 03DAh retrace polling, 1,024-step tables, packed 16.16 coordinates and dword stores -- reflect shared techniques, while the child boundary lets Jace and Balance specialize clipping, interpolation and object data for each scene.

Timing, Sound And The Final Fix

The final documentation says only the timer routines changed after the competition version failed on Pentium systems. The restored effects repeatedly use explicit VGA retrace waits for presentation, but the show also needs a coarser timeline to decide when a child exits. The final carrier successfully selects its no-sound path when no GUS is detected, continues after one keypress, runs all visual children and returns to DOS normally.

For this preservation pass, audio hardware and host output were disabled from the beginning. No music was played, captured or embedded. Five short GIFs were cut directly from a lossless silent 640x400 runtime recording; that recording is analysis material and is not published. The GIFs are visual checks for the recovered routines, while the claims about loop structure, dimensions, allocation and arithmetic come from the restored bytes.

What Is Established, And What Is Not

The outer LZEXE layer, embedded MZ boundaries, trailer index, relocation loader, INT 21h exit interception, live DOS allocation chain and four runtime code images are directly recovered. The affine samplers, clipping decisions, four-pixel texture loop, polygon determinant and two-pass radix sort are direct instruction-level readings.

The original symbol names and source are not present. Descriptive names such as "span mapper", "facing test" and "radix sort" state what the instructions do; they are not claimed author labels. Twelve visual children have not yet been exhaustively annotated instruction by instruction. The container makes such follow-up unusually tractable: capture the child, read its MCB size and CS:EIP, carve the reused arena, then analyze that effect as a separate program.