Analysis model: gpt-5.5 xhigh, sol high Last edited: 2026-08-25
Exodus by Sorcerers - Technical Dissection
Exodus is a 1991 MS-DOS 64K intro by Sorcerers. Pouet lists it as
Exodus Demo, type 64k, platform MS-Dos, released in May 1991. The Hornet
1991 demo index lists exodus.zip as Exodus by Sorcerers with a ***
rating. The archive timestamp for the only file in the ZIP is May 26, 1991.
Release year: 1991
This is a compact early VGA intro built from:
- a packed real-mode MZ executable;
- Borland/Pascal-style runtime support and helper calls;
- mode
13hchunky VGA; - one prepared logo block copied to
A000h; - a compiled setup prepass that draws the blue perspective floor;
- a hand-written frame loop at
AE7Ah; - a rotating 32-entry blue DAC ramp;
- a 32-slot radial dot field that imitates perspective without 3-D coordinates;
- an 8-row left-scrolling column-font scroller;
- a Creative
CT-VOICESound Blaster driver and a VOC-like unsigned PCM stream.
The scroller contains old private contact listings and swap text; those parts are deliberately not quoted here.
Direct Silent Runtime
The untouched packed exodus.exe was run in DOSBox-X 2024.03.01 with
machine=svga_s3, a normal core, 8,000 fixed cycles, 4 MiB RAM, and the
program's own option 3 (no music). DOSBox-X used -silent with diagnostics
redirected to ignored scratch storage. Its mixer had nosound=true; Sound
Blaster, GUS, MIDI and PC-speaker devices were disabled; and the host audio
driver was dummy. The demo audio path was not initialized; no audio was
auditioned, recorded or published.
The direct ZMBV video contains 1,436 frames over 20.489025 seconds at about
70.086 fps. It is 640x400 because DOSBox-X doubles the demo's logical 320x200
mode-13h output. The GIF below is the continuous capture interval
00:04.500..00:14.500, decimated to 100 frames at 10 fps without cropping or
rescaling. GIF cannot carry audio.

