Analysis model: GPT-5 (Codex), reasoning level not exposed

Bibo Ergo Sum by Valhalla - Technical Dissection

Scope

Bibo Ergo Sum is Valhalla's MS-DOS/GUS 64K intro that placed second in the PC 64K Intro competition at The Gathering 1995, between Valhalla's own Fluid Motion and DarkZone's Maple. This writeup is based on the public scene.org archives, the release text, a complete keyed runtime run, RNC expansion, and static disassembly of the expanded 16/32-bit code image.

Release year: 1995

Public references:

Offset notation:

This is not a source-level reconstruction. Effect names are inferred from code shape, strings, and data layout unless explicitly named by the shipped text.

Complete Keyed Runtime Run

I ran the final VAL-BES.EXE under DOSBox-X 2026.01.02 from its startup console through the final VOTE scene. The program's prompt displays Select GUS-port (270h) !, but it does not accept a three-digit port number. I entered the single digit 4 to select the emulated 240h port, let the authored sequence reach its final fade to black, and pressed Esc. The intro then restored text mode and returned to DOS normally.

The confirmed route was:

Capture time Directly observed runtime state
00:00 Technomancer's XMS kernel banner and the one-digit GUS-port prompt.
00:03 The space-opera parody begins in generated bitmap text.
00:15–00:48 One ship becomes a moving fleet; red-lit engine faces and depth ordering stay coherent through close passes.
00:52–01:08 Colored 3D letter blocks assemble the Valhalla name around a textured torus.
01:09 PRESENTS bridges into the main object sequence.
01:12–01:40 A checker torus and mapped blocks, club, spheres, and other objects rotate through the camera.
01:41–02:00 The greetings page is progressively revealed beside the moving torus.
02:01–02:38 Lettered cubes spell out the coder credit while the object pile separates and reforms.
02:39–03:05 Graphics and music credits run over a dense mapped-object scene.
03:06–03:18 A textured torus forms the O in VOTE; the scene then fades fully to black.
03:25 Esc exits the waiting frame loop and returns to DOS.

This is one continuous excerpt from the confirmed run, not a tiled contact sheet. It covers the live letter-cube section and its transition into the credit:

Continuous Bibo Ergo Sum runtime excerpt showing the lettered cubes moving through the coder-credit scene

The source capture is 640x400 at 25 frames per second and has no audio stream. The guest GUS was present only so the original player could provide its normal timing; SDL used a dummy host audio driver throughout. No audio was monitored or published.

Runtime-To-Code Concordance

The port prompt is handled at expanded+0x4fcd. The input routine deliberately accepts one ASCII digit, masks it to a nibble, shifts it into the port's tens position, and combines it with 0200h:

4fcd: mov esi,127bah
4fd3: call 3eaeh          ; print startup prompt
4fd9: call 2e5bh          ; read a key
4fde: cmp  al,39h         ; reject above '9'
4fe2: cmp  al,30h         ; reject below '0'
4fe6: and  ax,000fh
4fea: shl  ax,04h
4fee: or   ax,0200h
4ff2: mov [01bbf2h],ax    ; selected GUS base

The top-level protected-mode entry calls that selector before mode 13h and the script setup. The observed run follows the frame loop at 0x4434..0x448e:

4407: call 4fcdh          ; one-digit GUS selection
440c: call a1b5h          ; BIOS mode 13h
4411: call a030h          ; clear frame/depth buffers
4416: call 9331h          ; script/timeline setup
...
4434: call a0ebh          ; palette/frame preparation
443e: call 9596h          ; advance scripted state
4466: call 4de8h          ; object transform pass
447a: call 4eafh          ; projection
447f: call 9600h          ; mapped drawing path
4484: call a06fh          ; present frame
4489: call 2e79h          ; key pending?
448e: je   4434h          ; no: render the next frame
4490: call 2e5bh          ; consume the exit key

This makes the runtime boundary explicit. The intro advances automatically, but its final black frame waits for a key; Esc was the key used in the confirmed run. The opening ships, Valhalla assembly, greetings, credit cubes, and final VOTE torus all passed through the same transform/projection/mapped draw loop, while the interpreter described below changed objects, text, and timed parameters.

Release Context

The shipped text identifies the production as the second-place The Gathering 1995 PC 64K intro and lists the core credits:

