Analysis model: gpt-5.5 xhigh, sol high

Last edited: 2026-08-25

# Dragnet by Dutch Computer Enterprise - Technical Dissection

## Scope

This covers `Dragnet` by Dutch Computer Enterprise, released in March 1991 for
MS-DOS. Pouet lists it as a DOS demo, and the archive examined here is the
scene.org mirror copy of `DRAGNET.ZIP`.

Sources and artifact:

- Pouet: https://www.pouet.net/prod.php?which=4068
- Archive: https://files.scene.org/get/mirrors/scenesp.org/compilations/blastersound_bbs/demos/DRAGNET.ZIP
- Internet Archive emulator item: https://archive.org/details/demoscene_Dragnet-DCE

Hashes from the examined archive:

```text
25050296dc83b144178ef4b635f053947314e2b4d8c784d85938ca956633b1d1  dragnet.zip
c2bad49ba5af162b7ee42b5c3c93bcd3f6a43cdd0b3f0f9894706786e6355aaa  DRAGNET.EXE packed
8005307a8189c9ebed71e2b4c0c22b37e85113cc47b5b18847238db166958a82  DRAGNET.EXE restored
1594635b59457056450d164c628ed3b27f18f28cee89cfceb238670560c4a7ab  DRAGNET1.DAT
29d2c082aa89caf779ea8cfc35a1582604c7f3c2792df6d2adddeca95afb8488  DRAGNET2.DAT packed
eb362d58b5d7fc35fd44bde721879bbff1b0f135fa68ca71af09b14a6f800cb9  DRAGNET2.DAT restored
0d5ce51bc975fac55274b61a1c9ade5a4725ea4ef29ba1500c4a84cc9a050435  DRAGNET3.DAT
e6ec30104beec7bab67aef0f5f6378b535a2cf3e9992f4fc641b50e23e7c6a25  README.EXE packed
a3729f89bc9af6b163ee6e5209350a88c5400fc045d957d78b2332f8776bed3a  README.EXE restored
```

The archive also contains BBS-era packaging files and historical contact text.
Those details are not reproduced here.

## Runtime Capture / Visual Reference

Local DOSBox-X 2026.01.02 capture attempts on 19 June 2026 used
`machine=svga_s3`, normal core, MPEGTS H.264 capture, and the original packed
archive files. Timing zero for those local attempts was the start of
`dx-capture`.

The tested local command lines were:

```text
dx-capture /v DRAGNET.EXE /N
dx-capture /v DRAGNET.EXE /I=7 /A=220H /S
```

I tried the sound path with `sbpro2` at 30,000 cycles and with `sb2` at 3,000
cycles, using SDL dummy audio for the active-audio runs. All local captures
reached the same first-stage partial top-band image and then stayed there for
the bounded 35-63 second runs. Those local frames are therefore not a good
visual record of the intended demo sequence.

The frames below are taken from the Internet Archive browser-emulated Dragnet
item, whose metadata starts the demo with the bundled `RUNME.BAT`. Timestamps
are approximate frame times from IA's `dragnet_screenshot.gif`, which stores
2-second frame delays; they are not local DOSBox-X timestamps.

![Dragnet public title frame](images/dragnet-dce-demozoo-title.png)

This public title frame is the cleanest opening-state evidence in the pass:
the DCE logo, `presents`, and the `Dragnet` title all sit in the same 320x200
composition that the later IA frames continue from.

The sequence GIF below is assembled from the same Internet Archive
browser-emulated reference frames. It is not local DOSBox-X evidence; it is a
compact visual index for the public sequence that the local runs failed to
reach: opening logo, caption changes, purple-floor variant, white-floor text
pass, and later brown-floor scroller pass.

![Dragnet public reference sequence GIF from the IA-emulated frame set](images/dragnet-runtime-sequence.gif)

| Timestamp | Frame | Notes |
| --- | --- | --- |
| `00:00` | ![Dragnet runtime 00:00](images/dragnet-runtime-00-00-000.png) | Opening DCE logo over the mountain strip and orange floor. |
| `00:14` | ![Dragnet runtime 00:14](images/dragnet-runtime-00-14-000.png) | The `Big EP` caption over the same logo/landscape compositor. |
| `00:32` | ![Dragnet runtime 00:32](images/dragnet-runtime-00-32-000.png) | Purple-floor pass with the `The Game` title band. |
| `00:36` | ![Dragnet runtime 00:36](images/dragnet-runtime-00-36-000.png) | The `The Omen` caption during the purple-floor variant. |
| `01:00` | ![Dragnet runtime 01:00](images/dragnet-runtime-01-00-000.png) | White-floor text pass with the landscape still behind the status band. |
| `01:20` | ![Dragnet runtime 01:20](images/dragnet-runtime-01-20-000.png) | Later brown-floor scroller pass, still using the DCE logo and mountain scene. |

The existing public title frame, public-reference frames, and sequence GIF were
not regenerated, cropped, padded, resized, or touched in this concordance pass.

## Runtime-To-Code Concordance

This is a public-reference concordance, not a local DOSBox-X runtime claim. The
local captures stalled at the first-stage partial top-band image; the useful
visual sequence here comes from the Internet Archive browser-emulated frame set.
Those frames still map well to the binary because Dragnet is split into a
launcher visual and a second-stage text/palette machine.

```text
visual evidence                         code evidence
00:00 DCE/logo/mountain/floor frame      launcher mode 13h, DAC load, CRTC tweak
00:14 caption over same composition      launcher slice animation and sound pacing
00:32 purple-floor title-band pass       DRAGNET2.DAT scheduler and palette states
00:36 alternate caption                  text/control-stream renderer 0x17D09
01:00 white-floor text pass              palette convergence and DAC update loops
01:20 brown-floor scroller pass          sparse restore/events and animated palette
sequence GIF section changes             parent EXEC mailbox into DRAGNET2.DAT
sound-paced timing behavior              CT-VOICE IRQ/DMA callback and 0x17236 poll
```

The opening `00:00`/`00:14` frames belong to the launcher, not just the child
stage. `DRAGNET.EXE` decodes `DRAGNET1.DAT`, sets mode `13h`, streams a full
DAC at `0x59BC`, tweaks CRTC registers around `0x59E3`, and copies prepared
chunks into `A000h` with the `0x5A42` and `0x5A82` loops. That matches the
fixed DCE logo/mountain/floor composition and its caption changes.

