One tune, four times lower than its note table
The whole score is a tracker: a note table, a pattern bank and an order list, run off the timer interrupt. Read wrongly, it gives 176 events of gibberish in a register only a dog would enjoy; read correctly, 64 seconds in G sharp minor.
There is nothing to listen to on this page. The composition is Nick Scarim's, from 1987, so no audio or MIDI of it is published here, only how it is stored and played. Addresses are in the VGA executable unless the EGA one is named.
The note table, and the trap in it
The note table is at 0x0E4C8 in the VGA executable and
0x0CA78 in the EGA one: thirty-six little-endian words of 8253 timer
divisors. The trap is that the player, at 0x14932, multiplies every
entry by four before any note is played:
1493c: mov cx,0x24 ; 36 entries
1493f: lea bx,ds:0xe4c8
14943: mov ax,[bx]
14945: shl ax,1
14947: shl ax,1 ; x4
14949: mov [bx],ax
Miss that and the tune comes out between 1695 Hz and 12693 Hz, a whistle. Scaled, it sits between 424 Hz and 1259 Hz, a normal register. A Tandy halves the table instead, so the same music plays a fourth lower on that machine.
The shape of it
- Tempo is the word just before the note table, a constant 9
that nothing writes to. A sub-step lasts
tempo + 1ticks of the 60 Hz timer: 166.66 ms, six a second. - The pattern bank, at
0x0E558, holds 22 patterns of 8 events, two bytes each: a note index and a gate length in sub-steps. - Three order lists, at
0x0E6B8,0x0E71Aand0x0E77C, hold 48 pattern numbers each and end in0xFFFF.
A note byte of 0xFF does not mean rest. It means
"nothing new here", and the gate counter from the last real note keeps running.
The speaker goes off when that counter reaches zero, unless a new note pre-empts
it first. That pre-emption is the entire articulation model and gives the tune its
rhythm.
Three order lists are not three voices
An earlier reading here wrongly took them for three voices. They are arrangements
for two different sound chips, chosen at 0x14973 from a byte set at
startup by a probe that scans the BIOS for the string Tandy.
On an ordinary PC the game plays the third list on the speaker,
one note at a time. The first two drive a Tandy's two channels, and on that path
the third is loaded and immediately discarded. The instruction that settles it is
at 0x149B5:
149af: mov si,ds:0xe4c2 ; song position
149b3: shl si,1
149b5: mov si,[si-0x1884] ; ds:0xE77C, a PATTERN NUMBER
149ca: shl si,1 / shl si,1 / shl si,1
149d0: add si,cs:0x5eb2 ; + sub-step 0..7
149d7: mov bl,[si-0x1aa8] ; ds:0xE558, the pattern bank
The value from the list is shifted left three times to index the bank, so it is a
pattern number, not a note. Every entry in all three lists is between 0 and 21,
and exactly 22 patterns fit between 0x0E558 and 0x0E6B8,
which leaves the format no other reading.
What the tune is
The form is A B C, A B C, coda. Twelve of the twenty-two patterns are used; the other ten are dead data that appear in no order list. Reading the bank straight through, instead of through the order list, gives the 176 events of nonsense that an earlier version of this write-up described.
The title theme, and nothing else
There is no in-game music at all. The player runs once per timer
tick, gated by ds:0x1680. The attract loop sets that flag at
0xED62, and it is cleared the moment a game starts. The cave-complete
jingle, at 0xEE0C, is the same tune started at order position 44,
the last four bars of its own coda.
Only one tune
The proof is a sweep of the whole image for any run of twelve or more words falling a semitone at a time. It finds exactly one note table, and only five instructions reference it, all inside this player. The 792 bytes from the table onwards, tempo included, are identical in the EGA and VGA releases, and both generate identical MIDI.
The sound effects are a different driver
The effects driver runs from 0x133A5 to 0x13535. It takes
eight one-bit requests in a single byte, ds:0x2262, runs on every timer
tick, 60 times a second, and writes a divisor straight to timer port
42h. Most divisors are fixed. The treasure and boulder sounds pick one
of two with a draw from the game's random generator, the footstep alternates
between two, and the low-time alarm under ten seconds uses (seconds << 4)
+ 0x200 (0x13167), so its pitch rises as the clock runs down. The
highest priority wins and only one sound is audible at a time, but the two holding
tones speak only on every eighth tick and let lower requests through in between. Nothing is digitised: it is a square
wave like everything else, and it never touches the note table.
The faithful build plays them the same way, one square wave at a time at the divisor the game wrote. Since 16 September 2026 VIP has had its own: eight procedural one-shots synthesised in the browser, with no generative model. The VIP page explains why.
What the extraction gives you
Because the composition is a tracker, it comes out as data: 22 patterns, an order list, a note table and a tempo. That lets the tune be re-rendered at any quality without touching a recording of the original, which most attempts that start from audio cannot do.
What is published, and what the builds play
A MIDI of Nick Scarim's 1987 composition is still his composition in a different container, so it is not published. This page publishes the description of the format, which is not his.
The two builds served at /play/ do carry the tune. The faithful build plays it from this tracker data on a square wave. VIP plays "Dance Floor Game", a remix generated on Suno from the original tune, which keeps his melody and credits him for it. No permission has been obtained for either, and no licence is claimed. The VIP page and the attribution page set out the position.