The hardware requirements in the release text are a 386, VGA, Gravis UltraSound or silent mode, roughly 500 KB conventional memory, roughly 1300 KB high memory, and support for raw, XMS, or VCPI execution. It also says the first party release was buggy and that this version fixes most of the trouble. Private period addresses and distribution listings from the text are intentionally not reproduced here.

Archive Identity

Two scene.org archives were checked:

5102911b44fd92ed0590d32d648d73bef4c769fe745ac1b36dadbcd0c13dc8b7  val-bes.zip
45172c48efcfc81e0e871600ceb913bf3bfd9620402475eadb5944beaeba30e9  val_besf.zip

The zip containers differ, but their extracted files are byte-identical:

bfd3edfe803553c600371f87250e1d61e58f9ff0c0d70858c51d3fcd7040442a  file_id.diz
3463aac5ad358aca63c287fe9bbbd973d68bbf632b799db84d41ac7ad3ad3a91  val-bes.exe
918e3eccb74165c996e5a0468697054a09e253756746f74c88bf01cd1f8197b9  val-bes.txt

Archive contents:

file_id.diz       73 bytes
val-bes.exe   66,886 bytes
val-bes.txt    6,041 bytes

The final/Pouet-linked archive is therefore the one cited as the primary download, but all executable offsets below apply to either archive.

Packed EXE Layout

VAL-BES.EXE is a DOS MZ executable whose real payload is an RNC ProPack block starting immediately after the 32-byte MZ header.

file size:        66,886 bytes
MZ image size:    66,886 bytes
header size:          32 bytes
relocations:           0
entry point:      CS:IP 1024:000c
entry file off:   0x1026c
stack:            SS:SP 39e0:04e6
RNC block off:    0x00020

The RNC header reports:

method:          RNC1
unpacked size:   237,026 bytes (0x39de2)
packed size:      66,092 bytes (0x1022c)
header CRC bytes: be bd 0c da

Expanded payload hash:

97a09aea500d6e18ee00f00fdd073f6fbd851c9dff26a80b52a30c1e36e122c1  RNC-expanded image

The useful nonzero ranges in the expanded image are:

000800-014deb   83,436 bytes   startup, kernel, intro code/data, object tables
01d1a0-01dadf    2,368 bytes   module/player signature tables
01dc92-01dcac       27 bytes   small player data island
01e596-02b6ad   53,528 bytes   GUS player and embedded music data
02c68f-02e68a    8,188 bytes   embedded music sample data
02ee95-03165e   10,186 bytes   embedded music sample data
031e8f-032021      403 bytes   embedded music/sample tail
032691-039de1   30,545 bytes   generated/static visual data

The first 0x800 bytes are zero in the expanded image. The entry stub and kernel arrange selector bases, stacks, and relocation so the zero prefix is not where the first real-mode code begins.

RNC Depacker

The packed entry at VAL-BES.EXE+0x1026c is a compact RNC1 depacker/stager. It begins by normalizing segment registers and moving the packed block so there is room for the expanded image:

; VAL-BES.EXE+0x1026c, 16-bit
mov bx,ss
mov es,bx
mov dx,cs
mov ds,dx
mov cx,[0008h]       ; packed/staged size
mov si,cx
sub si,2
mov di,si
shr cx,1
std
rep movsw

It then allocates scratch space for three Huffman tables:

sub sp,001ah
mov bp,sp
sub sp,0180h
mov ax,sp
mov [bp+08h],ax
add ax,0080h
mov [bp+0ah],ax
add ax,0080h
mov [bp+0ch],ax

The main RNC loop is recognizable as standard RNC1: read three Huffman tables, copy a literal run, decode back-reference length/distance, and copy from the already-expanded output.

; literal run
10330: mov dx,[bp+08h]
10333: call 103de
10336: jcxz 1035d
10338: rep movsb

; back-reference
1030e: mov dx,[bp+0ah]
10311: call 103de
10314: push cx
10315: mov dx,[bp+0ch]
10318: call 103de
1031b: add cx,2
1031e: pop ax
1031f: inc ax
10324: sub si,ax
10329: rep movsb

After expansion it applies relocation-style fixups using the MZ relocation table offset 0x28c:

10392: mov dx,es
10396: mov si,028ch
10399: lodsb
1039a: mov cl,al
1039c: jcxz 103b1
1039e: lodsw
1039f: add ax,dx
103a1: mov es,ax
103a5: xor ah,ah
103a7: lodsb
103a8: add di,ax
103aa: add word es:[di],dx
103ad: loop 103a7
103af: jmp 10399