The handoff into the later public sequence is explained by the parent/child
mailbox. The launcher writes segment-zero fields at `0000:012C..0173`, including
sound/timing flags, then executes `DRAGNET2.DAT` with DOS `INT 21h AX=4B00h`.
The child verifies its prepared blocks, decodes the `0x5147` control/text data,
reads the mailbox, and clears `0000:0170`. The public sequence GIF therefore
matches a real program-stage boundary, not just an internal scene switch.

The second-stage visual rhythm comes from the scheduler at `0x171F5`. It polls
the sound callback through `0x17236` between calls to the text renderer,
keyboard check, sparse restore, palette oscillators, DAC updater, delayed event
selector, palette target selector, sliding palette-window oscillator, and
script-triggered state machine. That explains why the IA frames retain the same
logo/landscape base while captions, floor colors, and scroller states change.

The captions in `00:32`, `00:36`, `01:00`, and `01:20` tie to the renderer at
`0x17D09`. It reads a decoded control stream, treats bytes `E6h..F0h` as script
state triggers, maps printable characters into `0x54`-byte font records, and
draws fourteen scanline steps per glyph column into `A000h`. The text is shaded
because the glyph bits choose among palette indices initialized at `10h`,
`22h`, and `2Fh`, while later palette code changes what those indices display.

The floor/color changes in the purple, white, and brown passes are palette
machinery rather than separate full-screen images. `0x176D5` maintains five
palette-index oscillators, `0x17905` converges a 48-byte live palette block
toward selected targets, `0x17A28` slides a 48-byte palette window, and
`0x180CB` waits for `03DAh` before blanking/writing DAC groups through
`03C8h/03C9h`. That is the mechanism behind large visible color changes with
limited framebuffer work.

The later scroller/pass changes also use sparse framebuffer repair. `0x17AF4`
arms delayed events every 200 calls, and worker `0x17C06` restores or stamps
screen positions from the prepared data segment while preserving selected
palette-index ranges. Its offsets step by `0140h`, `03C0h`, `0500h`, and
`0640h`, i.e. screen-row sized distances in mode `13h`.

The sound path is part of the visual timing model. With `/S`, the launcher
configures the CT-VOICE/Sound Blaster path, installs the IRQ handler, programs
DMA channel 1, and feeds the DSP from preprepared sample data. The child-stage
poll at `0x17236` then waits on the parent-supplied sound block before
advancing certain visual routines. That matches `RUNME.BAT` and explains why
local no-sound/alternate-sound attempts can land in a different or stalled
visual state.

## Archive Layout

The runtime is split into a launcher, a second executable disguised as a data
file, a large sound/data payload, and a scrollable README executable:

| File | Size | Role |
| --- | ---: | --- |
| `DRAGNET.EXE` | 13,055 | Packed launcher, first visual, loader, Sound Blaster driver |
| `DRAGNET1.DAT` | 81,318 | Packed graphics/control data used by the launcher |
| `DRAGNET2.DAT` | 21,839 | Packed MZ executable, the main second-stage demo |
| `DRAGNET3.DAT` | 367,624 | Large sampled-sound/data payload loaded when sound is enabled |
| `README.EXE` | 10,150 | Packed scrollable README program |
| `RUNME.BAT` | 24 | Runs `dragnet /I=7 /A=220H /S` |

The run line tells the loader to use IRQ 7, Sound Blaster base `220h`, and sound
enabled. The executable also accepts lower-case variants. The meaningful
command-line switches found in the restored launcher are:

```text
/I=n      Sound Blaster IRQ, accepted range 2..7
/A=2x0   Sound Blaster base, 210h..270h in 10h steps
/S       enable sound path
/F       alternate sound/device mode flag
/T=n     small timing/count parameter passed to stage two
/N       no-sound path
```

## Restoring The Packed Files

`DRAGNET.EXE`, `DRAGNET2.DAT`, and `README.EXE` all have the same packed MZ
shape: a tiny no-relocation stub, entry at `FFF0:0100`, and the string
`Packed file corrupt or incomplete demo!`. UNP restores all three to normal
MZ executables.

Restored MZ shapes:

```text
DRAGNET.EXE
  file size:     25,003 bytes
  header size:      512 bytes
  load image:    24,491 bytes
  relocations:       66
  entry:        CS:IP 0551:0000
  stack:        SS:SP 0511:0400

DRAGNET2.DAT
  file size:    100,019 bytes
  header size:      512 bytes
  load image:    99,507 bytes
  relocations:       66
  entry:        CS:IP 16FC:0000
  stack:        SS:SP 16BC:0400

README.EXE
  file size:     37,156 bytes
  header size:      512 bytes
  load image:    36,644 bytes
  relocations:       10
  entry:        CS:IP 08D6:0000
  stack:        SS:SP 0896:0400
```

When reading the static listings, the relocation table matters. Many instructions
disassemble as:

```asm
mov bp,0000h
mov ds,bp
```

Those immediate zero words are relocation targets. At runtime DOS adds the
program load segment, so they mean "select this executable's data segment",
not absolute segment zero. In contrast, places that use `xor bp,bp` followed by
`mov es,bp` really do access segment `0000h`. Dragnet intentionally uses that
distinction for a parent/child mailbox.

## Launcher Overview

The restored `DRAGNET.EXE` is not only a file launcher. It does five jobs:

1. Shrinks its DOS memory block and allocates a large temporary area.
2. Verifies the expected files by decoding a hidden filename table and checking
   file sizes.
3. Parses `/I`, `/A`, `/S`, `/F`, `/T`, and `/N`.
4. Shows the first VGA sequence while optionally starting the CT-VOICE Sound
   Blaster driver.
5. Builds a small mailbox and uses DOS `INT 21h / AX=4B00h` to run
   `DRAGNET2.DAT`.

### VGA And Memory Checks

The launcher starts at load-image offset `0x5510`:

```asm
05510: mov al,02h
05512: out 21h,al             ; mask keyboard IRQ while loader owns polling
05514: mov ax,relocated_data
05517: mov ds,ax
...
05528: mov ah,4Ah
0552a: int 21h                ; resize own memory block
0552c: mov ah,48h
0552e: mov bx,7800h
05531: int 21h                ; allocate 7800h paragraphs
```

If allocation fails, error code `1` selects the "not enough memory" string. The
VGA check uses BIOS function `AX=1A00h`, accepts only a VGA-style return, and
branches to error code `2` otherwise:

```asm
05552: mov ax,1A00h
05555: int 10h
05557: cmp al,1Ah
05559: jne not_vga
0555b: cmp bl,07h
0555e: je  ok
05560: cmp bl,08h
05563: je  ok
```

