Analysis model: gpt-5.5 xhigh
Just by Legend Design - Technical Dissection
Scope
Just is the Legend Design MS-DOS demo that placed second in the Wired 1995
demo competition, between Valhalla's Solstice and Purge's Phenotype.
Release year: 1995. The archive timestamps and documentation identify the final build as a December 1995 Legend Design production.
Public references:
The Wired 1995 result file lists:
Demos Competition
1. Valhalla "Solstice" 590 pts
2. Legend Design "Just" 304 pts
3. Purge "Phenotype" 286 pts
This writeup uses archive inspection, PMODE/W PMW1 flattening, static 386 disassembly, string/resource mapping, and data-flow checks against the shipped files. It is not a source-level reconstruction. Internal names below are descriptive labels inferred from code shape, constants, resource names, and call sites.
Release Context
The shipped documentation identifies JUST as a final version by Legend
Design. It asks for a 486 for full speed, says it can run on a 386 more slowly,
recommends a Gravis UltraSound, and lists fallback support for Sound Blaster,
PAS, WSS, and no-sound configurations through DSIK.
Credits from the documentation:
- Coding: Pit Bull.
- Pictures: Sky and Dawnrazor.
- Art: Dawnrazor, Sky, Pit Bull, Alpha, Brian, and Steam.
- Music: Necros.
- GUS jingle: Steam.
- JUST ANSI: Sma^One.
- PBP Demo-Game-System V1.0: Thomas Molitor / Pit Bull / Legend Design.
- DOS extender: PMODE/W 1.21 by Daredevil and Tran.
- Sound system: DSIK by Carlos Hasan.
The documentation also contains personal greeting/contact material. That is intentionally not reproduced here.
Examined Files
Archive:
a225d434efcd69fc91b22ba2e9ba822f83fd64a444fc1c19163479d758a5fbb5 ld_just.zip
Extracted files:
b3d484fb6b502577bacaab8269db8d8a9dab676e70317889855b8deabc60bcc9 FILE_ID.DIZ
d31959480e778e1345ddde857048382e58f94c006791cbb37694c96ded09b382 JUST.DOC
1b1d70f52096b0e067ca7ff5d57aa4aeb1c80a59b7ae848b1c939a8c02c31b6f JUST.EXE
File roles:
JUST.EXE MS-DOS MZ executable with PMODE/W PMW1 protected-mode payload
JUST.DOC Runtime notes, switches, requirements, and credits
FILE_ID.DIZ compact release description
JUST.EXE is large for an EXE-only demo:
JUST.EXE 1,436,806 bytes
flattened PMW1 333,136 bytes
Most of the visible artwork, textures, tables, music, and group-logo resources
are packed inside the executable or in its internal archive. There are no
separate .S3M, .TEX, .PTX, or .MCL files in the release directory.
Executable Shape
The file begins as a normal MZ program that enters PMODE/W:
MZ image size: 9808 bytes
header paragraphs: 4
relocations: 0
initial CS:IP: 0000:0059
initial SS:SP: 0344:0100
PMW1 marker offset: 0x2650
The real-mode stub contains:
PMODE/W v1.21 DOS extender - Copyright 1995, Daredevil and Tran.
The PMW1 object table has two packed objects:
entry object 1 offset 0x12748 -> flat entry 0x00020748
stack object 2 offset 0x1e550 -> flat stack 0x00051550
object 1: virtual 0x024eea, actual 0x00f5ae, flags 0x2045
object 2: virtual 0x01e550, actual 0x0014ec, flags 0x2043
Flattened layout used for disassembly:
object 1 base 0x0000e000 end 0x00032eea
object 2 base 0x00033000 end 0x00051550
The visible PMW1 entry at 0x20748 jumps into WATCOM C/C++32 startup. The
string at that location begins with WATCOM runtime text, so the PMW1 entry is
not the demo loop. The main application work appears later, with setup and
resource loading around 0x19500 and the effect sequence starting around
0x1a5f9.
Command Line And Runtime Setup
The documentation lists these runtime switches:
-? show help
-S# sound card type
-P### sound card port in hex
-I# IRQ
-D# DMA
-M disable GUS memory detection
-W save embedded music to disk
-L loop demo
-V disable special VGA mode
The relevant embedded strings appear in the flattened image near 0x3f606:
JUST - WIRED '95 contribution by Legend Design oOo FINAL VERSION oOo
Saving musicfile oOo Gateway by Necros oOo to JUST.S3M...
Saving musicfile oOo GUS-Jingle by Steam oOo to G-JINGLE.S3M...
Initiating PBP Demosystem V1.00 ...
Special VGA mode OFF.
Preparing, please wait...
That maps directly to the high-level boot order:
- Parse switches and sound-card environment.
- Initialize keyboard handling.
- Initialize DSIK and load/start the embedded S3M material.
- Initialize the PBP filesystem/resource layer.
- Allocate work buffers.
- Load texture, picture, palette, and logo resources by name.
- Switch into the special VGA mode unless disabled.
- Run the scripted effect sequence.
The keyboard path is installed as an IRQ 1 handler at 0x1d980. It reads port
0x60, stores the scan code, and handles:
- Escape: set the exit flag.
-: reduce music volume in steps of 4.+: increase music volume in steps of 4.M: toggle between the current volume and a reduced/muted value.
The handler writes EOI to PIC port 0x20 before returning with iret.
Resource Map
The executable holds a dense list of resource names beginning near 0x3fe2e.
The loader calls around 0x19837..0x1a556 pass these names to the PBP
filesystem helper. Many calls request allocation by passing a null destination;
some load into fixed work areas.
Important visual resource groups:
gussel.tex / gussel.ptx
xmap.tex / ymap.tex / txmap.tex / tymap.tex
fab.tex / fab.ptx
Med.tex / Med.ptx
kalei.tex / kalei.ptx
trans*.tex / trans*.ptx
bump*.tex / bump*.ptx
spot.tex / spot.ptx
greet.tex / greet.ptx
jart.tex / jart.ptx
fancy.tex / fancy.ptx
ldlogo.tex / ldlogo.ptx
just.tex / just.ptx
pres.tex / pres.ptx
hape.tex / hape.ptx
spgfx.red / spgfx.gre / spgfx.blu
splup.tab / sc2sp.tab
The .mcl group is a list of demoscene group/logo names used by the greeting
or logo sequence:
complex.mcl, nooon.mcl, imp.mcl, kfmf.mcl, camorra.mcl, emf.mcl,
klf.mcl, dust.mcl, iguana.mcl, ice.mcl, val.mcl, deus.mcl,
xgy.mcl, masque.mcl, tet.mcl, s!p.mcl, sahara.mcl, orange.mcl,
impact.mcl, infiny.mcl, acme.mcl, enigma.mcl, blank.mcl, tc.mcl,
psq.mcl, @.mcl, sub.mcl, quod.mcl, erat.mcl, demon.mcl, flare.mcl,
flare01.mcl, spback.mcl, planebck.mcl
The credits resources are also internal:
warrior.tex, war00.ptx, credit.ptx, code.tex, music.tex, art.tex,
pitbull.tex, steam.tex, dawnrazo.tex, necros.tex, sky.tex, alpha.tex,
brian.tex
The code uses a small repeated pattern for loading many of these files:
mov ebx,0x200 ; loader mode/flags
xor edx,edx ; allocate destination
mov eax,name_pointer
call 0x1f3a4 ; load by resource name
mov [global_slot],eax ; keep returned pointer
test eax,eax
jne ok
call fatal_exit
For fixed tables, EDX is set to a known destination instead:
mov ebx,0x200
mov edx,0x332fc ; fixed x-map style table
mov eax,0x3fe48 ; resource name
call 0x1f3a4
That means the engine has two resource classes: heap-backed pictures/textures and fixed lookup tables placed at addresses expected by the handwritten effect code.
VGA Mode Setup
The special VGA path is concentrated around 0x1b23c. The helper starts from
BIOS mode 13h, then reprograms sequencer and CRTC registers to make a tweaked
planar 320-wide mode:
cmp ax,0x0d
jg fail
mov [0x1b216],ax ; mode-table index
mov [0x1b218],cx ; logical width, often 0x140
mov ax,0x13
int 0x10
mov dx,0x03c4
mov ax,0x0604
out dx,ax ; memory mode: disable chain-4 style addressing
mov ax,0x0100
out dx,ax ; synchronous reset while changing mode registers
...
mov dx,0x03d4
mov al,0x11
out dx,al
inc dx
in al,dx
and al,0x7f
out dx,al ; unlock CRTC register writes
dec dx
Then it walks a packed CRTC table:
lodsb ; count
mov cl,al
loop:
lodsw
out dx,ax ; CRTC index in AL, value in AH
dec cx
jne loop
The mode width is applied through CRTC offset register 0x13:
mov cx,[0x1b218]
shr cx,2
mov [0x1b214],cx
shr cx,1
mov dx,0x03d4
mov al,0x13
mov ah,cl
out dx,ax
The wrapper at 0x1b30d calls this with:
ax = 5
cx = 0x140
call 0x1b23c
So the logical line width is 320 bytes. Because the VGA is unchained, writes
to A000:offset can address one plane at a time through sequencer map-mask
register 0x02.
If the user passes -V, the demo avoids this special path and uses the safer
fallback. The documentation frames this as a monitor/VGA compatibility switch.
Planar Upload Helper
The fundamental chunky-to-planar upload routine starts at 0x1b409. It expects:
ESI = linear chunky source
EDI = VGA destination
ECX = byte count
It divides the count by four, then writes four VGA planes one at a time:
shr ecx,2
save count/source/dest
dx = 0x03c4
ax = 0x0102
out dx,ax
for i in 0..count-1:
al = [esi + 0]
[edi++] = al
esi += 4
ax = 0x0202
out dx,ax
esi = source + 1
edi = dest
repeat
ax = 0x0402
out dx,ax
esi = source + 2
repeat
ax = 0x0802
out dx,ax
esi = source + 3
repeat
This is the standard cost tradeoff for unchained VGA: each pass copies one quarter of the source bytes, but it touches VGA memory linearly. The source is ordinary chunky memory, and the VGA plane mask selects which byte lane receives the data.
The clear helper at 0x1b4ae is the same idea in reverse: select all planes
with ax = 0x0f02, then clear 0x3e80 dwords at A000:0000.
Palette Fades
Palette upload/fade helpers are also direct port code. 0x1b323 fades from
black by repeatedly rewriting the DAC:
brightness = 0
repeat:
wait_vblank_if_enabled()
dx = 0x03c8
al = 0
out dx,al
dx++
ecx = 0x300
while ecx:
al = [esi++]
al -= brightness
if borrow: al = 0
out dx,al
brightness++
until brightness > limit
0x1b3a0 is the reverse fade. It starts at a stored high brightness and
decrements until the unsigned byte wraps:
brightness = [0x1b39f]
repeat:
wait_vblank_if_enabled()
write each palette byte minus brightness, clamped at 0
brightness--
until brightness == 0xff
Several title/card transitions combine:
- Blank or white DAC.
- Planar image upload through
0x1b409. - Palette fade in/out through
0x1b323or0x1b3a0. - A delay based on music/frame counters at
0x3dc6cor0x3dc6e.
That is why many still-picture parts look simple at a high level but are actually very VGA-specific: the image pixels and the palette transition are separate operations.
Page Flipping
Several effect kernels end by toggling CRTC start address high byte register
0x0c:
cmp dword [0xe010],0x000a8000
je show_a000
mov dword [0xe010],0x000a8000
mov dx,0x03d4
mov ax,0x000c
out dx,ax
jmp done
show_a000:
mov dword [0xe010],0x000a0000
mov dx,0x03d4
mov ax,0x800c
out dx,ax
The code treats 0xe010 as the destination page pointer and alternates between
A000:0000 and A800:0000. That gives it a front/back page pair in VGA
memory. The CRTC register value selects which 32 KB region appears at the top
of the display.
The inner copy loops add 0x140 between vertical bands. That is the 320-byte
logical line width from the mode setup. Many effect buffers are built as three
plane-colored rows at offsets +0, +0xa0, and +0x140, which corresponds
to 160-byte spans separated by half a logical screen line.
Main Sequence
After setup and resource loading, the main body around 0x1a5f9 runs named
chapters by installing resource pointers into shared globals, setting a few
effect parameters, and calling effect routines:
call 0x1b541 ; picture/palette prelude
if not exiting: call 0xe0d4
[0x33019] = [0x40e68]
[0x3301d] = [0x40e88]
[0x3dc5c] = 0x54
[0x3dc57] = 0x04
if not exiting: call 0xe90e
[0x33019] = [0x40e74]
[0x3301d] = [0x40e64]
if not exiting: call 0xe15e
[0x33019] = [0x40e60]
[0x3301d] = [0x40e58]
if not exiting: call 0xedce
...
call 0xf4bc
call 0xf94d
call 0x10b00
call 0xfff9
call 0x1b8c2
call 0xf15a
call 0x104c5
call 0x1dcf8
This is not a high-level scene graph. It is a scripted sequence of specialized
kernels. The globals 0x33019 and 0x3301d are repeatedly assigned to texture
or map resources, and small byte variables in the 0x3dc50..0x3dc90 range act
as effect parameters, frame counters, scroll offsets, and exit flags.
Texture/Map Kernel At 0xe15e
The low-address block beginning at 0xe15e is representative of the demo's
handwritten visual code. It clears a work buffer, waits for a frame tick, then
renders from two fixed tables into a 320-wide buffer.
Setup:
edi = [0x33021]
ecx = 0x4000
eax = 0
rep stosd ; clear 64 KB work page
wait until [0xe148] changes
esi = 0x332fc ; x/source map
edi = 0x3861c ; y/source map
ebp = [0x33026] ; destination chunky page
edx = [0x33021] ; texture/page table
[0xe15a] = 0x190 ; destination row advance
[0xe152] = 0x50 ; y-map row advance
[0xe156] = 0x50 ; x-map row advance
[0xe14a] = 0x50 ; inner width
[0xe14e] = 0x42 ; row count
The inner loop:
for row in 0..0x41:
for x in 0..0x4f:
bl = [esi] ; x coordinate/index
bl += [0xe148] ; animated phase
bh = [edi] ; y coordinate/index
al = bh
bl += [0x3d9e6 + al] ; per-y wobble table
al = [edx + ebx]
if al != 0:
[ebp + 0x000] = ([ebp + 0x000] + al) >> 1
al = [edx + ebx + 0x100]
if al != 0:
[ebp + 0x0a0] = ([ebp + 0x0a0] + al) >> 1
al = [edx + ebx + 0x200]
if al != 0:
[ebp + 0x140] = ([ebp + 0x140] + al) >> 1
esi++
edi++
ebp++
There are three notable details:
BLis the low byte of the source address andBHparticipates in the high byte. The address intoEDXis effectively a 256x256 texture coordinate.- The table at
0x3d9e6bends the x coordinate as a function of y. - Three samples at
+0,+0x100, and+0x200are written to three staggered rows in the destination. That creates a color-separated or banded triple-scanline contribution.
After building the chunky work area, the routine mirrors edge strips by copying rows backward and forward, then uploads to VGA planes with two map masks:
dx = 0x03c4
ax = 0x0302 ; planes 0 and 1
out dx,ax
copy 0x50 bytes per band from [0x33026] to current VGA page
ax = 0x0c02 ; planes 2 and 3
out dx,ax
copy the adjacent byte stream
Inside each copy, source pixels are decremented with unsigned wrap correction:
al = [esi]
al -= 1
al += carry ; keeps zero at zero, reduces nonzero values by one
[esi] = al
[edi] = al + palette_base
The palette bases are 0x40, 0x80, and 0xc0 for the three bands. So the
work buffer decays as it is copied, while each band is forced into a different
palette quadrant.
Finally the CRTC start-address toggle flips pages, [0x3dbf0] is incremented,
and the loop repeats until the part exit flag or global abort flag is set.
Variant Kernel At 0xf94d
The kernel at 0xf94d is a larger variation of the same idea. It clears three
work pages, sets:
[0x3dbe8] = 0x04b0 ; VGA/display offset
[0x3dbec] = 0x0960 ; source offset
[0x3dbe4] = 0x007b ; row count
Then it renders an 0xa0 x 0x7b region twice:
- First pass reads
0x3361cand0x3893c, adds animated phase, y-wobble table0x3d9e6, and a byte parameter at0x3dc65. - Second pass reads the same maps but uses
0x40e80as source page, subtracts table0x3dae5, and uses0x3dc64/0x3dc66as motion parameters.
Both passes use the same average-and-decay pixel rule:
if sample != 0:
dest = (dest + sample) >> 1
Then the VGA copy path writes:
map mask 0x03 -> planes 0 and 1
map mask 0x0c -> planes 2 and 3
with 80 visible bytes per band and 320-byte line advances. The work buffer is again decayed during presentation.
In plain terms, this is a texture/map feedback effect. The tables provide two animated lookup fields, the work page holds the accumulated previous frame, and the copy stage both displays and ages the buffer. The result is not a simple one-frame texture mapper; it is a feedback mapper whose trail is part of the effect.
Additive Overlay Kernel At 0x106a2
The helper at 0x106a2 skips the texture-map build and combines two already
prepared pages into VGA:
call 0x10301
select planes 0 and 1
esi = [0x33026] + [0x3dbec]
ebp = [0x40df0] + [0x3dbec]
edi = [0xe010] + [0x3dbe8]
rows = [0x3dbe4]
for each row:
for 0x50 bytes:
al = [esi] + [ebp]
if al > 0x3f: al = 0x3f
[edi] = al + 0x40
repeat for +0xa0 and +0x140 with palette bases 0x80 and 0xc0
Then it repeats with planes 2 and 3 by starting from the adjacent source byte.
This is a saturated additive compositor. The clamp at 0x3f makes sense
because each palette quadrant has 64 colors.
The routine at 0x1dcf8 uses this path after a radial table fill:
call 0x104b1
ecx = [0x3dc8c]
ebx = [0x3dc88]
edx = [0x3dc84]
eax = [0x3dc80]
call 0x1db18
call 0x106a2
loop until exit
Radial Table Builder At 0x1db18
0x1db18 is one of the few visual routines that uses the x87 FPU directly.
The setup stores caller parameters, computes half-width/height style values
from globals at 0x1db00 and 0x1db04, then walks a square region centered
around the origin.
The core math:
eax = radius * radius - x * x
fild dword [eax]
fsqrt
fmul qword [0x1db08]
call 0x2045c
fistp dword [temporary]
if temporary == 0: temporary = 1
Then it uses integer divisions and table lookups to select pixels from
resources at 0x3301d, 0x33021, and 0x40e24. The pattern is sphere-like:
compute a radial cross-section with sqrt(r^2 - x^2), derive source offsets,
and write mapped bytes into the work page that the additive compositor later
displays.
The pairing with 0x106a2 explains why this part can look like a glowing
radial or lens effect: one routine generates/warps the source field, the next
adds it into the visible three-band palette layout.
Credit/Logo State Builder At 0x10b00
0x10b00 initializes a table of repeated sprite/text entries. It runs many
near-identical blocks that fill arrays in the 0xfd88..0xffb6 range:
[entry_pointer[i]] = [0x33026] + 0x295e + random_row * 0x1e0 + random_x
[entry_resource[i]] = loaded_resource_pointer
[entry_dx1[i]] = 1
[entry_dx2[i]] = 1
[entry_color_or_width[i]] = constant
[entry_height_or_phase[i]] = constant
[entry_y_offset[i]] = running_offset
[entry_flag[i]] = 0
running_offset -= 0x14
The random helper at 0x1dd3d is the classic linear congruential generator:
state = state * 0x41c64e6d + 0x3039
return (state >> 16) & 0x7fff
The state builder chooses initial positions from the 320-ish by 370-ish ranges:
random % 0x170 -> multiplied by 0x1e0
random % 0x148 -> added as x offset
The loaded credit textures supply the visual material. The effect logic is therefore data driven: the setup chooses which text/art resource each entry uses, but the per-frame path can treat all entries uniformly.
DSIK / S3M Player
The DSIK string block is visible in the flat image:
Digital Sound Interface Kit (DSIK) Version 2.0.5 Copyright (C) 1993,94,95 Carlos Hasan
Sound Blaster
Sound Blaster 2.01
Sound Blaster Pro
Sound Blaster 16/16ASP
Windows Sound System
Gravis UltraSound
The player state table starts at 0x3dec0. Each channel slot is 0x30 bytes,
and the channel count lives at 0x3e4c0.
Clear Channel State
0x1f80f clears all channel slots:
edi = 0x3dec0
ecx = byte [0x3e4c0] * 0x30
al = 0
rep stosb
Start Module
0x1f82d initializes playback from a module pointer in ESI:
[0x3e4d2] = esi ; module base
[0x3e4c0] = word [esi+0x2a] ; channel count, low byte used
[0x3e4c2] = word [esi+0x20] ; order/song position
[0x3e4c4] = word [esi+0x22] ; restart/order marker
[0x3e4c3] = word [esi+0x24] ; order count/end
[0x3e4c8] = byte [esi+0x2e] ; speed/tick reload
[0x3e4ca] = byte [esi+0x2f] ; tempo driver value
[0x3e4c5] = 0
[0x3e4c6] = 0
[0x3e4c9] = 0
[0x3e4cb] = 0
[0x3e4c7] = 2
call clear_channels
Then it initializes every DSIK channel:
edi = 0x3dec0
for bl in 0 .. channel_count-1:
al = 0x14
dh = [module + 0x30 + bl]
[edi+3] = dh
call 0x297ce
edi += 0x30
Finally it installs the tick callback and starts playback:
edx = 0x1f95b
call 0x297bc ; install callback
dl = [0x3e4ca]
call 0x297c2 ; set tempo/rate
[0x3e4cc] = 1 ; playing
Tick Callback
0x1f95b is the main music tick. If playback is paused, it returns. Otherwise
it decrements the tick countdown:
dec byte [0x3e4c9]
if still positive:
for each channel:
call 0x1fbcb ; per-tick effect update
call 0x1fa8e ; emit state to DSIK
return
When the row delay expires, it reloads [0x3e4c9] from [0x3e4c8], advances
row/order state, fetches a pattern pointer from the module, skips rows when
needed, decodes the current row, resolves instrument/sample data, and emits
every channel:
for each channel:
keep high busy flag in [slot+9]
clear effect word [slot+4]
while row event decoder has commands:
call 0x1fac8
for each channel:
call 0x1fb2c
call 0x1fa8e
Row Event Decoder
0x1fac8 decodes packed row events. The command byte selects a channel with
its low nibble and says which fields follow with high bits:
al = [esi++]
if al == 0:
carry = 1
return
slot = dword [0x3e4da + (al & 0x0f) * 4]
flags = 0
if al & 0x80:
note = [esi++]
if note <= 0x60:
[slot+0] = note
flags |= 0x02
if al & 0x40:
instrument = [esi++]
if instrument != 0:
[slot+1] = instrument
flags |= 0x01
if al & 0x20:
volume = [esi++]
if volume <= 0x40:
[slot+2] = volume
flags |= 0x08
if al & 0x10:
effect = word [esi]
esi += 2
if low_byte(effect) <= 0x0f:
[slot+4] = effect
[slot+9] |= flags
carry = 0
return
This is compact S3M-like row storage: a byte says channel and presence bits, then only the present fields are stored.
Sample / Note Resolution
0x1fb2c turns row fields into driver-ready channel state:
if slot flags include instrument:
instrument_index = [slot+1] - 1
if index is valid:
sample = module.sample_pointer_table[index]
[slot+0x10] = sample
[slot+0x06] = word [sample+0x20]
if no explicit volume:
[slot+0x02] = [sample+0x0f]
[slot+0x0b] = [sample+0x0f]
mark volume changed
if slot flags include volume:
[slot+0x0b] = [slot+0x02]
if note should restart/update:
al = [slot+0]
call 0x1f7da
[slot+0x14] = eax
[slot+0x0c] = eax
reset small effect counters
The period/rate helper at 0x1f7da indexes a note table at 0x3e55a, scales
by 0x20ab, divides by the sample period at [sample+0x06], and clamps:
eax = dword [0x3e55a + note * 4]
ecx = word [sample+0x06]
if ecx != 0:
eax = eax * 0x20ab / ecx
if eax < 0x1c: eax = 0x1c
if eax > 0x1ac0: eax = 0x1ac0
Emit Channel
0x1fa8e is the driver emit path:
al = xchg [slot+9],0
if al & 0x80:
[slot+9] |= 0x80
return
if al == 0:
return
if al & 0x08:
edx = byte [slot+0x0b]
edx *= dword [0x3deb8]
dl = dh ; scaled volume
dh = [slot+0x03] ; DSIK channel/device id
ecx = [slot+0x0c] ; period/rate
edi = [slot+0x1c]
esi = [slot+0x10] ; sample pointer
call 0x297ce
The high-bit guard on [slot+9] is a tiny concurrency lock between the tick
path and the driver state. If the slot is busy, it restores the busy bit and
does not emit half-updated channel data.
What The Demo Is Doing Technically
Just is a PMODE/W demo wrapped around a compact, reusable PBP runtime. The
runtime gives it:
- A protected-mode WATCOM environment.
- An internal archive/file layer.
- DSIK sound-card abstraction and S3M playback.
- Keyboard and timer services.
- A tweaked unchained VGA mode.
The visual identity comes from handwritten kernels layered on top of that runtime. The key trick is not a single renderer; it is the repeated use of:
- Fixed lookup maps loaded from
.tex/.ptxresources. - 256x256 style source addressing through
BL/BH. - Three staggered bands in work memory at
+0,+0xa0,+0x140. - 64-color palette quadrants with bases
0x40,0x80, and0xc0. - Feedback by averaging new samples into the old work page.
- Decay during presentation.
- Planar VGA uploads with map masks
0x03and0x0c. - CRTC page flipping between
A000andA800.
That makes the demo feel more sophisticated than a list of independent still effects. Several parts are variations on the same engine idea: move through lookup maps, fold texture bytes into a persistent buffer, color-band them, and let the VGA page machinery present the result at frame cadence.