Finally it restores the real stack and far-jumps through a packed-stub pointer:

103b3: mov si,cs:[0004h]  ; restored SP
103b7: mov di,cs:[0006h]  ; restored SS delta
103bb: add di,dx
103bd: add word cs:[0002h],dx
103c1: sub dx,0010h
103c4: mov es,dx
103c6: mov ds,dx
103cc: cli
103cd: mov sp,si
103cf: mov ss,di
103d1: sti
103d2: ljmp cs:[0000h]

So the executable is not merely compressed; it reconstructs a relocated memory image before the intro/kernel proper starts.

Embedded Music

The expanded image contains Robban/Cascada's GUS player and an embedded 8-channel MOD. The player recognizes common ProTracker/FastTracker signatures; the actual module starts at expanded+0x1fa53.

Module facts:

module offset:   0x1fa53
signature:       8CHN
song length:     47 positions
patterns:        37
sample bytes:    30,514
module end:      0x309c1

The visible sample names include by Oxide / Valhalla, for the intro..., and 'Bibo ergo sum' :).

The GUS IRQ/player update routine starts at expanded+0x1e596. It is a true hardware path, not a generic mixer. It writes GF1 voice registers through the selected GUS base:

; expanded+0x1e607, 32-bit IRQ/player update
mov edi,01c356h
mov cx,[01bbfah]       ; number of active voices/channels
mov dx,[01bbf2h]       ; GUS base
add dx,0103h
dec dx

; per voice
mov al,[01bbfah]
sub al,cl
out dx,al              ; select voice/channel
inc dx
...
mov al,07h
out dx,al              ; GF1 register select
xchg bx,ax
inc dx
out dx,ax              ; register data
dec dx
mov al,08h
out dx,al
mov ax,bp
inc dx
out dx,ax

Every voice record is 0x34 bytes:

add edi,34h
dec cx
jne 1e61f

This is the normal GUS playback path. The release text also claims a no-GUS mode; the complete visual run documented above instead kept the original GUS timing path active while routing host output to a dummy driver.

Protected-Mode Kernel

The first useful code island begins at expanded+0x0800. It is a real-mode bootstrap for Technomancer's protected-mode kernel:

0800: cli
0801: mov ax,0003h
0804: int 10h
0806: mov ax,cs
0808: mov ss,ax
080a: mov sp,0bfch
080d: sti
080e: mov cs:[188eh],ds
0813: mov ax,cs
0815: mov ds,ax
0817: mov es,ax
0819: mov dx,1857h
081c: mov ah,09h
081e: int 21h
0820: call 17f8h       ; CPU check
0823: call 09cch       ; descriptor/control setup
0826: call 16f8h       ; exception/interrupt descriptors
0829: call 149fh
082c: call 1821h       ; memory environment detect

expanded+0x1821 detects three execution environments:

1825: les bx,es:[019ch]
182d: cmp dword es:[000ah],584d4d45h   ; "EMMX"
1837: cmp dword es:[000eh],30585858h   ; "XXX0"
1842: mov ax,4300h
1848: int 67h                          ; VCPI check
...
1889: mov ax,4300h
188c: int 2fh                          ; XMS check
1892: mov byte [1896h],1               ; XMS
1899: mov byte [1896h],0               ; raw
1871: mov byte [1896h],2               ; VCPI

The mode-specific branches are:

expanded+0x1991  raw extended-memory path
expanded+0x1a3a  XMS path
expanded+0x1c5c  VCPI path

The XMS path allocates an extended-memory block, builds page tables, remaps the PIC, switches to protected mode, and jumps through a protected-mode callback:

1a5d: mov ax,4310h
1a60: int 2fh
...
1b2a: lidt [0060h]
1b2f: lgdt [005ah]
1b42: mov eax,cr0
1b45: or  al,1
1b47: and eax,7fffffffh
1b4d: mov cr0,eax
1b52: ljmp 0008h:00000000h

The VCPI path does the equivalent work with int 67h function DE0xh calls and VCPI page mappings. This is a substantial part of the binary, and it is mostly runtime infrastructure rather than visual effect code.

Mode, Console, and Palette Helpers

The protected-mode side can thunk back to real mode for BIOS/DOS work. Setting mode 13h is just:

; expanded+0xa1b5
a1b5: mov ax,0013h
a1b9: call 31a9h       ; real-mode int 10h thunk
a1be: ret