### Hidden Filename Table

The filenames are not visible to `strings`. The launcher decodes a word stream
at `0x22BB` into a table at `0x27C5`. The transform is tiny:

```asm
05f92: shr cx,1
05f94: lodsw
05f95: sub ah,40h
05f98: add al,40h
05f9a: stosw
05f9b: loop 05f94h
```

Decoded table:

```text
DRAGNET .EXE
DRAGNET1.DAT
DRAGNET2.DAT
README  .EXE
DRAGNET3.DAT
```

The size-check loop opens each name, seeks to EOF, and compares the low word of
the file size against a five-word table:

```text
13055  DRAGNET.EXE
15782  DRAGNET1.DAT low word of 81318
21839  DRAGNET2.DAT
10150  README.EXE
39944  DRAGNET3.DAT low word of 367624
```

The loop increments the filename pointer by 14 bytes per file, so the names are
stored as fixed-width DOS-ish strings:

```asm
0558f: mov ax,3D00h           ; open read-only
05592: int 21h
05599: mov ax,4202h           ; seek EOF
0559c: xor cx,cx
0559f: xor dx,dx
055a2: int 21h
055a4: mov dx,[si]            ; expected low word
055ac: cmp dx,ax
055ae: jne corrupt
055b5: add dx,0Eh             ; next filename
055b8: add si,2               ; next expected size word
```

This is not cryptographic integrity. It is a quick "are the expected package
members present?" guard before the demo starts modifying video, PIC state, and
low-memory mailbox fields.

### Command-Line Parser

The command tail is scanned from the PSP. Each slash option is single-letter
and case-insensitive:

```asm
055e7: inc di
055e8: cmp byte ptr es:[di],'/'
055ec: je  parse_option
055ee: cmp byte ptr es:[di],0Dh
055f2: je  options_done
```

The IRQ parser accepts `/I=2` through `/I=7` and stores the IRQ number at
`0x1FB4`:

```asm
05655: cmp byte ptr es:[di+1],'='
0565c: cmp byte ptr es:[di+2],'2'
05663: cmp byte ptr es:[di+2],'7'
0566c: mov al,es:[di+2]
05670: sub al,'0'
05672: mov [1FB4h],ax
```

The base-address parser is deliberately narrow. It requires `2?0`, rejects
`200h`, rejects values above `270h`, multiplies the middle digit by `16`, and
adds it to `0200h`:

```asm
0567f: cmp byte ptr es:[di+2],'2'
05686: cmp byte ptr es:[di+4],'0'
0568d: mov cl,es:[di+3]
05691: sub cl,'0'
05699: cmp cl,7
0569e: shl cl,1
056a0: shl cl,1
056a2: shl cl,1
056a4: shl cl,1
056a8: mov bx,0200h
056ab: add bx,cx              ; 0210h .. 0270h
```

`/S` and `/F` set an output-mode byte; `/N` clears the "try sound" flag. If no
mode flag was forced, the loader peeks at the BIOS machine ID byte at
`F000:FFFE` and chooses between two timing modes.

## Launcher Data Expansion

`DRAGNET1.DAT` is not a flat 320x200 picture. The launcher first reads `0x5F9C`
bytes, then expands and transforms data into a large temporary area.

The byte-run decoder at `0x58AF` uses an unusual but simple marker:

```asm
058b3: lodsb                  ; marker/source byte A
058b4: mov bl,al
058b6: lodsb                  ; next byte B
058b7: cmp al,bl
058b9: je  run
058bb: stosb                  ; literal B
058bc: jmp next

058bf: lodsb                  ; run value
058c0: mov dl,al
058c2: lodsw                  ; run length
058c3: mov cx,ax
058c5: mov al,dl
058c8: rep stosb
```

In other words, if two adjacent bytes are unequal, the second byte is a literal.
If they are equal, the next byte is the fill value and the next word is the run
length. The source loop stops when the source pointer reaches the byte count
passed in `CX`:

```asm
058cc: cmp cx,si
058ce: ja  058b6h
```

That makes the stream compact for the large flat or repeated areas in the logo
and mask data, while still cheap enough for a 1991 real-mode loader.

The second transform is the same word transform used for filenames. It decodes
graphics/control blocks by adding `40h` to the low byte and subtracting `40h`
from the high byte of each word:

```asm
05f94: lodsw
05f95: sub ah,40h
05f98: add al,40h
05f9a: stosw
```

This is not compression in the normal sense. It is a byte-range shuffle that
hides readable data and turns stored bytes back into palette/screen/control
values.

## First Visual In The Launcher

The launcher sets mode `13h`, loads the DAC, tweaks CRTC registers, and copies
prebuilt chunks into `A000h`.

Palette load:

```asm
059bc: mov ax,0013h
059bf: int 10h
059c6: mov si,2301h
059c9: mov cx,0300h
059cc: mov dx,03C8h
059cf: xor al,al
059d1: out dx,al
059d2: inc dx
...
059dd: mov al,[si]
059df: out dx,al
059e0: inc si
059e1: loop 059d3h
```

The CRTC tweak writes register `18h` and clears/sets bits in registers `07h`
and `09h`. That changes vertical timing/line behavior rather than just using
stock BIOS mode 13h:

```asm
059e3: mov dx,03D4h
059e6: mov ax,00BCh
059f9: mov al,18h
059fb: out dx,ax
...
05a0c: mov al,09h
05a1b: out dx,ax
```

Two big copy loops then fill video memory from the prepared temporary segment.
One copies `0x3520` words from source `0x8C00` to `A000:8D40`; another animates
six 0x1540-byte slices from the allocated segment into the front buffer:

```asm
05a42: mov si,8C00h
05a45: mov di,8D40h
05a48: mov cx,3520h
05a4b: rep movsw

05a82: xor si,si
05a85: xor di,di
05a88: mov cx,0AA0h
05a8b: rep movsw
05a8d: add dx,0154h           ; next source segment stride
...
05abb: inc bx
05abc: cmp bx,6
05abf: jne slice_loop
```

The timing path either waits for a shared sound counter when sound is active,
or burns a calibrated delay using the word at `0x0A4A`:

```asm
05a9d: mov ax,[505Fh]
05aa0: cmp ax,[505Fh]         ; wait until sound callback changes it
05aa4: je  05aa0h

05ab2: mov ax,[0A4Ah]         ; no-sound delay
05ab5: dec ax
05ab6: jne 05ab5h
```

This is why the loader has two visibly similar timing modes: sound playback can
drive frame pacing, but the demo can still run without it.

