Analysis model: gpt-5.5 xhigh
Fast-intro by Sorrox - Technical Dissection
Sorrox's Fast-intro is a 1995 MS-DOS fast intro released at The Party 1995.
The result file lists it as fourth in the mixed FAST INTRO competition with
296 points. The same set mixes Amiga and PC entries: Sleeptro by Trepaan is
the highest clearly MS-DOS entry I have verified in that result list, Voll Crass by Abyss is Amiga ECS, and this Sorrox intro is the next clearly MS-DOS
entry I am treating as part of the PC-side follow-up.
The program is a PKLITE-packed real-mode Borland MZ. Once expanded, it is much more legible: a Pascal-style main body loads three 320x200 PCX images, starts a four-channel ProTracker module through a GUS-oriented player, draws a reversed text sequence, animates a cluster of small objects, then runs the strongest inner loop in the intro: 300 falling white particles that walk over an apple image mask by testing the pixels below, down-right, and down-left.
Old private contact listings from the file note are deliberately omitted.
Provenance
- Production:
fastint.zip - Event: The Party 1995, fast intro competition
- Ranking: 4th in the mixed fast intro result file
- Archive URL: fastint.zip on scene.org
- Result file: The Party 1995 results
- Production listing: Demozoo: Fast-intro
- Party listing: Demozoo: The Party 1995
- ZIP SHA256:
23e47aeddb84cc20cc1995d70afebc4bbc73efe209e45c35306e3c07a7dd66de
Archive Layout
| File | Size | SHA256 | Role |
|---|---|---|---|
FASTINT.EXE |
34,731 | 4b3a99a369d498111be8443c33bfa854149d92ef082ce13a4c256a6da31e1cc2 |
PKLITE-packed real-mode MZ |
1APPLE0.PCX |
7,175 | 4b403bfe1e4613746e2fd05e8861fb51103800027070a4ee2b3a7c251334537c |
320x200x8 PCX, red apple image |
1APPLE1.PCX |
6,581 | b55d85eff5b21b0323c49a932dc9cacd5f748953184d0a40f5941e00d5adc347 |
320x200x8 PCX, smaller apple image |
TP5LOGO.PCX |
7,001 | b946898af2197fed83cb1d668ca4ca9b6ee39f3797c8e931014cb2097d376943 |
320x200x8 PCX, The Party sign image |
BARBY.PCX |
11,586 | 9b8aa2c54e280e484402e9d21e3bf0e6d044151851366596596183913d3558a1 |
320x200x8 PCX, credit slide |
FUN2.MOD |
138,064 | 44fd7d323a10f09ef0516324c3165646cab895b796c379f0ce62ced48cc54c9a |
four-channel ProTracker module |
FILE_ID.DIZ |
95 | de2c6677cc4aad689793870764409606d85a570642bebbc109c2341ac5536c90 |
short party note |
FILE_ID.DIZ names the production as a fast intro for The Party 1995 by Sorrox,
Spin, and other contributors. The credit image itself names Julenissen for code,
Smorgasen for graphics, Larson for design, and Slayer for music. The module's
sample names also include Flashback [introtune], Made by, Sprocket / Of,
and Greetings to.
The PCX files are normal 320x200 8-bit PCX images with a 768-byte VGA palette
tail. FUN2.MOD carries an M.K. marker at offset 0438h, so the player sees
it as a four-channel ProTracker module.
Packed And Expanded EXE
The distributed executable has a PKLITE marker:
!PKLITE Copr. 1990-92 PKWARE Inc. All Rights Reserved
The packed MZ header is deliberately misleading for static reading because the entry is inside the packed stub:
| Field | Packed value |
|---|---|
| File image | 34,731 bytes |
| Header size | 0070h |
| Relocations | 1 |
| Entry | fff0:0100 |
| Initial stack | 087b:0200 |
| Minimum / maximum allocation | 0d23h / 4a2ch paragraphs |
After expansion with UNP, FASTINT.EXE is 67,488 bytes:
| Field | Expanded value |
|---|---|
| File image | 67,488 bytes |
| Header size | 0510h |
| Relocations | 317 |
| Entry | 0000:101b |
| Initial stack | 149c:0fa0 |
| Minimum / maximum allocation | 056dh / 4276h paragraphs |
| Expanded SHA256 | d27871a5f010d2f60d18125e0dbd5b84a1ac7c229fb2bd2e4dc4d76a01d000f6 |
For the notes below I stripped the 0510h-byte MZ header and disassembled the
66,192-byte load image. Unless stated otherwise, offsets are offsets inside
that expanded load image, not inside the packed file.
The visible Pascal-style filename strings sit just before the main entry:
| Load-image offset | String |
|---|---|
0fc6h |
1apple0.pcx |
0fd2h |
1apple1.pcx |
0fdeh |
fun2.mod |
0fe7h |
???TXETLLORCS DESREVER !HAEY |
1006h |
tp5logo.pcx |
1011h |
barby.pcx |
The reversed text is not a typo in these notes. The intro has a custom path/text renderer and appears to feed it a backward phrase so the effect can reveal a readable phrase through motion and ordering rather than by simply writing left-to-right text.
Entry Path
The expanded entry at 101bh first calls runtime and library setup code:
101b lcall 07e2:0000
1020 lcall 07e2:0548
1025 lcall 0781:04e8
102a lcall 06de:0000
102f lcall 067c:000d
1034 lcall 030d:0185
1039 lcall 02d6:0357
103e lcall 0189:14b6
1043 lcall 0183:004a
The main body begins at 1048h. The first visible hardware step is a mode
change:
1064 push 0013h
1067 lcall 0781:017f
The target routine at 799fh is a small BIOS video wrapper around int 10h, so
this is the normal 320x200x256 mode-13h setup.
The main sequence then does the following:
- Initialize 300 random particle records.
- Allocate and clear two nearly 64 KB buffers.
- Load
1APPLE0.PCXand1APPLE1.PCX. - Initialize and start the module player with
FUN2.MOD. - Render the reversed text effect.
- Animate 30 small objects over the apple imagery.
- Run the 300-particle falling/walking mask loop.
- Load and show
TP5LOGO.PCX. - Load and show
BARBY.PCX. - Stop audio, restore text mode, and return through runtime cleanup.
The program polls the keyboard with BIOS int 16h and also compares a runtime
time counter stored through a far pointer at 796eh against constants such as
61a8h, 88b8h, 9088h, c350h, and dea8h. It is therefore timed by a
runtime counter, not only by raw frame count.
Buffer Primitives
The code allocates two frame-sized buffers in routine 0781:0048, mapped to
load offset 7858h. Each allocation requests fa64h bytes, a little more than
the 64,000 pixels needed for one mode-13h page. The resulting far pointers and
segments are saved around 79c8h..79d2h.
The clear primitive at 7810h fills exactly 64,000 bytes using 32-bit stores:
7810 les di,[bp+06h] ; destination far pointer
7814 mov al,[bp+0ah] ; fill byte
7817 mov ah,al
7819 mov dx,ax
781b shl eax,10h
781f mov ax,dx ; eax = byte repeated four times
7821 xor di,di
7823 mov cx,3e80h ; 16000 dwords
7826 rep stosd ; 64000 bytes
The full-buffer copy at 7838h is equally direct:
7838 push ds
7839 lds si,[bp+06h] ; input far pointer
783d les di,[bp+0ah] ; output far pointer
7841 xor si,si
7843 xor di,di
7845 mov cx,3e80h
7848 rep movsd ; 64000 bytes
784b pop ds
Two similar routines exist in the 064f segment. 6775h copies a complete
buffer to A000:0000 and 6798h clears a complete buffer:
6775 mov ax,0a000h
6778 mov es,ax
677a lds si,[bp+06h]
677e xor di,di
6780 xor si,si
6782 mov cx,3e80h
6785 rep movsd
6798 les di,[bp+06h]
679c xor di,di
679e xor eax,eax
67a1 mov cx,3e80h
67a4 rep stosd
These are the high-throughput primitives the show uses between heavier drawing passes: decode or compose off-screen, then blast the complete page.
PCX Loader
The loader target is 0781:031c, load offset 7b2ch. It is a classic Borland
real-mode file routine wrapped around a hand-coded PCX byte-RLE decoder. The
call passes a Pascal string filename, a destination segment, and a palette
buffer.
The important decode loop starts after the 128-byte PCX header:
7be1 mov word [bp-194h],0080h ; compressed byte index
7bea mov word [bp-196h],0000h ; decoded pixel index
decode_next:
7bf0 mov bx,[bp-194h]
7bf6 mov al,[filebuf+bx]
7bfb and al,0c0h
7bfd cmp al,0c0h
7bff jne literal_byte
run_byte:
7c05 mov bx,[bp-194h]
7c0b mov al,[filebuf+bx]
7c10 and al,3fh
7c12 mov [bp-1a0h],al ; run length
7c18 inc word [bp-194h]
7c1e mov bx,[bp-194h]
7c24 mov dl,[filebuf+bx] ; repeated pixel
7c2a mov [bp-1a1h],dl
...
7c57 mov es:[di],dl
7c5a inc word [bp-196h]
7c60 dec byte [bp-1a0h]
7c66 cmp byte [bp-1a0h],00h
7c6a jne repeat_run
7c70 inc word [bp-194h]
7c76 cmp word [bp-196h],f9ffh
7c7d jbe decode_next
In cleaner form:
in_pos = 0x80;
out_pos = 0;
while (out_pos <= 0xf9ff) {
b = filebuf[in_pos++];
if ((b & 0xc0) == 0xc0) {
count = b & 0x3f;
value = filebuf[in_pos++];
while (count-- && out_pos <= 0xf9ff) {
dst[out_pos++] = value;
}
} else {
dst[out_pos++] = b;
}
}
This loader does not track x and y separately. It treats the decoded image as a flat 64,000-byte span, exactly matching mode 13h memory.
Palette extraction uses the last 0300h bytes of the file and shifts each byte
down to VGA DAC range:
7c93 mov ax,[file_size]
7c97 sub ax,0300h ; start of RGB palette tail
...
7cc4 mov bx,[palette_index]
7cca mov al,[filebuf+bx]
7ccf shr al,1
7cd1 shr al,1 ; 8-bit channel to 6-bit channel
7cd3 les di,[bp+08h] ; palette output buffer
7cd9 mov es:[di+bx],al
The DAC upload helper at 7b00h writes all 768 channel bytes to ports 3c8h
and 3c9h:
7b04 mov dx,03c8h
7b07 xor al,al
7b09 out dx,al ; first DAC index
7b12 les di,[bp+06h]
7b16 mov bx,[bp-04h]
7b1a mov al,es:[di+bx]
7b1d mov dx,03c9h
7b20 out dx,al
7b23 inc word [bp-04h]
7b27 cmp word [bp-04h],02ffh
7b2d jbe 7b12h
There is no color remap stage between PCX and VGA here. The intro relies on the image palette and on later DAC writes/fades.
Vertical Retrace And Small VGA Helpers
The retrace wait at 79d6h watches VGA input status port 3dah, bit 3:
79d6 mov dx,03dah
wait_not_vblank:
79d9 in al,dx
79da and al,08h
79dc jne wait_not_vblank
wait_vblank:
79de in al,dx
79df and al,08h
79e1 je wait_vblank
79e3 retf
That sequence first waits until the old vertical blank interval has ended, then waits until the next one begins. It is used as the frame fence around page updates and DAC changes.
Single DAC entry writes are handled at 79e4h:
79e4 mov dx,03c8h
79e7 mov al,[bp+0ch] ; DAC index
79ea out dx,al
79eb inc dx ; 03c9h
79ec mov al,[bp+0ah] ; red
79ef out dx,al
79f0 mov al,[bp+08h] ; green
79f3 out dx,al
79f4 mov al,[bp+06h] ; blue
79f7 out dx,al
The pixel plot helper at 79a2h is a direct y * 320 + x byte store into a
caller-selected segment:
79a2 mov ax,[bp+08h] ; y
79a5 mov bx,0140h
79a8 mul bx
79aa add ax,[bp+0ah] ; x
79ad mov di,ax
79af mov al,[bp+06h] ; color
79b2 mov es:[di],al
The horizontal-line helper at 7a15h does the same row math and then fills from
the lower x to the higher x. It handles single-byte alignment, an optional word,
and then dwords:
7a4f mov ax,[bp+08h] ; y
7a52 shl ax,08h
7a55 mov dx,[bp+08h]
7a58 shl dx,06h
7a5b add ax,dx ; y * 320
7a5d add ax,[bp-04h] ; left x
7a60 mov di,ax
...
7a79 test cx,0001h
7a7d je no_odd_byte
7a7f stosb
...
7a87 test cx,0001h
7a8b je no_word
7a8d stosw
...
7a92 shr cx,01h
7a94 rep stosd
This gives the rest of the program a cheap span primitive without carrying a full polygon engine into every effect.
Reversed Text Renderer
The text/path renderer begins at 07fdh. It receives a Pascal-style string and
an output segment, then renders one character at a time as a large stamped
shape. Two punctuation characters are remapped specially:
0879 mov al,[bp-114h] ; current character
087f cmp al,21h ; '!'
0881 jne not_bang
0883 mov byte [bp-114h],1bh
...
088d cmp al,3fh ; '?'
088f jne not_question
0891 mov byte [bp-114h],1ch
...
089a sub byte [bp-114h],40h
So letters become compact glyph numbers by subtracting 40h, while ! and ?
are assigned to glyph slots 1bh and 1ch.
For each non-space glyph, the renderer computes a moving x/y pair from three
small tables near 5484h, 5614h, and 57a4h. A mask at 79c6h wraps the
table indexes:
08c3 mov bx,[bp-122h]
08c9 mov ax,[5484h+bx] ; motion term A
08d3 mov bx,[bp-11eh]
08d9 add ax,[5614h+bx] ; motion term B
08e3 mov bx,[bp-120h]
08e9 sub ax,[57a4h+bx] ; motion term C
08f3 add ax,[5946h] ; horizontal base
08f7 mov [bp-118h],ax
A matching block computes the vertical term with the same table family and base
5948h. The wrapper at 0c5eh chooses those base values:
0c72 cmp word [bp+06h],0001h
0c77 jne other_mode
0c79 mov word [5946h],0140h
0c7f mov word [5948h],0064h
...
0c9a mov word [5946h],00a0h
0ca0 mov word [5948h],00fah
After each glyph, the renderer advances the drawing x base by 46h. Spaces get
a shorter extra shape pass and then advance by 14h before the same 46h
spacing. That explains why the text string can be visually broad even though
the literal data is short.
The glyph routines themselves are not font-table lookups. Several routines in
the 0189 segment write hand-made byte patterns with 386 stores such as
mov eax,imm32 followed by es: writes. A representative stamp routine looks
like this structurally:
1892 mov ax,[bp+08h] ; y
1895 mov bx,0140h
1898 mul bx
189a add ax,[bp+0ah] ; x
189d mov di,ax
...
18b9 mov eax,68676666h
18bf mov es:[di+0141h],eax
18c7 mov es:[di+0281h],eax
18cf mov es:[di+03c1h],eax
...
The color bytes 66h, 67h, 68h, 69h, and related values are baked into
the code. The text effect is therefore a code-stamped vector of chunky glyph
pieces, not an 8x8 BIOS-font text draw.
The main body calls the text wrapper with the reversed phrase at 0fe7h:
1197 lea di,[0fe6h]
119b push cs
119c push di
119d push 0001h
119f lcall 0000:0c5e
That call uses mode 1, so the glyph path is centered around x 0140h and y
0064h.
Thirty Moving Objects
After the text phase the program initializes 30 small object records. The setup
starts at 11e4h and loops from 1 through 1eh:
11e4 mov word [594ch],0001h
init_object:
11ef push 00b4h
11f2 call random_word
11f7 add ax,0005h
11fa mov [46e8h + i*2],ax ; y-ish value
1205 cmp ax,0050h
1208 jbe left_band
right_band:
120a push 0082h
120d call random_word
1212 add ax,0078h
1215 mov [46e4h + i*2],ax ; x-ish value
121c jmp phase
left_band:
121e push 00d2h
1221 call random_word
1226 add ax,0028h
1229 mov [46e4h + i*2],ax
phase:
1230 push 000ch
1233 call random_word
1238 mov [46aeh + i*2],ax ; phase/state 0..11
The x distribution changes depending on the initial y value. Low objects start in a different horizontal band from high objects, producing a staged spread instead of a uniform random rectangle.
The draw/update loop calls 0189:13ae with the object's position and phase:
1266 mov ax,[46aeh + i*2] ; phase/state
1271 push ax
1272 mov ax,[46e8h + i*2] ; y
127d push ax
127e mov ax,[46e4h + i*2] ; x
1289 push ax
128a lcall 0189:13ae
Per frame, each object advances phase modulo 12:
12aa inc word [46aeh + i*2]
12b7 cmp word [46aeh + i*2],000ch
12c0 jne phase_ok
12c2 mov word [46aeh + i*2],0000h
Later in the same timed loop, high objects can move upward by a random 2 or 3 pixels if the runtime time counter has passed the threshold:
13b4 cmp word [46e8h + i*2],0005h
13bd jbe no_raise
13bf push 0002h
13c2 call random_word
13c7 inc ax
13c8 inc ax ; 2..3
13c9 sub [46e8h + i*2],ax
The object renderer itself is another hardcoded chunky stamp family. The phase selects which stamp variant is used, so the object cluster flickers or rotates through a short 12-state cycle.
The 300-Particle Apple-Mask Loop
This is the most interesting piece of the intro. Before the main effect, the program initializes 300 records:
10a5 mov word [5952h],0001h
init_particle:
10b0 push 0136h
10b3 call random_word
10b8 add ax,0005h
10bb mov [40cch + i*2],ax ; x = random(0x136) + 5
10ca push 00beh
10cd call random_word
10d2 mov [4324h + i*2],ax ; y = random(0xbe)
10df push 0003h
10e2 call random_word
10e7 inc ax
10e8 mov [457dh + i],al ; step count 1..3
The x range is 5..0x13a, avoiding the extreme edges of the 320-wide screen.
The y range is 0..189, leaving space for downward tests at +320. The third
table gives each particle one to three micro-steps per frame.
The main walker begins at 1537h. For each particle, it computes
pos = y * 320 + x:
154d mov ax,[4324h + i*2] ; y
1554 mov bx,0140h
1557 mul bx
1559 add ax,[40cch + i*2] ; + x
1560 mov bx,ax ; screen offset
Before it moves the particle, it checks whether the current pixel is already
blocked in A000. If that byte is nonzero, the y value is reset to zero:
1562 mov ax,0a000h
1565 mov es,ax
1567 cmp byte es:[bx],00h
156b je current_empty
156d mov word [4324h + i*2],0000h
That is a cheap collision escape. A particle embedded in an image pixel or another mark is teleported back to the top.
The inner micro-step count comes from the byte table:
1592 mov bl,[457dh + i]
1599 xor bh,bh
159b mov [5950h],bx ; number of substeps for this frame
15a2 mov word [594eh],0001h
Inside each substep, the code first erases the old white particle:
15bd mov ax,[4324h + i*2]
15c4 mov bx,0140h
15c7 mul bx
15c9 add ax,[40cch + i*2]
15d0 mov bx,ax
15d2 mov ax,0a000h
15d5 mov es,ax
15d7 mov byte es:[bx],00h
It then tests the mask/buffer pixels under the particle. The first test is the pixel directly below:
15dd les di,[79cch] ; mask/buffer far pointer
15e2 cmp byte es:[di+bx+0140h],00h
15e8 jne below_blocked
16c9 inc word [4324h + i*2] ; y++
16d6 jmp plot_new
If below is empty, the particle falls straight down. If below is blocked, it tries down-right:
15f1 les di,[79cch]
15f6 cmp byte es:[di+bx+0141h],00h
15fd jne down_right_blocked
1692 inc word [4324h + i*2] ; y++
169f inc word [40cch + i*2] ; x++
16ac jmp plot_new
If down-right is also blocked, it tries down-left:
1606 les di,[79cch]
160b cmp byte es:[di+bx+013fh],00h
1612 jne trapped
165b inc word [4324h + i*2] ; y++
1668 dec word [40cch + i*2] ; x--
1675 jmp plot_new
If all three candidate pixels are blocked, the particle marks the current pixel white, resets to the top, gets a new random x, and increments a global hit counter:
1619 mov ax,0a000h
161c mov es,ax
161e mov byte es:[bx],0ffh
1622 mov word [4324h + i*2],0000h
1631 push 0136h
1634 call random_word
1639 add ax,0005h
163c mov [40cch + i*2],ax
1649 inc word [594ah]
Finally, the updated particle is plotted white:
16d8 mov ax,[4324h + i*2]
16df mov bx,0140h
16e2 mul bx
16e4 add ax,[40cch + i*2]
16eb mov bx,ax
16ed mov ax,0a000h
16f0 mov es,ax
16f2 mov byte es:[bx],0ffh
The clean equivalent is:
for (i = 1; i <= 300; i++) {
pos = y[i] * 320 + x[i];
if (screen[pos] != 0) {
y[i] = 0;
}
for (step = 1; step <= speed[i]; step++) {
pos = y[i] * 320 + x[i];
screen[pos] = 0;
if (mask[pos + 320] == 0) {
y[i]++;
} else if (mask[pos + 321] == 0) {
y[i]++;
x[i]++;
} else if (mask[pos + 319] == 0) {
y[i]++;
x[i]--;
} else {
screen[pos] = 0xff;
y[i] = 0;
x[i] = random(0x136) + 5;
hits++;
}
screen[y[i] * 320 + x[i]] = 0xff;
}
}
That is a compact sand/snow/drip kernel. The image buffer supplies the obstacle shape, and the live screen supplies the temporary white particle trail. The three-neighbor order is important:
- Below first: gravity is dominant.
- Down-right second: the first sideways fallback has a consistent bias.
- Down-left third: only used if down-right is blocked too.
- Trapped case: make a white deposit, reset to the top, and randomize x.
Because each particle has a different speed[i] value from 1 to 3, the field
does not move as one rigid layer. Some white pixels crawl slowly over the mask,
while others cut through several tests per frame.
Filled Triangle / Span Code
The intro also contains a more general filled shape routine around 6df0h. It
is not the central particle loop, but it shows the same taste for simple
integer-heavy VGA spans.
The routine first sorts three vertices by y:
6e18 mov ax,[bp+0ah]
6e1b cmp ax,[bp+0eh]
6e1e jle first_pair_ok
...
6e68 mov ax,[bp+0eh]
6e6b cmp ax,[bp+12h]
6e6e jle second_pair_ok
...
6eb8 mov ax,[bp+0ah]
6ebb cmp ax,[bp+0eh]
6ebe jle sorted
It promotes x values to 16.16 fixed point:
6f00 mov ax,[bp+08h]
6f03 mov dx,ax
6f05 sar dx,0fh
6f08 mov [bp-1ah],dx
6f0b mov [bp-1ch],ax
...
6f1e mov ax,[bp+10h]
6f21 mov dx,ax
6f23 sar dx,0fh
6f26 mov [bp-22h],dx
6f29 mov [bp-24h],ax
Then it calculates edge slopes for the three vertex pairs:
6f2f ; slope from vertex 0 to vertex 1
6f5e ; slope from vertex 1 to vertex 2
6f8d ; slope from vertex 0 to vertex 2
The row loop chooses the left and right active edges, converts fixed-point x to integer endpoints, and fills the span:
7003 mov ax,[bp-04h] ; current y
7006 cmp ax,[bp+12h] ; final y
7009 jg done
...
7029 mov ax,[bp-10h]
702c mov [bp-26h],ax ; x0 integer
7030 mov ax,[bp-0ch]
7033 mov [bp-28h],ax ; x1 integer
...
7076 test cx,0001h
707a je no_odd_byte
707c stosb
...
708a test cx,0001h
708e je no_word
7090 stosw
...
7095 shr cx,01h
7097 rep stosd
After each row it advances the active 16.16 edge accumulators:
70d0 add [bp-0eh],ax
70d6 adc [bp-10h],dx
...
70e5 add [bp-0ah],ax
70eb adc [bp-0ch],dx
...
70fa add [bp-1eh],ax
7100 adc [bp-20h],dx
This routine is more generic than the apple-mask effect, but it uses the same
principle: spend setup work once, then make the visible scanline loop mostly
adds, comparisons, and stos*.
Music And GUS Path
Music setup starts through the 030d segment:
110f lcall 030d:0000 ; player reset/init
1114 lea di,[0fddh] ; fun2.mod Pascal string
1118 push cs
1119 push di
111a lcall 030d:004f ; load module
The lower player code recognizes several ProTracker/FastTracker markers:
5c37 ; read marker from module header
5c58 ; compare against table: M.K., FLT4, 6CHN, 8CHN, OCTA
5c83 ; M.K. / FLT4 => four channels
5c9e ; 6CHN => six channels
5cb7 ; 8CHN / OCTA => eight channels
For this intro the marker is M.K., so the active path is four channels.
The GUS setup parses the ULTRASND environment variable and derives the base
I/O port from the third character of the usual comma-separated value:
31fa ; request environment string
3214 ; read digit-like character
322b sub ax,0030h
3232 shl ax,04h
3235 add ax,0200h ; base I/O port
323a mov es:[di],ax ; save for port helpers
The exact old diagnostic text is not reproduced here; the useful part is the port math.
Sample upload to GUS DRAM is byte-oriented. The loop selects the DRAM pointer
registers, writes the low and high parts of the current pointer, sends one
sample byte to base+105h, and increments the pointer with carry into the high
part:
5e65 mov al,43h
5e67 call gus_select
5e6c mov ax,[bp-14h]
5e6f call gus_write16
5e74 mov al,44h
5e76 call gus_select
5e7b mov al,[bp-12h]
5e7e call gus_write8
5e83 mov al,[sample_byte]
5e86 out dx,al ; dx = base + 105h
5e88 inc word [bp-14h]
5e8b jne pointer_ok
5e8d inc byte [bp-12h]
The player also contains small GUS voice helpers:
| Offset | Role |
|---|---|
5ff2h |
select voice/register pair |
6013h |
write 16-bit GUS register value |
6036h |
set sample start/current low part |
6052h |
set sample end/current low part |
6067h |
set high parts and mode bits |
60e4h |
set frequency/volume-style voice values |
Voice initialization loops over the module channel count:
5f18 mov word [bp-02h],0000h
5f1f cmp [bp-02h],channel_count
5f25 jae done
5f29 push [bp-02h]
5f2c call select_voice
...
5f58 inc word [bp-02h]
5f5b jmp 5f1fh
So the music side is not an opaque library blob in practice. It is a compact GUS module path with recognizable marker parsing, sample upload, and per-voice register writes.
What The Intro Is Doing
The show is small, but the structure is deliberate:
- Use PKLITE to keep the party archive executable small.
- Use normal PCX files for the visible art, avoiding an extra custom image format.
- Decode PCX into flat 64 KB pages and use fast page clear/copy helpers.
- Use hardcoded chunky stamps for text and object shapes, trading data tables for code bytes and simple stores.
- Use a falling-particle kernel over the apple mask as the main handmade effect.
- Use a direct GUS path for the module rather than relying on AdLib or PC speaker fallback.
The deepest visual loop is the 300-particle walker. It is not a heavy 3D or texture-mapping trick. It is a carefully chosen small cellular rule: erase old pixel, test three neighbor pixels in an image mask, update x/y, redraw white, repeat one to three times per particle. On 386/486-era DOS hardware that gives the intro a busy organic surface while the code remains short and easy to time around vertical retrace.