There is also a text console path used for diagnostics/error screens. It writes directly to the color text segment through a base value stored at [0x500] and tracks the cursor in [0x51c]:

; expanded+0x3e1f, 32-bit text output
3e25: mov edi,[051ch]
3e2b: mov ebx,[0500h]       ; B8000-relative base
3e31: mov ah,[0520h]        ; attribute
...
3e58: mov word [edi+ebx],ax
3e5c: add edi,2

When it reaches the bottom, it scrolls by copying text rows and clearing the last row:

3e68: mov edi,[0500h]
3e6e: lea esi,[edi+00a0h]
3e74: mov ecx,03c0h
3e7a: rep movsd
3e7c: mov eax,07200720h
3e81: mov ecx,0028h
3e86: rep stosd

The palette routine at expanded+0xa139 writes the DAC directly. It builds a two-sided ramp from three base channels at 0x1586c/70/74:

a139: mov dx,03c8h
a13d: mov al,[15868h]
a142: out dx,al
a143: inc dx              ; 03c9h
a145: mov cl,04h
a147: mov al,[1586ch]
a14c: mul cl
a14e: shr ax,0ah
a152: out dx,al
...
a16b: add cl,08h
a16e: jae a147

The second half moves toward white by subtracting the base color from 0xff, scaling, and adding the original channel back:

a170: mov al,0ffh
a172: sub al,[1586ch]
a178: mul cl
a17a: add ah,[1586ch]
a180: shr ax,0ah
a184: out dx,al

This is a compact DAC fade/ramp generator: it avoids a 768-byte stored palette and derives the ramp from three live channel values.

Frame Buffers and Z Buffers

expanded+0xa030 clears the main pixel buffer and two dword-sized per-pixel buffers:

a031: mov esi,[12ae4h]     ; 64,000-byte chunky frame buffer
a037: mov edi,[12ac0h]     ; dword buffer
a03d: mov ebp,[12acch]     ; another dword buffer
a043: mov ecx,0fa00h
a048: mov byte [esi],0
a04b: mov dword [edi],0ffffffffh
a051: mov dword [ebp],0ffffffffh
a058: add esi,1
a05b: add edi,4
a05e: add ebp,4
a061: dec ecx
a062: jne a048

The later texture span routine uses one of these dword arrays as a z/depth buffer:

976e: add esp,[12b38h]     ; depth-buffer base
9774: add edi,[12ae4h]     ; frame-buffer base
977a: cmp ebp,[esp]
977d: ja  97c0             ; skip if existing depth wins
977f: mov [esp],ebp        ; store new depth

The important architectural point is that Bibo Ergo Sum is not merely drawing flat triangles into a linear framebuffer. It carries a full dword depth buffer for the mapped object path.

Object Transform Pipeline

The object table begins around 0x1226e, with the object count at 0x127ae. Several passes iterate that object table.

The core transform routine at expanded+0x4cd5 multiplies a vertex by a 3x3 matrix. Source vertex fields live at [esi+0/4/8]; transformed fields are stored at [esi+0x0c/0x10/0x14]. The fixed-point scale is handled by SHRD ...,0x1e, effectively keeping the high result of a 30-bit fixed-point product.

4cd5: mov eax,[edi]
4cd7: imul dword [esi]
4cd9: shrd eax,edx,1eh
4cdd: mov ebx,eax
4cdf: mov eax,[edi+04h]
4ce2: imul dword [esi+04h]
4ce5: shrd eax,edx,1eh
4ce9: add ebx,eax
4ceb: mov eax,[edi+08h]
4cee: imul dword [esi+08h]
4cf1: shrd eax,edx,1eh
4cf5: add eax,ebx
4cf7: mov [esi+0ch],eax

The same pattern repeats for y and z:

4d1d: mov [esi+10h],eax
...
4d43: mov [esi+14h],eax

The transform pass iterates object-local vertices:

4de8: mov ecx,[127aeh]
4dee: mov ebx,1226eh
4df3: cmp dword [ebx],0
4dfa: mov ebp,[ebx+0ch]
4dfd: mov ecx,[ebx+08h]
4e00: mov edi,[ebx+18h]      ; matrix/object transform
4e03: mov esi,[ebp+40h]
4e06: call 4cd5h
4e0b: add ebp,44h
4e0e: dec ecx
4e0f: jne 4e03h

Projection at expanded+0x4eaf checks for positive-enough z, divides x and y by z, and writes fixed-point screen coordinates:

4ecb: cmp dword [esi+2ch],0
4ecf: je  4f00h
4ed1: cmp dword [esi+14h],40000h
4ed8: jl  4f00h
4eda: mov eax,[esi+0ch]
4edd: imul dword [12b44h]
4ee3: idiv dword [esi+14h]
4ee6: mov [esi+18h],eax      ; projected x, centered later
4ee9: mov eax,[esi+10h]
4eec: imul dword [12b48h]
4ef2: idiv dword [esi+14h]
4ef5: mov [esi+1ch],eax      ; projected y
4ef8: mov eax,[15830h]
4efd: or  [esi+14h],eax      ; tag/flag depth

Visibility and backface passes follow:

The face draw iterator starts at expanded+0x960b. It walks the object table, then the triangle records. If [esi+0x0c] is nonzero, the face is active:

960b: cmp dword [ebx],0
9612: mov eax,[ebx+1ch]
9615: mov [76ech],eax
9624: mov esi,[ebx+14h]      ; triangle list
9627: mov ecx,[ebx+10h]      ; triangle count
...
9645: cmp dword [esi+0ch],0
9649: je 965b
964e: call 99d5h             ; per-vertex light/depth parameter
9653: call 9ad9h             ; triangle mapper
965b: add edi,44h
965e: add esi,14h
9661: dec ecx
9662: jne 9645h

That gives the high-level object renderer:

for each object:
    transform vertices by object matrix
    project vertices by z
    mark visible triangles
    backface-cull triangles
    for each visible triangle:
        compute per-vertex light/depth parameter
        rasterize textured triangle with z-buffer

Per-Vertex Light / Depth Parameter

expanded+0x99d5 runs before texture mapping in one draw path. It computes a dot product between a transformed vector and fields at +0x30/+0x34/+0x38, normalizes it with +0x3c, scales it by [0x15820], shifts it, clamps it, and stores the result at [vertex+0x20].

One of the three repeated vertex blocks:

99d6: mov edi,[esi+10h]
99d9: mov ebp,[esi]
99db: mov eax,[edi+0ch]
99de: imul dword [ebp+30h]
99e1: mov ebx,eax
99e3: mov ecx,edx
99e5: mov eax,[edi+10h]
99e8: imul dword [ebp+34h]
99eb: add ebx,eax
99ed: adc ecx,edx
99ef: mov eax,[edi+14h]
99f2: imul dword [ebp+38h]
99f5: add eax,ebx
99f7: adc edx,ecx
99f9: jl  9a11h
99fb: div dword [ebp+3ch]
99fe: mul dword [15820h]
9a04: div dword [ebp+3ch]
9a07: shl eax,0ah
9a0a: cmp eax,4000h
9a0f: jge 9a16h
9a11: mov eax,4000h
9a16: add eax,[1581ch]
9a1c: cmp eax,0ffc000h
9a23: mov eax,0ffc000h
9a28: mov [ebp+20h],eax

This value is later interpolated across the triangle alongside x and texture attributes. Whether it is best described visually as light, reciprocal depth, or a combined shading coordinate depends on the object script, but structurally it is a per-vertex scalar feeding the span mapper.

Textured Triangle Mapper

The central rasterizer starts at expanded+0x9ad9. Triangle records point to three vertex records:

9ad9: mov ebx,[esi]      ; vertex A
9adb: mov edi,[esi+04h]  ; vertex B
9ade: mov ebp,[esi+08h]  ; vertex C

It sorts the three vertices by fixed-point y (+0x1c):

9ae1: mov eax,[ebx+1ch]
9ae4: cmp eax,[edi+1ch]
9ae7: jge 9aeb
9ae9: xchg edi,ebx
9aeb: mov eax,[ebx+1ch]
9aee: cmp eax,[ebp+1ch]
9af1: jge 9af5
9af3: xchg ebp,ebx
9af5: mov eax,[edi+1ch]
9af8: cmp eax,[ebp+1ch]
9afb: jge 9aff
9afd: xchg ebp,edi

The y clip tests are against +/-100.0 in 16.16:

9aff: cmp dword [ebp+1ch],00640000h
9b06: jge a01f
9b0c: cmp dword [ebx+1ch],ff9c0000h
9b13: jl  a01f

It derives integer y rows plus fractional carry values:

9b19: mov eax,00640000h
9b1e: sub eax,[ebx+1ch]
9b23: sar eax,10h
9b26: mov [15884h],eax
9b2b: not edx
9b2d: and edx,0ffffh
9b33: mov [15890h],edx