## CT-VOICE Sound Blaster Driver

`DRAGNET.EXE` contains a compact Creative Labs `CT-VOICE`-style driver. The
strings are explicit:

```text
CT-VOICE
Creative Sound Blaster Card
```

The hardware base address is stored at `0x0030`, IRQ at `0x0032`, and the code
talks to the classic DSP ports relative to the base:

```text
base + 06h  DSP reset
base + 0Ah  DSP read data
base + 0Ch  DSP write command/data
base + 0Eh  DSP read status / IRQ acknowledge
```

### DSP Write Loop

The write helper waits for the DSP write buffer to become ready, with a timeout
of `0x0200` polls. It preserves the outgoing byte in `AH`, reads the status
from `DX`, and tests the sign bit:

```asm
00199: push cx
0019a: mov  cx,0200h
0019d: mov  ah,al
0019f: in   al,dx
001a0: or   al,al
001a2: jns  ready
001a4: loop 0019fh
001a6: stc
001a7: jmp  done
001a9: mov  al,ah
001ab: out  dx,al
001ac: clc
001ad: pop  cx
001ae: ret
```

The helper returns carry set on timeout. Most call sites ignore the carry after
initialization because, once streaming is active, the interrupt path must stay
short.

### DSP Read Loop

The read helper waits on `base+0Eh`, then subtracts four from `DL` to read
`base+0Ah`:

```asm
001b1: mov dx,[0030h]
001b5: add dl,0Eh
001b8: mov cx,0200h
001bb: in  al,dx
001bc: or  al,al
001be: js  has_byte
001c0: loop 001bbh
001c2: stc
...
001c5: sub dl,04h
001c8: in  al,dx
001c9: clc
```

### DSP Reset And Detection

Reset toggles `base+6`, then waits for the DSP to return `AAh`:

```asm
001ef: mov dx,[0030h]
001f3: add dl,06h
001f6: mov al,01h
001f8: out dx,al
001fd: xor al,al
001ff: out dx,al
00202: call read_dsp
00205: cmp al,0AAh
00207: je  ok
```

There is also an `E0h`/`AAh` test expecting `55h`, which is a standard DSP
sanity check:

```asm
0021b: mov al,0E0h
00224: call write_dsp
00229: mov al,0AAh
0022b: call write_dsp
00230: call read_dsp
00235: cmp al,55h
```

### DMA Channel 1 Setup

The DMA helper at `0x0327` programs 8-bit DMA channel 1:

```asm
0032a: mov al,05h
0032c: out 0Ah,al             ; mask channel 1
0032e: xor al,al
00330: out 0Ch,al             ; reset DMA flip-flop
00332: mov al,dh
00334: out 0Bh,al             ; mode
00336: mov al,bl
00338: out 02h,al             ; address low/high, channel 1
0033a: mov al,bh
0033c: out 02h,al
0033e: mov al,cl
00340: out 03h,al             ; count low/high, channel 1
00342: mov al,ch
00344: out 03h,al
00346: mov al,dl
00348: out 83h,al             ; page register
0034a: mov al,01h
0034c: out 0Ah,al             ; unmask channel 1
```

The physical-address helper just above it converts `segment:offset` into the
DMA address/page triplet by rotating the segment and adding the high paragraph
bits:

```asm
00350: mov cl,4
00353: rol dx,cl
00357: and dx,000Fh
0035a: and cx,FFF0h
0035d: add ax,cx
0035f: adc dx,0
```

### Interrupt Vector And PIC Mask

The driver installs the Sound Blaster IRQ handler by writing the IVT entry for
`IRQ + 8`:

```asm
0038c: mov dx,ax              ; new handler offset
0038e: mov al,[0032h]         ; IRQ
00391: add al,8
00394: shl al,1
00396: shl al,1               ; vector index * 4
0039d: mov es,0
0039f: mov ax,es:[bx]
003a2: mov [0072h],ax         ; saved old offset
003a5: mov es:[bx],dx
003a8: mov ax,es:[bx+2]
003ac: mov [0074h],ax         ; saved old segment
003af: mov es:[bx+2],cs
```

It then unmasks the chosen IRQ bit at PIC port `21h`:

```asm
003b4: mov cl,[0032h]
003b8: mov ah,1
003ba: shl ah,cl
003bc: not ah
003be: in  al,21h
003c0: and al,ah
003c2: out 21h,al
```

The restore routine reverses the IVT write and masks the IRQ again.

### Startup Handshake And Playback Commands

The start routine does a small one-byte DMA transfer first, then programs the
DSP:

```asm
00272: mov al,0E2h
00274: call dsp_write_raw
00277: mov al,[0045h]
0027a: call dsp_write_raw
...
00288: mov al,0E4h
0028a: call dsp_write_raw
0028d: mov al,0AAh
0028f: call dsp_write_raw
00292: mov al,0E8h
00294: call dsp_write_raw
00297: call dsp_read_raw
0029a: cmp al,0AAh
0029c: jne 00297h
```

Then it sets the time constant to `64h` and starts an 8-bit DAC/DMA block:

```asm
002b4: mov al,40h             ; DSP time constant command
002b6: call dsp_write_raw
002b9: mov al,64h
002bb: call dsp_write_raw
002be: mov al,14h             ; 8-bit DMA output
002c0: call dsp_write_raw
002c3: xor al,al              ; count low
002c5: call dsp_write_raw
002c8: xor al,al              ; count high
002ca: call dsp_write_raw
```

The code waits until the IRQ handler sets byte `0x0065`, or times out with
error code `3`.

### Streaming IRQ Handler

There are two related handlers. The short test handler acknowledges the DSP and
sets the startup flag:

```asm
003fa: push ds
00401: mov dx,[0030h]
00405: add dx,0Eh
00408: in  al,dx              ; acknowledge DSP interrupt
00409: mov byte [0065h],1
0040e: mov al,20h
00410: out 20h,al             ; EOI to PIC
00415: iret
```

The streaming handler at `0x05B2` saves registers, calls the buffer-refill
path, acknowledges the DSP status port, sends PIC EOI, and returns with `iret`:

```asm
005bd: sti
005c3: mov ax,[0092h]
005c6: or  ax,[0094h]         ; remaining byte count high/low
005ca: jne more_data
005cc: call stop_or_finish
005d1: call refill_block
005d4: mov dx,[0030h]
005d8: add dl,0Eh
005db: in  al,dx
005dc: mov al,20h
005de: out 20h,al
005e9: iret
```

