Resource centre for ZX Spectrum games
using Manic Miner and Jet Set Willy game engines
Archive of the
Manic Miner & Jet Set Willy Yahoo! Group
messages
|
|
||
|
|
Message: 4398
Author: andrewbroad
Date: 20/08/2004
Subject: Manic Miner: Format of title-screen tune
Now that I've coded up the title-screen tune for _Manic Miner:
Allana Truman_, I might as well get around to writing up the tune-
format!
As documented in Richard Hallas's "A Miner Triad", the in-game tunes
for Manic Miner and Jet Set Willy, and the title-screen tune for Jet
Set Willy, are represented in a one-byte-per-note format, where the
byte represents the pitch, all notes are of equal duration, and two
notes cannot be played at the same time.
The Manic Miner title-screen tune is represented as a sequence of
triples of bytes:
* the first byte represents the duration;
* the second byte represents the pitch of the red note;
* the third byte represents the pitch of the cyan note.
The red and cyan notes have nothing to do with synaesthesia; they
are two notes played simultaneously, with the corresponding keys on
the piano coloured red and cyan.
As in the in-game tune, each pitch is represented according to
Richard Hallas's tone-chart (I have not researched the effects of
values 0 and 255).
But the two pitches must be different, otherwise no sound is heard
(this can, of course, be exploited deliberately to introduce rests).
If only one note is to be played, the standard solution is to set
the third byte to the value of the second byte plus one, e.g. 128,
129.
For the durations, select a unit duration (60 served me well for
MM:AT), and multiply it by two to produce double-length notes, and
so on.
The unit duration will determine the speed of the tune, and you have
to bear in mind that the maximum duration is 255, so if, for
example, your tune includes quadruple-length notes, you will either
have to choose a unit duration of 63 or less (63*4 = 252 but 64*4 =
256), or split long notes into two consecutive notes.
A duration of 255 terminates the tune; all bytes after that one are
ignored.
The Manic Miner title-screen tune is located at address 33902 and is
286 bytes in length: 95 byte-triples, followed by 255 at 34187 to
terminate the tune. The in-game tune follows immediately at 34188;
since this is a sequence of pitch-bytes it does not make sense to
attempt a super-long combined melody by removing the 255 unless
you're fond of random sound!
Finally, the colour-attribute:
* of the red note is held at 37614;
* of the cyan note is held at 37623;
* to erase the red note is held at 37658;
* to erase the cyan note is held at 37666.
The erasing colour-attributes are usually black INK on white PAPER,
to agree with the Manic Miner title-screen colour-attributes.
--
Dr. Andrew Broad
http://www.geocities.com/andrewbroad/
http://www.geocities.com/andrewbroad/spectrum/
http://www.geocities.com/andrewbroad/spectrum/willy/
http://www.geocities.com/andrewbroad/spectrum/willy/music.html