Then it computes edge slopes using signed division. For x:

9b69: mov ecx,[ebx+1ch]
9b6c: sub ecx,[edi+1ch]
9b6f: cmp ecx,4000h
9b77: mov ecx,4000h       ; minimum delta to avoid tiny divide
9b7c: mov eax,[edi+18h]
9b7f: sub eax,[ebx+18h]
9b82: mov edx,eax
9b84: sar edx,10h
9b87: shl eax,10h
9b8a: idiv ecx
9b8c: mov [158f4h],eax

The same pattern is repeated for both triangle halves and for additional attributes at +0x20, +0x24, +0x28, and +0x14. The split point is interpolated into a temporary vertex at 0x15fb0:

9c2a: mov edi,15fb0h
9c2f: mov eax,[esi+1ch]
9c32: mov [edi+1ch],eax
...
9c35..9c8c: interpolate attributes with IMUL / SHRD 16

The triangle mapper does not draw pixels directly. It fills scanline edge tables through expanded+0x9813, prepares span increments with expanded+0x995b, and then draws with expanded+0x9680:

9f3a: call 9813h
...
a010: call 9813h
a015: call 995bh
a01a: call 9680h

Edge Table Builder

expanded+0x9813 handles y clipping and writes one dword per scanline into six parallel edge/attribute tables. If the first y is negative, it advances all interpolants until y reaches zero:

9813: cmp dword [15878h],0
981a: jge 987a
981c: cmp dword [1587ch],0
9823: jl 995a
9829: mov eax,[1589ch]
982e: mov ebx,[158ach]
9834: mov ecx,[158c0h]
983a: mov edx,[158d4h]
9840: mov esi,[158e8h]
9846: mov ebp,[15908h]
984c: add [15898h],eax
9852: add [158a8h],ebx
9858: add [158b8h],ecx
985e: add [158cch],edx
9864: add [158e0h],esi
986a: add [15900h],ebp
9870: inc dword [15878h]
9876: jne 984c

For visible rows it stores x and five attributes:

98c7: mov eax,[15898h]
98cc: mov [ecx+13d4ch],eax
98dd: mov eax,[158a8h]
98e2: mov [ecx+1406ch],eax
98f3: mov eax,[158b8h]
98f8: mov [ecx+1438ch],eax
9909: mov eax,[158cch]
990e: mov [ecx+146ach],eax
991f: mov eax,[158e0h]
9924: mov [ecx+149cch],eax
9935: mov eax,[15900h]
993a: mov [ecx+14cech],eax
994b: add ecx,4
994e: cmp ecx,[1587ch]
9954: jne 98c7

This is a table-based triangle rasterizer: expensive edge interpolation is done once per edge, then the final span loop can be small and tight.

Z-Buffered Texture Span

expanded+0x9680 is the most important inner loop. It walks visible scanlines, clips x, loads the interpolated values for that row, and enters a per-pixel span loop with a dword depth test.

Row setup:

9680: mov eax,[1588ch]
9685: cmp eax,0c8h
968c: mov eax,0c8h          ; clamp bottom to 200
9691: mov ebx,[15884h]
9697: cmp ebx,0
969c: mov ebx,0             ; clamp top to 0
96a1: sub eax,ebx
96a9: mov [15914h],eax      ; row count
96b2: mov eax,[ebx+1500ch]
96b8: mov [15834h],eax      ; row byte offset / 320 stride

X clipping and attribute fetch:

96c3: mov ecx,[ebx+1406ch]
96c9: sar ecx,10h           ; right x
96d2: mov edi,[ebx+13d4ch]
96e4: sar edi,10h           ; left x
...
9723: mov ecx,013fh         ; clamp to 319
9728: sub ecx,edi           ; span length in packed counter form
9730: add edi,[15834h]      ; row offset + x
9738: mov ebp,[ebx+14cech]  ; depth/shade attr
973e: mov edx,[ebx+1438ch]
9744: ror edx,10h
9747: mov esi,[ebx+149cch]
974d: ror esi,10h
9750: mov ebx,[ebx+146ach]
9756: ror ebx,10h

The code temporarily uses ESP as the depth-buffer pointer. That is why it disables interrupts inside the span:

9761: cli
9762: mov [7f84h],esp
9768: mov esp,edi
976a: add esp,esp
976c: add esp,esp
976e: add esp,[12b38h]      ; depth pointer = zbase + pixel*4
9774: add edi,[12ae4h]      ; framebuffer pointer