The refill path computes the next chunk length, programs DMA channel 1 again,
and sends DSP command `24h` with the byte count:

```asm
005ea: mov cx,FFFFh
005ed: cmp byte [0091h],0
005f4: inc byte [0091h]
005f8: mov cx,[0096h]
005fc: sub cx,[008Dh]
00600: mov [008Fh],cx
00607: sub [0092h],cx
0060b: sbb [0094h],0
...
00633: mov dh,45h             ; DMA mode
00635: mov dl,[008Ch]         ; page
00639: mov ax,[008Dh]         ; address
0063c: mov cx,[008Fh]         ; count
00640: call dma_channel_1
...
0065c: mov al,24h
0065e: call dsp_write_raw
00661: mov al,cl
00663: call dsp_write_raw
00666: mov al,ch
00668: call dsp_write_raw
```

This is the classic inner loop of the sound side: the interrupt does not mix
samples. It keeps the SB DSP and DMA controller fed from an already prepared
sample/control stream. That fits the production: the "Dragnet" music is a
large sampled payload rather than a compact FM tracker.

## Parent/Child Mailbox

After the first visual and optional sound load, `DRAGNET.EXE` chains to
`DRAGNET2.DAT` with DOS `EXEC`:

```asm
05f2f: mov dx,27E1h           ; decoded "DRAGNET2.DAT"
05f32: mov bx,50FBh           ; DOS exec parameter block
05f35: mov ax,4B00h
05f38: int 21h
```

Just before that call it writes a mailbox in segment zero:

```asm
05edc: xor bp,bp
05ede: mov es,bp              ; absolute segment 0000h
05ee0: mov bp,relocated_data
05ee3: mov ds,bp

05ee5: mov es:[012Ch],bp      ; parent load/data segment
05eea: mov word es:[012Eh],505Fh
05ef1: mov ax,[1F99h]
05ef4: mov es:[0130h],ax      ; loaded-data segment
05ef8: mov word es:[0132h],28CBh
05eff: mov ax,[505Bh]
05f02: mov es:[0134h],ax      ; callback/vector table offset
05f06: mov ax,[505Dh]
05f09: mov es:[0136h],ax      ; callback/vector table segment
05f0d: mov byte es:[0170h],1
05f13: mov al,[5061h]
05f16: mov es:[0171h],al      ; sound-active flag
05f1a: mov al,[1FB8h]
05f1d: mov es:[0172h],al      ; timing/mode flag
05f21: mov al,[1FB9h]
05f24: mov es:[0173h],al      ; /T value
```

This is deliberately ugly and very early-PC-demo-like: it borrows bytes inside
the interrupt vector table area as transient communication between the parent
and the child process. The second-stage executable reads those bytes at startup
and then clears `0000:0170`.

## DRAGNET2.DAT Startup

`DRAGNET2.DAT` is a normal MZ executable after unpacking. Its first job is to
verify/decode data prepared by the launcher.

Two additive checksum loops use helper `0x184A6`, which sums `CX` bytes at
`ES:DI` into `BL` and returns the sum in `AL`:

```asm
184a6: xor bl,bl
184a8: mov al,es:[di]
184ab: add bl,al
184ad: inc di
184ae: loop 184a8h
184b0: mov al,bl
184b2: ret
```

At entry:

```asm
16fc0: mov bp,relocated_06EA
16fc3: mov es,bp
16fc5: mov di,0007h
16fc8: mov cx,FD00h
16fcb: call 184A6h
16fce: cmp al,1Fh             ; checksum prepared payload

16fd5: mov bp,relocated_data
16fd8: mov es,bp
16fda: mov di,5147h
16fdd: mov cx,17F8h
16fe0: call 184A6h
16fe3: cmp al,61h             ; checksum encoded control/text block
```

The second block is decoded with the same word transform as the launcher:

```asm
16ff1: mov si,5147h
16ff4: mov di,5147h
16ff7: mov cx,17F8h
16ffa: call 1849Ah

1849a: shr cx,1
1849c: lodsw
1849d: sub ah,40h
184a0: add al,40h
184a2: stosw
184a3: loop 1849Ch
```

Then it reads the mailbox:

```asm
1700a: xor bp,bp
1700c: mov es,bp
1700e: cmp byte es:[0170h],1
17014: jne exit
17019: mov byte es:[0170h],0
1701f: mov ax,es:[012Ch]      ; sound block segment / zero
17026: mov ax,es:[012Eh]      ; sound counter offset
1702d: mov ax,es:[0130h]      ; loaded data segment
17034: mov ax,es:[0132h]      ; sound callback parameter pointer
1703b: mov ax,es:[0134h]      ; callback table offset
17042: mov ax,es:[0136h]      ; callback table segment
17049: mov al,es:[0171h]      ; sound active
17050: mov al,es:[0172h]      ; mode
17057: mov al,es:[0173h]      ; /T count
```

If sound is active, it may free the parent's loaded sound block and later call
back through the pointer table the parent supplied.

## Second-Stage Scheduler

Once mode `13h` and the DAC are set, `DRAGNET2.DAT` does not use a single
monolithic effect loop. It runs a fixed list of routines, with a sound-progress
poll before each one:

```asm
171f5: call 17236h            ; poll/wait sound callback
171f8: call 17D09h            ; text/control-stream renderer
171fb: call 17236h
171fe: call 180B3h            ; keyboard/exit check
17201: call 17236h
17204: call 17C06h            ; row/column damage or restore pass
17207: call 17236h
1720a: call 176D5h            ; palette index oscillator
1720d: call 17236h
17210: call 180CBh            ; DAC update
17213: call 17236h
17216: call 1765Eh            ; palette table convergence
17219: call 17236h
1721c: call 17AF4h            ; delayed event selector
1721f: call 17236h
17222: call 17905h            ; palette target selector
17225: call 17236h
17228: call 17A28h            ; palette-window oscillator
1722b: call 17236h
1722e: call 172D8h            ; script-triggered state machine
17231: call 1729Dh            ; timed exit/ending check
17234: jmp  171F5h
```

The sound poll at `0x17236` uses the callback table provided by the parent. If
sound is not active it returns immediately. If sound is active, it waits until a
word in the shared sound block becomes zero, then calls function `6` through
the callback table with a pointer into the loaded sample/control block:

```asm
1724b: mov bp,[6E36h]
1724f: mov es,bp
17251: mov di,[6E42h]
17255: cmp word es:[di],0
17259: jne return
...
17290: mov bx,0006h
17293: mov si,6E3Eh
17296: call far [si]
```