The picture resolves an ownership ambiguity in the old text. The logo is the
copied bitmap; the floor is generated by the compiled startup loop. The white
dots then expand from the horizon and use only black logo, sky or scroller
pixels, while the narrow text band owns the floor boundary. This is a radial
star/dot effect, not a vector-ball engine: no live point has an (x,y,z)
record, rotation matrix, perspective denominator, depth order or shaded stamp.
Sources
- Pouet production page: https://www.pouet.net/prod.php?which=4119
- Hornet 1991 demo index: https://files.scene.org/get/mirrors/hornet/demos/1991/00_index.txt
- Scene.org archive: https://files.scene.org/get/mirrors/hornet/demos/1991/exodus.zip
- Scene.org file page: https://files.scene.org/view/mirrors/hornet/demos/1991/exodus.zip
Archive
The examined archive is the Hornet mirror exodus.zip:
2cbf71a7000feaf65f4d402c0da2cc5d7674ef87835cc3f69df2fd1bc6c25960 exodus.zip
Archive contents:
exodus.exe 55075 bytes 1991-05-26 12:22
Important hashes:
3ba5cc8d22b8a30b4af1e837b0ff6199b8f088d70c2058a2f362d9a574de9ed6 exodus.exe packed
caffc12b68de9d49098e8ad6793d218b1fa3b5b94bb850b464392e7b0b1f84c7 EXODUS.EXE after UNP
0e7b109b81da16823d3f35a36d807e3d809423550bec735865022217e35fc61f EXODUS.IMG load image
UNP expands the file in place to a normal MZ executable of 109184 bytes. The
headerless load image is 108896 bytes.
Unpacked EXE Shape
The unpacked MZ header:
e_cblp = 128
e_cp = 214
e_crlc = 65
e_cparhdr = 18
e_minalloc = 1061
e_maxalloc = 42021
e_ss:e_sp = 1ABB:4000
e_cs:e_ip = 0000:03D5
e_lfarlc = 28
header size = 288 bytes
image size = 108896 bytes
There are 65 relocation entries. Most early ones patch far calls into the Borland runtime and the keyboard/audio helper segments:
00009 0004e 0005b 00069 00087 0009e 000ea 0010d
0013b 0016b 00297 002a4 ... 003d8 003dd 003e7
003ff 0040e 00419 0b068 0b108 ... 0b177 19db1
19e9e 1a33a
Useful load-image ranges:
0000-018e compiled perspective-floor setup prepass
018f-026d Borland length-prefixed prompt text
026e-028d 32-byte Pascal set of accepted characters
028e-03d4 prompt, key read, music flag setup
03d5-041a main entry
041b-0436 BIOS mode and DAC clear helpers
0437-0456 mode-13h pixel plot helper
0457-0476 rotating blue ramp seed
0478-04b9 33-word horizontal bank: unused word 0 plus 32 live slots
04ba-04fb 33-word vertical bank: unused word 0 plus 32 live slots
04fc-053d 33-word old-offset bank: unused word 0 plus 32 live slots
053e-0543 pseudo-random respawn state
0544-0548 scroller state words
0549-... encoded scroller text
29ca-4989 font/art data block
498a-ac49 79 copied 320-byte rows of prepared logo pixels
ac4a-ad89 one all-zero 320-byte source row which is not copied
ad8a-ae79 initial DAC data
ae7a-b054 hand-written main visual loop
b060-b0ff keyboard helper
b100-b17a Sound Blaster wrapper
b17b-193ef VOC-like sound stream
193f0-19dad Creative CT-VOICE driver
19db0-1a98f Borland runtime support
Main Entry
The entry at 03D5h is short:
03d5 far call 19DB:0000 ; runtime init
03da far call 0B06:0000 ; keyboard helper init
03df push bp
03e0 mov bp,sp
03e2 xor ax,ax
03e4 far call 19DB:027C ; runtime frame helper
03e9 call 028E ; prompt, read key, set music flag
03ec call 041B ; BIOS mode 13h
03ef call 0427 ; blacken first 50h DAC entries
03f2 call 0000 ; compiled perspective-floor setup prepass
03f5 cmp byte ptr ds:[0044],00
03fa je 0401
03fc far call 0B10:0017 ; Sound Blaster start wrapper
0401 call AE7A ; main visual loop
0404 cmp byte ptr ds:[0044],00
0409 je 0410
040b far call 0B10:0055 ; Sound Blaster stop wrapper
0410 call 0421 ; BIOS text mode 3
0413 pop bp
0414 xor ax,ax
0416 far call 19DB:00E9 ; runtime exit
The only global flag the mainline checks is ds:[0044] in the relocated
Borland DGROUP established by runtime initialization. The prompt routine sets
it to zero for silent mode and nonzero for Sound Blaster mode.
Prompt and Key Path
The routine at 028Eh prints the intro banner and three choices through runtime
string helpers, then calls the keyboard helper at 0B06:0010.
The choices are:
- Escape: exit through the runtime with code
2; - key
1: Sound Blaster at I/O base220h, IRQ 7; - key
2: call0B10:0000, which sets the driver to IRQ 2 mode; - key
3: no music.
The key validation loop tests membership in a 32-byte Pascal set of char at
026Eh, not a string. Its only nonzero byte is 0Eh at set offset 6: the bits
for ASCII 31h, 32h, and 33h (1, 2, and 3). Escape is tested
separately before this membership check. Once a valid key is read:
03bc cmp al,32h
03be jne 03c5
03c0 far call 0B10:0000 ; alternate SB IRQ setup
03c5 cmp byte ptr [bp-1],33h
03c9 mov al,00h
03cb je 03ce
03cd inc ax
03ce mov ds:[0044],al ; zero only for key '3'
The helper at 0B06:0010 first returns a saved extended-key scan byte if one
exists. Otherwise it idles with INT 28h, polls BIOS keyboard function
INT 16h/AH=01h, then reads the key with INT 16h/AH=00h. If BIOS returns an
extended key with AL=0, the scan code is stored at ds:[004A] for the next
call.
The earlier initialization call at 0B06:0000 also saves INT 1Bh, installs
a one-instruction IRET handler to suppress Ctrl-Break during the intro, and
registers a Borland exit-procedure callback. Both the prompt-Escape path and
normal visual exit enter that runtime chain, which restores the old vector.
VGA Mode Helpers
041Bh and 0421h are plain BIOS mode switches:
041b mov ax,0013h
041e int 10h
0420 ret
0421 mov ax,0003h
0424 int 10h
0426 ret
These are fixed mode requests, not save/restore helpers. The program never
queries INT 10h/AH=0Fh or remembers an incoming mode; normal completion
always replaces the display with text mode 03h.
0427h clears the low DAC entries before any drawing:
0427 mov dx,03C8h
042a xor al,al
042c out dx,al ; DAC index 0
042d mov cx,0050h
0430 inc dx ; 03C9h
0431 out dx,al ; R
0432 out dx,al ; G
0433 out dx,al ; B
0434 loop 0431
0436 ret
The pixel helper at 0437h is the compact mode-13h formula:
0437 push bp
0438 mov bp,sp
043a mov ax,A000h
043d mov es,ax
043f mov ah,[bp+6] ; Y byte into high half
0442 mov di,ax ; Y * 256
0444 shr ax,1
0446 shr ax,1 ; Y * 64
0448 add di,ax ; Y * 320
044a add di,[bp+8] ; + X
044d mov al,[bp+4] ; color
0450 mov es:[di],al
0454 pop bp
0455 ret 6
The caller pushes x, then a word whose low byte is y, then color. Because
mov ax,A000h leaves AL=00h, the mov ah,[bp+6] step gives an exact
y*256 base before the quarter-shift adds y*64.
Compiled Perspective-Floor Prepass
The routine at 0000h is compiler-shaped rather than hand-written. It uses
several runtime math helpers around 19DB:0Bxx, then calls the pixel helper at
0437h.
The outer loop walks screen Y from 81h through C8h (129 through 200):
0022 mov word ptr [bp-4],0081h
...
0029 inc word ptr [bp-4]
002c add word ptr [bp-6],0005h
...
0181 cmp word ptr [bp-4],00C8h
0186 je 018B
0188 jmp 0029
The helpers at 19DB:0B31/0B23/0B0B/0B2D/0B11/0B35 are respectively the
integer-to-Real48, divide, add, compare, subtract and truncating conversion
paths. Their embedded constants decode to 3000.0 and 32.0. The row state is
therefore exact:
phase = 0.0
for y = 129..200:
phase += ((200-y)*(200-y)) / 3000.0
if phase > 32.0: # strict comparison
phase -= 32.0
The inner loop covers the right half, x 160..319. Every iteration also plots
the mirror 319-x, so one pass owns all 320 columns:
00a9 mov word ptr [bp-2],00A0h
...
00b0 inc word ptr [bp-2]
00b3 add word ptr [bp-8],0005h
00b7 mov ax,[bp-8]
00ba cmp ax,[bp-6]
00bd jbe 00D1
00bf mov ax,[bp-6]
00c2 sub [bp-8],ax
00c5 cmp byte ptr [bp-9],00
00c9 mov al,00
00cb jne 00CE
00cd inc ax
00ce mov [bp-9],al
That is a Bresenham-like stripe accumulator. bp-8 rises by 5. Whenever it
strictly exceeds the per-row threshold in bp-6, the code subtracts the
threshold and flips the one-byte phase flag at bp-9. The threshold is 60 on
row 129 and grows by five per row, so each alternating wedge broadens toward
the bottom of the display.
The flag decides which side gets the direct color and which side gets a masked color:
; flag set
00d7 push [bp-2] ; x
00da mov al,[bp-4] ; y
00dd push ax
00de call runtime value helper
00ec add ax,0010h
00f2 push ax ; color
00f3 call 0437
00f6 mov ax,013Fh
00f9 sub ax,[bp-2] ; mirrored x
00fc push ax
00fd mov al,[bp-4]
0100 push ax
0101 call runtime value helper
010f add ax,0010h
0115 and ax,001Fh
011c add ax,0010h ; color restricted to 10h..2fh
0122 push ax
0123 call 0437
The flag-clear branch does the same pair in the opposite order: wrapped color on the first side, direct color on the mirrored side. The Real48 state is fixed for the whole row, and truncation selects its blue level; the integer threshold state selects the alternating left/right wedges. This is the blue perspective checker floor visible in the direct GIF, not an abstract dot/curve field.
Rows 129 through 199 are visible. The inclusive final iteration at y=200 still
writes 320 bytes at A000:FA00h..FB3Fh, just beyond the 64,000 displayed
pixels but still inside the VGA segment. It does not appear in the picture.
The routine performs 72 rows times 160 mirrored pairs times two writes, or
23,040 pixel-helper calls; 22,720 of those writes are visible.
Initial Palette And Prepared Logo
The main visual loop begins at AE7Ah, but the first ten bytes before it are
still palette data, not code. The actual entry:
ae7a push ds
ae7b cld
ae7c mov ax,cs
ae7e mov ds,ax
ae80 mov si,AD8Ah
ae83 mov dx,03C8h
ae86 xor al,al
ae88 out dx,al ; DAC index 0
It writes two palette regions:
ae89 mov cx,0030h
ae8c inc dx ; 03C9h
ae8d lodsb
ae8e out dx,al
ae8f lodsb
ae90 out dx,al
ae91 lodsb
ae92 out dx,al
ae93 loop AE8D
ae95 mov cx,0020h
ae98 lodsb
ae99 shr al,1
ae9b shr al,1
ae9d out dx,al
...
aeaa loop AE98
So entries 00h..2Fh are copied directly from AD8Ah, then entries
30h..4Fh are copied from the next palette data but divided by four component
by component. The first phase consumes 30h * 3 = 144 bytes; the second consumes
20h * 3 = 96 bytes.
Then the prepared logo block is copied into video RAM:
aeac mov ax,A000h
aeaf mov es,ax
aeb1 mov di,0C80h
aeb4 mov si,498Ah
aeb7 mov cx,3160h
aeba rep movsw
3160h words is 25,280 bytes, or 79 full 320-byte rows. The destination offset
0C80h is row 10 in mode 13h, so the exact destination is rows 10 through
88. The source storage has one more 320-byte row at AC4Ah..AD89h, but it is
all zero and the copy deliberately stops before it. The direct pixels identify
the copied block as the large SORCERERS logo; the generated floor is already
resident lower down. Rows 10..21 and 86..88 in the copied destination are
black; the actual 10,102 nonzero logo pixels occupy rows 22..85.
One VGA Page, Exact Layer Ownership
There is no work page or flip. After initialization the visible 320x200 page has a stable vertical contract:
rows 0..9 black sky; moving dots may occupy black pixels
rows 10..88 prepared logo; dots draw only through its black pixels
rows 89..120 black sky and moving dots
rows 121..128 eight-row scroller, also crossed by compensated dots
rows 129..199 generated perspective floor
row 200 generated once beyond the displayed 64,000-byte frame
The logo's exact nonzero index set is 41h, 42h, and 49h..4Fh. Ordinary
scroller shading uses 01h..08h, its initial custom glyphs also reach into the
animated 10h..2Fh range, the generated floor uses every index 10h..2Fh,
and white moving dots use 0Fh. That separation explains how palette rotation
can animate the blue floor/text without changing the prepared logo bytes.
Frame Loop Gate
Each frame begins by waiting for VGA status bit 3 to be set:
aebc mov dx,03DAh
aebf in al,dx
aec0 test al,08h
aec2 je AEBF
This is an active-high level gate, not edge synchronization. It does not first wait for the bit to clear, so arrival during retrace passes immediately; in principle another sufficiently fast iteration could pass within that same high interval. The code therefore does not prove one software iteration per physical frame. Only the start is gated: the DAC, dot and scroller work can extend into active display. Initial palette programming and the 25,280-byte logo copy also occur before the first gate.
Blue Palette Rotation
The first per-frame effect rewrites DAC entries 10h..2Fh as black-to-blue
values using the byte table at 0457h:
aec4 mov ax,cs
aec6 mov ds,ax
aec8 mov es,ax
aeca mov si,0457h
aecd mov dx,03C8h
aed0 mov al,10h
aed2 out dx,al
aed3 mov cx,0020h
aed6 inc dx ; 03C9h
aed7 xor al,al
aed9 out dx,al ; red = 0
aeda out dx,al ; green = 0
aedb lodsb
aedc out dx,al ; blue = next ramp byte
aedd loop AED7
The seed bytes are:
01 02 04 06 08 0a 0c 0e 10 12 14 16 18 1a 1c 1e
20 22 24 26 28 2a 2c 2e 30 32 34 36 38 3a 3c 3e
After writing them, the code rotates the table backward by one byte:
aedf std
aee0 mov si,0476h
aee3 mov di,0477h
aee6 mov cx,0020h
aee9 rep movsb
aeeb mov al,cs:[0477h]
aeef mov cs:[0457h],al
Because direction is set, rep movsb copies from high to low. The old tail is
then placed at the head. The screen pixels that use colors 10h..2Fh do not
move, but their blue intensities rotate every frame.
32-Slot Radial Dot Field
The next block draws 32 one-pixel dots. Each of its three state banks actually contains 33 words. Word zero is an unused compiler-style base slot; the live records are 1 through 32. The loop visits them in descending order:
aef3 mov ax,A000h
aef6 mov es,ax
aef8 mov bx,0020h
aefb shl bx,1 ; word table index, starts at 64
For each slot it clears the previously stored pixel:
aefd mov di,cs:[bx+04FCh]
af02 xor al,al
af04 mov es:[di],al
Then it updates the horizontal state from the table at 0478h. Values at or
above 320 take the right-of-center branch; lower values take the left side.
Neither branch wraps:
af07 mov ax,cs:[bx+0478h]
af0c cmp ax,0140h
af0f jb AF5C
; high branch
af11 sub ax,0140h
af14 mov dx,ax
af16 shr dx,1
af18 shr dx,1
af1a shr dx,1
af1c shr dx,1 ; dx = (x - 320) / 16
af1e add ax,dx
af20 cmp ax,013Fh
af23 ja AF2A ; respawn
af25 add ax,0140h
af28 jmp AF78
; low branch
af5c mov dx,0140h
af5f sub dx,ax
af61 mov ax,dx
af63 shr ax,1
af65 shr ax,1
af67 shr ax,1
af69 shr ax,1 ; ax = (320 - x) / 16
af6b add dx,ax
af6d cmp dx,013Fh
af71 ja AF2A ; respawn
af73 mov ax,0140h
af76 sub ax,dx
Normalized around state-space center 320, the two horizontal branches are:
d = abs(horizontal - 320)
d = d + floor(d/16)
if d > 319: respawn
horizontal = 320 - d or 320 + d, preserving the old side
Distance from the center therefore grows by about 6.25 percent per frame. There is no Z value or perspective divide.
The respawn path uses three 16-bit state words at 053Eh, 0540h, and
0542h:
af2a mov ax,cs:[0542h]
af2e xchg cs:[0540h],ax
af33 xchg cs:[053Eh],ax
af38 add ax,cs:[053Eh]
af3d add cs:[0542h],ax
af42 mov cl,ah
af44 and ax,007Fh
af47 add ax,00FFh
af4a mov cs:[bx+0478h],ax
af4f and cx,000Fh
af52 add cl,10h
af55 mov cs:[bx+04BAh],cx
af5a jmp AF07
It is a three-word additive generator. For old state (a,b,c), all arithmetic
modulo 65,536, one respawn performs:
(a,b,c) = (b, c, a+b+c)
seed_sum = a_old + b_old
horizontal = 255 + (seed_sum & 127) ; 255..382
vertical = 16 + ((seed_sum >> 8) & 15) ; 16..31
The shipped seeds are (3039h,10E1h,0016h).
Those 255..382 and 16..31 values are transient. The jump back to AF07h
immediately grows both states once; committed post-respawn ranges are
horizontal 251..385 and vertical 17..32.
The vertical state grows with the same one-sixteenth rule:
af78 mov cx,cs:[bx+04BAh]
af7d mov dx,cx
af7f shr dx,1
af81 shr dx,1
af83 shr dx,1
af85 shr dx,1
af87 add cx,dx
af89 cmp cx,010Eh
af8d ja AF2A
af8f mov cs:[bx+0478h],ax
af94 mov cs:[bx+04BAh],cx
The stores occur only after both bounds pass. If vertical growth exceeds 270, the tentative horizontal result is discarded; respawn replaces both states and reruns both updates.
Finally it maps the two states into a mode-13h screen offset:
af99 shr cx,1 ; vertical / 2
af9b shr ax,1 ; horizontal / 2
af9d mov dx,0088h
afa0 sub dx,cx ; screen row = 136 - vertical/2
afa2 xchg dh,dl
afa4 mov di,dx ; row * 256
afa6 shr dx,1
afa8 shr dx,1 ; row * 64
afaa add di,dx ; row * 320
afac add di,ax ; + column
In normalized form:
vertical = vertical + floor(vertical/16)
if vertical > 270: respawn
screen_x = floor(horizontal/2)
screen_y = 136 - floor(vertical/2)
Live dots are consequently bounded to x 0..319 and y 1..128. They begin
near the floor horizon and move outward/upward. This is a convincing radial
perspective imitation, but it is not a 3-D projection.
Startup makes the first frame deterministic. All 32 horizontal words are zero,
all 32 vertical words are 00F0h, and all 32 old offsets are zero. Horizontal
zero immediately exceeds the low-side distance limit, so every slot respawns
once. Their 32 targets are distinct, lie in x 131..192, y 120..128, and
are all initially black, so every collision test succeeds and every dot draws.
The old-offset erase also writes black to A000:0000h 32 harmless times. The
later scroller shift moves 31 of these dots left; only slot 21 is on row 120
and remains in place. The generator ends the frame at
(B4D9h,DDD1h,92B6h).
The dot is drawn only if the target pixel is currently zero:
afae cmp byte ptr es:[di],00h
afb2 jne AFCD
afb4 mov al,0Fh
afb6 mov es:[di],al
afb9 cmp di,9740h
afbd jb AFC0
afbf dec di ; remember where the later strip shift moves the dot
afc0 mov cs:[bx+04FCh],di
The decrement is a lifecycle handoff, not clipping. Rows 121 through 128 are
shifted left later in the same frame. A dot drawn there at di therefore ends
the frame at di-1, and that is the address which must be erased next time.
The dot-state bounds guarantee that no row below 128 reaches this test; while a
dot is inside the scroller band its column is further bounded to 83..232, so
the uncompensatable column-zero case is unreachable.
If a target is already nonzero—logo, scroller glyph, or a dot drawn by an earlier descending slot—the current dot is suppressed. Its old-offset word is set to zero, so the next frame's erase writes only the already-black top-left pixel:
afcd mov word ptr cs:[bx+04FCh],0000h
The old erase is unconditional: it does not confirm that the address still
contains color 0Fh or belongs to that slot. The effect relies on sparse,
mostly nonaliasing motion rather than an ownership map.
Slot iteration:
afc5 shr bx,1
afc7 dec bx
afc8 je AFDC
afca jmp AEFB
The code halves BX back from byte offset to slot number, decrements it, then
returns through the same shl bx,1 entry. This visits exactly slots 32 through
1 and never touches word zero. Erase, state update, collision test and draw are
interleaved per slot; there is no global erase pass followed by a global draw
pass.
Scroller Band
The scroller starts at screen offset 9740h, which is exactly row 121:
9740h / 320 = 121
Each frame shifts an eight-row strip left by one byte:
afdc mov ax,es
afde mov ds,ax
afe0 cld
afe1 mov di,9740h
afe4 mov si,9741h
afe7 mov cx,0500h
afea rep movsw
0500h words is 2560 bytes, or 8 * 320. The source begins one byte to the
right of the destination, so the overlapping forward copy shifts the whole band
left by one pixel. It is one contiguous copy rather than eight row loops. At a
row boundary the temporary rightmost byte comes from the next row's first byte,
but the subsequent glyph-column writer replaces the rightmost byte of all eight
rows, closing that seam.
Then the column timer is decremented:
afec dec byte ptr cs:[0546h]
aff1 je B021
If the current character still has columns left, one vertical 8-pixel column is written at the right edge of the band:
aff3 mov di,987Fh ; 9740h + 319
aff6 mov si,cs:[0547h] ; current font column pointer
affb add word ptr cs:[0547h],0008h
b001 mov cx,0008h
b004 mov al,cs:[si]
b007 mov es:[di],al
b00a inc si
b00b add di,0140h ; next row
b00f loop B004
The font is stored column-major. Its 29CAh..4989h range contains 127 glyphs,
each 64 bytes: eight columns, eight bytes per column.
When the column counter reaches zero, the next encoded character is read:
b021 mov si,cs:[0544h] ; text pointer
b026 mov ah,cs:[si]
b029 or ah,ah
b02b je B047 ; zero terminator: restart text
b02d dec ah
b02f mov byte ptr cs:[0546h],08h
b035 inc word ptr cs:[0544h]
b03a shr ax,1
b03c shr ax,1
b03e add ax,29CAh
b041 mov cs:[0547h],ax
b045 jmp AFF3
Because the byte is placed in AH, then shifted right twice, the effective
glyph offset is:
glyph_pointer = 29CAh + (encoded_byte - 1) * 64
The scroller's state words before the first visible character:
0544 = 0549h text pointer
0546 = 01h first-frame column countdown
0547 = 2000h placeholder font-column pointer
The first encoded byte at 0549h is 20h, selecting the all-zero space glyph
at 318Ah. Its first column is blank, matching the clean first-frame boundary.
The encoded text uses raw spaces and low-byte glyph indices for custom logo letters before it reaches readable ASCII text. The readable credit line says the code is by the coder, graphics by Hellraiser and the coder, text by Ranger and the coder, and sampled music by the coder. Older private listings after that are omitted here.
One Frame, In Instruction Order
The complete visual lifecycle is short enough to state exactly:
wait until 03DAh bit 3 is high (no preceding low-phase wait)
set DS/ES to the code segment
rewrite DAC entries 10h..2Fh and rotate the 32-byte blue table
for slot = 32 down to 1:
erase its remembered one-pixel address
expand horizontal, then vertical; if either fails, respawn both and retry
map the two states to screen x/y
if the target pixel is black, draw color 0Fh
remember the draw address, minus one if the scroller will shift that row
set DS to A000h and CLD
shift rows 121..128 left as one 2,560-byte block
advance the text stream when needed and write one eight-pixel font column
set DS to zero; test BIOS keyboard head against tail
The order explains details which a looser “stars plus scroller” description
misses. Palette animation precedes all pixel work. Dot erasure and drawing are
per-slot. Scroller-band dots are drawn first, shifted second and erased at the
shifted address on the next frame. The scroller explicitly executes CLD,
undoing the STD used by the palette-table rotation before its forward block
copy. Everything shares the visible A000h page.
Exit Test
After drawing the new scroller column, the loop checks BIOS keyboard buffer head/tail words directly:
b011 xor ax,ax
b013 mov ds,ax
b015 mov ax,ds:[041Ah] ; BIOS keyboard buffer head
b018 cmp ax,ds:[041Ch] ; BIOS keyboard buffer tail
b01c jne B050
b01e jmp AEBC ; next frame
b050 mov ds:[041Ch],ax ; discard pending key
b053 pop ds
b054 ret
So the visual loop exits on any pending key and flushes that key by setting the
tail equal to the head. DS is zero at the test, but the pop ds at B053h
restores the relocated Borland DGROUP saved once at AE7Ah; the caller
immediately needs it to retest DS:[0044h]. The function leaves ES=A000h,
but its scroller-side CLD guarantees that DF is clear. The mainline then
stops the optional sound route if selected, invokes hard-coded BIOS mode 3,
and returns through the Borland runtime/INT 1Bh cleanup chain. No
framebuffer-specific cleanup is required because the BIOS mode switch replaces
the graphics display.
Sound Blaster Wrapper
The wrapper at 0B10h is thin. 0B10:0000 sets the Creative driver to IRQ 2:
b10a mov bx,0002h
b10d mov ax,0002h
b110 far call 193F:0000
The normal start wrapper:
b121 mov bx,0003h
b124 far call 193F:0000 ; driver init/probe
b129 mov bx,0005h
b12c mov ax,1A91h
b12f mov es,ax
b131 mov di,0050h
b134 far call 193F:0000 ; status word pointer
b139 mov bx,0004h
b13c mov al,01h
b13e far call 193F:0000 ; speaker on
b143 mov bx,0006h
b146 mov ax,0B10h
b149 mov es,ax
b14b mov di,007Bh
b14e far call 193F:0000 ; intended VOC stream pointer
The stop wrapper:
b15f mov bx,0008h
b162 far call 193F:0000
b167 mov bx,0004h
b16a mov al,00h
b16c far call 193F:0000 ; speaker off
b171 mov bx,0009h
b174 far call 193F:0000
The stream at B17Bh is VOC-shaped:
B17B: 06 02 00 00 FF FF
type 06h, length 2, repeat count FFFFh
B181: 01 59 E2 00 71 00 ...
type 01h, length E259h, time constant 71h, unpacked unsigned PCM
For a Creative VOC type-1 block, time constant 71h gives roughly:
1000000 / (256 - 113) = about 6993 samples/second
CT-VOICE Driver
The block at 193F0h begins with:
E9 51 07 "CT-VOICE",0
"Creative Sound Blaster Card",0
It is a Creative Sound Blaster driver with default state near driver offset
0030h:
0030 = 0220h default I/O base
0032 = 07h default IRQ
0033 = 010Eh driver version-like word
0035 = 0103h minimum DSP version-like word
The far entry jumps to the dispatcher at driver offset 0754h:
0000 jmp 0754h
0754 pushf
0755 push ds
0756 push es
0757 push ax
...
0761 cmp bx,000Eh
0764 jae invalid
0766 cmp bx,0004h
0769 jb dispatch
076b cmp byte ptr ds:[00B1h],00h
0770 je invalid
0772 shl bx,1
0774 call word ptr [bx+0085h]
Core low-level helpers:
; write DSP byte in AL to base+0Ch, waiting until the sign bit clears
19507 mov ah,al
19509 mov al,F0h
1950b in al,dx
1950c or al,al
1950e js 1950b
19510 mov al,ah
19512 out dx,al
; read DSP byte from base+0Ah after base+0Eh reports ready
19514 mov dx,ds:[0030h]
19519 add dl,0Eh
1951e in al,dx
1951f or al,al
19521 jns 1951e
19523 sub dl,04h
19526 in al,dx
The reset/probe path toggles base+6 and waits for AAh:
19529 mov dx,ds:[0030h]
1952d add dl,06h
19530 mov al,01h
19532 out dx,al
19533 in al,dx
19534 in al,dx
19535 in al,dx
19536 in al,dx
19537 xor al,al
19539 out dx,al
1953a mov bl,10h
1953c call 194E9 ; read DSP
1953f cmp al,0AAh
19541 je 1954D
DMA setup at 1966Bh programs 8-bit DMA channel 1:
1966e mov al,05h
19670 out 0Ah,al ; mask channel 1
19672 xor al,al
19674 out 0Ch,al ; clear flip-flop
19676 mov al,dh
19678 out 0Bh,al ; DMA mode
1967a mov al,bl
1967c out 02h,al ; offset low
1967e mov al,bh
19680 out 02h,al ; offset high
19682 mov al,cl
19684 out 03h,al ; count low
19686 mov al,ch
19688 out 03h,al ; count high
1968a mov al,dl
1968c out 83h,al ; page
1968e mov al,01h
19690 out 0Ah,al ; unmask channel 1
IRQ install and restore are similarly direct:
196cb cli
196d2 mov al,ds:[0032h]
196d5 add al,08h
196d8 shl al,1
196da shl al,1 ; interrupt vector slot
...
196e3 mov ax,es:[bx] ; save old offset
196e9 mov es:[bx],dx ; write new offset
196ec mov ax,es:[bx+2] ; save old segment
196f3 mov es:[bx+2],cs ; write CS
...
19702 in al,21h
19704 and al,ah
19706 out 21h,al ; unmask IRQ
The bytecode/VOC reader at 199A1h repeatedly reads the block type byte through
the current stream pointer and dispatches types 0..7:
199bb call 19765 ; AL = current stream byte
199be cbw
199bf cmp ax,0008h
199c2 jae 199D0 ; skip unknown block
199c4 mov bx,ax
199c6 shl bx,1
199c8 call word ptr [bx+00A1h]
199cc jb 199A1 ; handlers set carry to continue
The handler table at driver offset 00A1h maps to:
0 -> 063C end marker: set done flag
1 -> 0643 sound-data block: program time constant and DMA
2 -> 068D continuation-style block
3 -> 06AF silence block
4 -> 06E1 marker/store word, then skip
5 -> 06F4 skip
6 -> 06F9 repeat-begin: save stream pointer and count
7 -> 071E repeat-end: restore stream pointer until count expires
Important caveat: the command table at driver offset 0085h contains an
implausible word for command 6:
0085: 0795 0799 07B5 07D0 0810 0827 6B06 089F ...
The wrapper passes BX=6 with ES:DI = 0B10:007B, which is exactly the
embedded VOC stream. A start-stream routine that fits that API exists at driver
offset 083Ah (19C2Ah in the load image), and it consumes ES:DI, initializes
stream state, parses the first block, installs an IRQ handler, and primes DMA.
But the static command table word for command 6 is 6B06h, which does not
point inside this driver body. I did not find an MZ relocation or static write
that repairs it. So the audio block is clearly present and structurally
Creative/VOC-like, but the exact command-six transfer in the unpacked image is
not proven from static bytes alone.
What The Demo Is Doing
Once the prompt is past, the intro is a single-screen mode-13h piece. The setup generates a symmetric perspective floor and copies in a prepared 79-row logo. The main loop then keeps three things alive:
- DAC animation: colors
10h..2Fhrotate through a blue ramp; - a 32-slot two-state radial dot field expands outward and upward, respawning from a three-word additive generator;
- an 8-pixel-high scroller shifts left by one byte per frame and writes one new font column on the right.
The visual loop is small but dense. Almost every per-frame operation is either
an I/O port write, a table update, or a mode-13h byte copy. The effect works
because the prepared logo, generated floor, moving palette, radial dots and
narrow scroller band share one 64K VGA page without any second framebuffer.
The dot/scroller address-1 handoff is the small trick that makes their shared
rows clean up correctly.