The hot pixel loop:

977a: cmp ebp,[esp]
977d: ja  97c0              ; old depth is nearer, skip write
977f: mov [esp],ebp
9782: mov ah,bl
9784: add ebp,00010001h
978a: mov ch,[eax+00010001h]
9790: add edx,00010001h
9796: mov ah,[ecx+00010001h]
979c: mov [edi],ah
979e: adc ecx,00010001h
97a4: add esi,00010001h
97aa: adc ebx,00010001h
97b0: adc eax,00010001h
97b5: add esp,4
97b8: inc edi
97b9: cmp dh,0ffh
97bc: jne 977a

The skip path advances exactly the same interpolants without storing:

97c0: add ebp,00010001h
97c6: add edx,00010001h
97cc: adc ecx,00010001h
97d2: add esi,00010001h
97d8: adc ebx,00010001h
97de: adc eax,00010001h
97e3: inc edi
97e4: add esp,4
97e7: cmp dh,0ffh
97ea: jne 977a

The register packing is size-optimized and slightly hostile to readers:

In pseudocode, ignoring the packed-register tricks:

for each scanline:
    clip x0/x1 to 0..319
    for x = x0; x <= x1; x++:
        if new_z <= zbuffer[pixel]:
            zbuffer[pixel] = new_z;
            framebuffer[pixel] = texture_or_shade_lookup(interpolants);
        advance all interpolants;

This is the "perfectly mapped" part people tend to remember: the intro is doing depth-tested texture/attribute spans inside a 64K intro envelope, not just affine flat-shaded triangles.

Procedural Texture / Noise Pass

The routine group at expanded+0xa208 builds or mutates a 64 KB byte field. It appears to be a midpoint/noise-style texture generator used by one of the visual parts.

The dispatcher is:

a208: call a218h
a20d: call a1c0h
a212: call a34dh
a217: ret

expanded+0xa218 derives a scale/step from [0x82e0] and stores the result at [0x82dc]:

a218: mov ebx,[82e0h]
a21e: shr ebx,10h
a221: sub ebx,10000h
a227: neg ebx
a229: mov eax,0
a22e: mov edx,1
a233: div ebx
...
a251: shr eax,10h
a254: mov [82dch],eax

expanded+0xa271 averages neighbors and adds a small random term from expanded+0xa25a:

a271: xor ebx,ebx
a273: movzx ax,byte [edi+ebx]
a278: add bl,[82d5h]
a27e: movzx dx,byte [edi+ebx]
a283: add ax,dx
a286: sub bl,[82d5h]
a28c: shr ax,1
a28f: call a25ah
a294: add bl,[82d4h]
a29a: mov [edi+ebx],al

It repeats for vertical and diagonal neighbors, then advances by the current step:

a328: add bl,[82d4h]
a32e: add bl,[82d4h]
a334: jae a273h
a33a: add bh,[82d4h]
a340: add bh,[82d4h]
a346: jae a273h

The final remap at expanded+0xa34d scales every byte in a 64 KB buffer into a selected output range:

a34d: mov ebx,[82e8h]
a353: mov edx,[82e4h]
a359: sub ebx,edx
a35b: inc ebx
a35c: mov edi,[82d8h]
a362: mov ecx,10000h
a367: mov al,[edi]
a369: mul bl
a36b: add ah,dl
a36d: mov [edi],ah
a36f: inc edi
a370: dec ecx
a371: jne a367h

That is a compact way to generate visual texture/noise without storing a full bitmap in the 64K executable.

Bitmap Text Renderer

The intro carries a long in-memory text script starting around expanded+0x89b9, including the "long time ago" intro text and greetings. The bitmap text renderer at expanded+0xa390 draws 8x8 font glyphs into a 320-wide chunky buffer and doubles each row vertically:

a390: mov esi,[83c4h]
a396: add esi,eax           ; script character
a398: mov bl,28h
a39a: div bl                ; line/column from character index
a3a7: mul 1400h             ; 40 chars * 8 px * doubled rows
a3af: mov edi,[12b40h]
a3b5: add edi,eax
a3b7: shl ebx,3
a3ba: add edi,ebx
a3bc: movzx ebx,byte [esi]
a3bf: sub bl,20h
a3c2: shl ebx,3
a3c5: add ebx,12b4ch        ; font bitmap