So the second stage is synchronized opportunistically with the sample driver,
but the visual routines themselves remain plain real-mode VGA code.

## Opening/Closing Copy Window

The copy helper at `0x17140` is used both at startup and near the ending. It
copies two words, skips four bytes, and repeats forty times. The source is in
the prepared data segment at `load+06EA`, while the destination is VGA memory:

```asm
17140: push cx
17146: mov si,0007h
17149: add si,0300h
1714d: add si,[6E49h]
17151: add si,[6E4Dh]
17155: mov di,[6E49h]
17159: add di,[6E4Dh]
1715d: cmp byte [6E4Fh],1
17164: add si,08C4h           ; alternate half
17168: add di,08C4h
1716c: mov ds,relocated_06EA
17171: mov es,A000h
17189: mov cx,0028h
17192: movsw
17193: movsw
17194: add si,4
17197: add di,4
1719a: loop 1718Ch
```

The caller advances `6E49h` by `1400h` for 13 rows, then subtracts `0140h` from
`6E4Dh` and repeats on a vblank boundary:

```asm
170ec: mov cx,000Dh
170f4: mov byte [6E4Fh],0
170f9: call 17140h
17101: mov byte [6E4Fh],1
17106: call 17140h
1710e: add word [6E49h],1400h
17114: loop 170EFh
17116: sub word [6E4Dh],0140h
17128: wait vblank at 03DAh
17135: cmp word [6E4Dh],F9FFh
1713b: jb  170ECh
```

This is a stripe/window reveal. It does not redraw an image from primitives; it
selectively copies prepared screen pieces with 320-byte and larger strides.

## Text And Control-Stream Renderer

The most interesting second-stage inner loop is the text renderer at `0x17D09`.
It reads a byte stream from the decoded block at `0x5147 + [4D24]`.

Important control bytes:

```text
0D/0A  skip line/control separators
FC     quote/escape: map to space and reprocess
FD     reset: copy saved screen from 391Ch to 251Ch and restart stream
FE     force a blank/hold state
E6-F0  trigger palette/script states 1..11
```

Normal printable bytes are classified first:

```asm
17d4b: mov al,[bx]
17d4d: cmp al,0E6h
17d51: cmp al,0FAh            ; high control range
17d58: cmp al,'i'
17d64: cmp al,'I'
17d70: cmp al,' '
17d7c: cmp al,'a'
17d80: cmp al,'z'
17d9a: cmp al,'/'
17dfc: cmp al,27h
```

Character rendering uses a compact font table with `0x54` bytes per character.
The input byte is converted to an index by subtracting space and multiplying by
`0x54`:

```asm
17e16: sub al,20h
17e18: xor ah,ah
17e1a: mov bl,54h
17e1c: mul bl                 ; AX = (char - ' ') * 54h
17e1e: mov si,0000h
17e21: add si,ax
```

`[4D23]` selects a sub-column by adding 0, 2, or 4 bytes to the glyph pointer:

```asm
17e23: test byte [4D23h],1
17e2a: add si,2
17e30: test byte [4D23h],2
17e37: add si,4
```

The glyph loop runs fourteen times. Each step loads a word, rotates it by the
current phase in `CL`, then consumes bits with `RCL`. It writes two vertical
pixels per iteration: one at `ES:DI`, one at `ES:DI+1`, then advances `DI` by
`0140h`, exactly one mode-13h scanline.

```asm
17e3a: lodsw
17e3b: rcl ax,cl
17e3d: jc  use_color_2
17e3f: rcl ax,1
17e41: jc  use_color_1
17e43: mov bl,[4D28h]
17e47: mov es:[di],bl
...
17e60: rcl ax,1
17e62: jc  use_color_2_for_second_pixel
17e64: rcl ax,1
17e66: jc  use_color_1_for_second_pixel
17e68: mov bl,[4D28h]
17e6c: mov es:[di+1],bl
...
17e88: add di,0140h
17e8c: add si,4
17e8f: inc byte [4D28h]
17e93: inc byte [4D29h]
17e97: inc byte [4D2Ah]
17e9b: inc word [4D1Fh]
17e9f: cmp word [4D1Fh],000Eh
17ea4: jne 17E3Ah
```

Three color registers start at `10h`, `22h`, and `2Fh` after each glyph column:

```asm
17ea6: mov byte [4D28h],10h
17eab: mov byte [4D29h],22h
17eb0: mov byte [4D2Ah],2Fh
```

That is why the text has a shaded/ramped look without a heavy bitmap
compositor. The font bits choose among three moving palette indices, and the
palette routines can then make those indices glow or fade independently.

### Exact Slice And Character Lifetimes

On an ordinary drawing call, the routine first shifts an internal image band
two bytes toward the lower address:

```asm
17d21: mov si,265Eh
17d24: mov di,265Ch
17d2a: mov cx,08C0h
17d2d: rep movsw             ; 2,240 words / 4,480 bytes
```

The source and destination overlap, but the forward copy is safe because the
destination is two bytes lower. The 14-row glyph slice then reads 14 words and
writes exactly 28 pixels. Its row stride is six source bytes: `LODSW` consumes
the selected two-byte sub-column and `ADD SI,4` skips to that sub-column in the
next row.

Phase `[4D1C]` starts at 1 and advances by four after every slice, producing
the rotation sequence 1, 5, 9, 13. Sub-column `[4D23]` starts at zero. The
character classifier changes how many sub-columns survive:

| Character class | Examples | Slices | Font bytes read / pixels written | Internal bytes shifted |
| --- | --- | ---: | ---: | ---: |
| narrow | `i`, `I`, apostrophe | 4 | 112 / 112 | 17,920 |
| medium | space, `a..z`, slash | 8 | 224 / 224 | 35,840 |
| default | uppercase and other punctuation | 10 | 280 / 280 | 44,800 |

Narrow characters stop after the first four-slice sub-column. Medium
characters stop after two. Default characters run two full sub-columns, then
the third is deliberately cut short after phases 1 and 5 when the phase would
become 9. This is a temporal proportional font: width is paid as repeated
frame calls and buffer shifts, not as a variable-width inner pixel loop.

The 4,480-byte shift is skipped by the explicit hold path and by one global
state gate, so the table describes normal printable progress rather than every
control-stream call. The 28-pixel slice count itself is exact whenever the
glyph body at `17E3Ah` runs.

After each rendered slice, the target base `[4D35]` bounces between two limits:

```asm
17ebc: add word [4D35h],0280h ; one direction
17ec2: sub word [4D35h],0140h ; always subtract one line
17ec8: cmp word [4D35h],6A40h
17ed9: cmp word [4D35h],E4C0h
```

So the text is not simply printed left-to-right. Its baseline moves through the
framebuffer while the control stream changes palette and state-machine targets.

## Script-Triggered State Changes

Bytes `E6h` through `F0h` do not draw characters. They select states for the
palette/table machine:

```asm
17fb5: mov word [6D07h],6AE5h ; E6
17fbf: mov word [6D09h],1
17fc5: mov word [6D0Fh],1

17fce: mov word [6D07h],6B33h ; E7
17fde: mov word [6D0Fh],2

17fe7: mov word [6D07h],6B81h ; E8
17ff7: mov word [6D0Fh],3
...
18097: mov word [6D07h],6CB9h ; F0
180a7: mov word [6D0Fh],0Bh
```

`0x172D8` dispatches `[6D0F]` through states 1..11. The first three states copy
triples from state tables into a live table at `0x6ABB`, but only while the
animated window lies inside a permitted range:

```asm
17365: mov si,6D1Ch
17368: mov di,6ABBh
1736b: add di,[6D11h]
1736f: sub di,0064h
17378: cmp word [6D15h],0064h
1737f: cmp word [6D15h],008Bh
17387: mov al,[si]
17389: mov [di],al
1738b: mov ax,[si+1]
1738e: mov [di+1],ax
17391: add di,3
17394: add si,3
```

The moving offset `[6D11]` bounces between boundaries. This is a small
table-animation engine rather than a pile of hard-coded one-shot effects.

## Palette Index Oscillators

The routine at `0x176D5` maintains five palette indices at `4D2B..4D2F`. It
chooses one of two wave tables, then walks five independent cursors through it.
Each channel has a position and direction byte:

```text
6A56/6A57 -> output 4D2B
6A58/6A59 -> output 4D2C
6A5A/6A5B -> output 4D2D
6A5C/6A5D -> output 4D2E
6A5E/6A5F -> output 4D2F
```

One channel looks like this:

```asm
177a1: mov si,[6A52h]         ; active table
177a7: mov bl,[6A56h]         ; position
177ab: add si,bx
177ad: mov al,es:[si]
177b0: mov [4D2Bh],al
177b3: add byte [4D2Bh],6Eh   ; convert table value to palette index

177b8: cmp byte [6A57h],0
177bd: jne skip_forward
177bf: add byte [6A56h],2
177c4: dec byte [6A56h]       ; net +1 or -1 depending direction
177c8: mov al,[6A54h]         ; boundary
177cb: cmp [6A56h],al
177d1: mov byte [6A57h],1     ; reverse at high edge
177d9: cmp byte [6A56h],2
177e3: mov byte [6A57h],0     ; reverse at low edge
```

The next four channels repeat the same pattern with their own state bytes. The
result is a set of palette slots that move through wave tables at different
phases. Later code uses those slots to paint or blank selected DAC entries.

## Palette Target Convergence

`0x17905` selects one of several 48-byte palette target tables. Every third
call, it nudges the live 48-byte block at `4D3A` one step toward the selected
target:

```asm
179e6: mov si,[509Eh]         ; selected target table
179ea: mov di,4D3Ah
179ed: mov cx,0030h
179f0: mov ah,[si]
179f2: mov al,[di]
179f4: cmp ah,al
179f8: ja  increment
179fc: dec byte [di]
179fe: dec byte [di+30h]      ; mirrored companion block
17a04: inc byte [di]
17a06: inc byte [di+30h]
17a0c: inc si
17a0d: inc di
17a0e: loop 179F0h
```

After 64 convergence ticks it clears the request byte at `6A7C`. This is a
classic palette lerp, but done as integer one-step convergence so the cost is
bounded and branchy rather than multiply-heavy.

`0x17A28` then copies a 48-byte sliding window from `4D3A` into `50A4`, which
is one of the data blocks emitted by the DAC updater:

```asm
17ad3: mov si,4D3Ah
17ad6: mov di,50A4h
17ad9: mov cx,0018h
17adc: add si,[509Ah]
17ae0: rep movsw
17ae9: add word [509Ah],6
17aee: sub word [509Ah],3
```

That `+6` then `-3` pattern is a compact way to move the window forward by
three bytes when the direction flag is set, or backward by three bytes when it
is clear.

## DAC Update Loop

The final palette output routine is at `0x180CB`. It waits for vertical retrace,
then conditionally blanks or writes color groups.

The first five chunks compare previous and current palette indices. If a slot
changed, the old slot is selected through `3C8h` and nine zero bytes are written
to `3C9h`, clearing three RGB entries:

```asm
180cb: mov dx,03DAh
180ce: in  al,dx
180cf: test al,08h
180d1: je  180CEh             ; wait in retrace

180d8: mov dx,03C8h
180db: mov al,[4D30h]
180de: cmp al,[4D2Bh]
180e2: je  next
180e4: out dx,al
180e5: inc dx
180e6: xor al,al
180e8: out dx,al
180e9: out dx,al
180ea: out dx,al
...
```

Then a ramp is written into DAC entries starting at `D4h` unless state `6A51`
is in a special phase:

```asm
1815c: mov bh,D4h
1815e: mov bl,01h
18160: mov dx,03C8h
18163: mov al,bh
18165: out dx,al
18166: inc dx
18167: mov al,bl
18169: out dx,al
1816a: xor al,al
1816c: out dx,al
1816d: out dx,al
1816e: inc bl
18170: cmp bl,29h
18173: jb  18167h
```

The rest of the routine writes compact RGB triplets around the animated indices
from `4D2B..4D2F`, and alternates between the `50A4` 48-byte block and the
`6A97` 78-byte block:

```asm
18213: mov es,relocated_data
18218: mov si,50A4h
1821b: mov cx,0030h
1821e: mov dx,03C8h
18221: mov al,5Dh
18223: out dx,al
18224: inc dx
18225: mov al,es:[si]
18228: out dx,al
18229: inc si
1822a: loop 18225h
```

This is the visual core behind a lot of Dragnet's look: the framebuffer is not
fully redrawn every routine. Instead, text pixels and prepared slices provide
index values, and the DAC updater changes what those indices mean.

## Sparse Screen Damage/Restore Pass

`0x17AF4` is a delayed event selector. Every 200 calls it reads a byte from a
small script at `6A60 + [6A77]`, maps values 1..11 to screen offsets, and arms
the worker at `0x17C06`:

```asm
17b02: inc byte [6A79h]
17b06: cmp byte [6A79h],0C8h
17b0e: mov byte [6A79h],0
17b13: mov byte [6A7Ah],1
17b18: mov ax,[6A77h]
17b1b: mov si,6A60h
17b20: mov al,es:[si+ax]
...
17b3f: mov ax,[6A7Fh]         ; event 1 offset
17b42: mov [6A95h],ax
17b45: mov byte [6A7Bh],1
```

The worker copies or stamps several vertically separated positions in VGA
memory. It uses the prepared data at `relocated_06EA:0307+offset` as the
restore source. For each target, it protects palette-index values in the range
`0Fh..3Dh`; outside that range it overwrites the pixel:

```asm
17c13: mov si,[6A95h]
17c17: add si,0300h
17c1e: add si,0007h
17c20: mov es,relocated_06EA
17c25: mov al,es:[si]
17c28: mov ah,es:[si+0140h]

17c2d: mov si,[6A95h]
17c31: mov es,A000h
17c36: mov bl,es:[si]
17c39: cmp bl,3Dh
17c3e: cmp bl,0Fh
17c46: mov es:[si],al
...
17c72: mov byte es:[si+03C0h],5Bh
17c8a: mov byte es:[si+0500h],5Ch
17ca2: mov byte es:[si+0640h],46h
```

The offsets `0140h`, `03C0h`, `0500h`, and `0640h` are multiples of 320 or
near-multiples of 320, so this worker is stepping down screen rows. It behaves
like sparse damage/restore plus marker placement, not like a full-frame blit.

The exact pattern is a moving five-site trail. At active offset `p`, one call
tests framebuffer bytes at `p+0`, `p+320`, `p+960`, `p+1280`, and `p+1600`.
The first two are replaced from the prepared image; the last three receive
`5Bh`, `5Ch`, and `46h`. Every tested byte in the inclusive protected range
`0Fh..3Dh` is left alone. The worker then advances `p` by `0280h`, exactly two
scanlines, so later calls repair portions of the previous marker while moving
the three-byte tail downward.

Per active call the fixed traffic is two prepared-image reads and five VGA
reads, followed by zero to five VGA writes depending on ownership. The final
call clears the active flag and closes the remaining tail with four additional
prepared reads and four unconditional VGA writes. The nine reachable unique
start positions all terminate at offset `E100h`:

| Event | Start | Screen `(x,y)` | Active calls |
| ---: | ---: | ---: | ---: |
| 1 | `6CFDh` | `(61,87)` | 47 |
| 2 | `5F74h` | `(116,76)` | 52 |
| 3 | `60D1h` | `(145,77)` | 52 |
| 4 | `6D8Dh` | `(205,87)` | 47 |
| 5 | `77C2h` | `(258,95)` | 43 |
| 7 | `3B30h` | `(112,47)` | 67 |
| 8 | `1EAAh` | `(170,24)` | 78 |
| 9 | `430Dh` | `(205,53)` | 64 |
| 10 | `3A58h` | `(216,46)` | 67 |

Offsets for events 6 and 11 exist, but the unmodified script never selects
them. After its initial event 1, the repeating nonzero order is
`5,8,9,10,7,2,3,1,8,4,1`, interleaved with zero entries. The selector advances
once per 200 scheduler iterations; its terminal `FFh` resets the index and
arms event 1 immediately. The stable script period is therefore 22 selector
steps, or 4,400 scheduler iterations.

Across that period the worker is active for 642 calls. It performs exactly
1,328 prepared-image reads and 3,210 ownership-test VGA reads, with 44..3,254
VGA writes depending on how many protected text/palette pixels it encounters.
Even the longest 78-call event finishes well before the next 200-call selector
step, proving that these are discrete trail passes with idle gaps rather than
overlapping damage queues.

## Ending Fade

The ending path at `0x18293` first clears a 64K-ish prepared buffer, then reuses
the same stripe-copy helper as the opening. After that it blacks the DAC and
copies a 0x1400-byte image block into the lower part of the screen:

```asm
182a7: mov es,relocated_06EA
182ac: mov di,0007h
182af: add di,0300h
182b3: xor ax,ax
182b6: mov cx,7D00h
182b9: rep stosw
...
183a9: mov cx,0300h
183ac: mov dx,03C8h
183af: xor al,al
183b1: out dx,al
183b2: inc dx
183b3: xor al,al
183b5: out dx,al
183b6: loop 183B5h

183bd: mov es,A000h
183c2: mov si,391Ch
183c5: mov di,6400h
183c8: mov cx,0A00h
183cb: rep movsw
```

The last visible fade loop manipulates a small table in the prepared data
segment, writes 90 DAC bytes beginning at palette index `23h`, waits on vblank,
then delays:

```asm
18422: mov es,relocated_06EA
18427: mov di,0007h
1842a: mov cx,005Ah
1842d: mov dx,03C8h
18430: mov al,23h
18432: out dx,al
18433: inc dx
18435: wait 03DAh vblank
18443: mov al,es:[di]
18446: out dx,al
18447: inc di
18448: loop 18443h
1844a: mov cx,4E20h
1844d: dec cx
1844e: jne 1844Dh
18450: jmp 183DDh
```

The loop exits when a flag byte in the same table reaches `1`, then the program
restores text mode and exits through DOS:

```asm
18485: mov ax,0003h
18488: int 10h
18490: mov ax,0C02h
18493: int 21h
18495: mov ax,4C00h
18498: int 21h
```

## What It Is Doing

Dragnet is a good example of the pre-protected-mode PC demo style where "the
demo" is a chain of cooperating real-mode programs and hand-managed buffers.
The sophistication is in the glue:

- The visible program is split between `DRAGNET.EXE` and `DRAGNET2.DAT`.
- Filenames, control blocks, and graphics data are hidden with a small word
  transform plus a custom byte-run decoder.
- The first stage uses a real Sound Blaster DSP/DMA IRQ driver instead of
  BIOS-level sound or a tiny PC speaker loop.
- The second stage shares state with the parent through a low-memory mailbox
  and a callback table.
- Most effects are table, palette, and copy-window driven. The code spends its
  time moving indices, restoring sparse screen positions, changing DAC entries,
  and copying prepared strips rather than recomputing expensive images.

That combination explains why the demo feels fancy for 1991: it is not just a
single text scroller or a raw animation player. It is a loader, sampled-audio
streamer, palette engine, control-stream text renderer, and chained executable
wrapped into one early MS-DOS production.