The inner glyph loop:

a3cb: mov ch,08h
a3cd: mov al,[ebx]
a3cf: inc ebx
a3d0: mov cl,08h
a3d2: mov ah,0ffh
a3d4: add al,al
a3d6: jb  a3da
a3d8: mov ah,00h
a3da: mov [edi],ah
a3dc: mov [edi+0140h],ah    ; duplicate row one scanline below
a3e2: inc edi
a3e3: dec cl
a3e5: jne a3d2
a3e7: add edi,0278h         ; next glyph row with doubled-line stride
a3ed: dec ch
a3ef: jne a3cd

expanded+0xa439 advances how much of the text has been materialized according to a time counter:

a439: mov eax,[7530h]
a43e: mul dword [83cch]
a444: mov eax,[83c8h]
a449: inc eax
a44a: cmp eax,edx
a44c: jg  a459h
a450: call a390h
a457: jmp a449h
a459: dec eax
a45a: mov [83c8h],eax

So the text effects are not DOS text mode; they are generated glyph masks in a chunky graphics buffer.

Script / Timeline Interpreter

The code around expanded+0x936e is a small command interpreter. It reads dwords from a stream, optionally dereferences them, and dispatches by command number through a table at 0x7544.

Fetch helper:

93af: mov edx,[esi]
93b1: add esi,4
93b4: shr ah,1
93b6: jae 93ba
93b8: mov edx,[edx]
93ba: ret

Dispatch:

936e: mov ebx,eax
9370: and ebx,0ffh
9376: cmp ebx,[755ch]
937c: ja  9387h
937e: mov ebx,[ebx*4+7544h]
9385: call ebx

The interpreter supports timed interpolation. It uses [0x752c] as a normalized progress value, and several commands reshape that progress:

9473: mov eax,[752ch]
9478: mul eax
947a: shld edx,eax,1
947e: mov [752ch],edx      ; t*t ease

9485: mov eax,7fffffffh
948a: sub eax,[752ch]
9490: mul eax
9492: shld edx,eax,1
9496: sub edx,7fffffffh
949c: neg edx
949e: mov [752ch],edx      ; inverse/ease-out style curve

The time-window command at expanded+0x94e2 compares current time [0x7524] against a start [0x7520] and duration [0x7540], then executes script commands while the segment is active:

94e2: mov edx,[7524h]
94e8: sub edx,[7520h]
94f0: mov ebx,[7540h]
94f6: cmp edx,ebx
94f8: jae 9521h
94fa: div ebx
94fc: mov [7530h],eax
9501: shr eax,1
9503: mov [752ch],eax
9508: mov [753ch],1
9512: lodsd
9513: cmp eax,0feh
951a: call 936eh

This script layer explains the intro's many small visual state changes. It is not a single hard-coded loop; the renderer is driven by a timeline table.

What Each Part Does

The binary does not label every visual part, but the data and code shape give a reasonable part breakdown:

  1. Startup/kernel. The RNC stub expands the payload, the Technomancer kernel selects RAW/XMS/VCPI mode, and the GUS player initializes or the intro falls back to silence.

  2. Diagnostic/text setup. The code has a protected-mode text console for errors and startup messages, but the production visuals use chunky graphics buffers.

  3. Star-text / presentation script. The long in-memory text beginning with the familiar space-opera parody is drawn through the bitmap text renderer, not through BIOS text output.

  4. Procedural texture/noise. The 0xa208 group generates 64 KB byte fields by midpoint averaging plus a random term, then remaps the field into a palette range.

  5. Mapped 3D object part. Object vertices are transformed, projected, culled, lit/parameterized, and drawn by a depth-tested texture span mapper. This is the technically strongest part of the intro.

  6. Greetings/text reveal. The same script and bitmap glyph pipeline reveal greetings text over time.

  7. Music/player service. The GUS IRQ code updates GF1 voice registers directly from the embedded 8-channel module.

Why This Is Strong For 64K

Bibo Ergo Sum spends a surprising amount of its size budget on systems code: RNC depacking, a protected-mode kernel with RAW/XMS/VCPI paths, real-mode thunks, a GUS MOD player, diagnostics, and a timeline interpreter. The visual engine still fits in enough serious machinery to matter:

That makes it a good companion to Fluid Motion: both are Valhalla TG95 64K intros, but Bibo Ergo Sum is much more about a protected-mode mini-engine and mapped 3D objects than about a single water/tunnel-style effect.