Seven tunes, on the PSG's three channels. They are not recorded by hand:
tools/musica.py runs the ROM's own sound engine with tools/z80run.py
-cancion (0x5A97) with each one's number, and on every frame the interrupt
(0x5753), which moves the three channels- and logs what it writes to the PSG.
Checked against openMSX: in the recorded games, the tone and volume registers match the executed engine frame by frame, each piece whole: 796, 771, 784, 771, 591, 1,252 and 184 frames, 0 different. (On channels B and C the frames where a sound effect is playing are not compared, since it takes the channel over, nor the ones after it until the next note.)
Each channel reads one byte per note: the low 5 bits are the note (1 to 30, on a
semitone scale, 0x5F28) and the high 3 its length, from a table of 1, 1, 3, 6,
12, 24, 48 and 96 frames (0x5892). Note 0 is a rest and 0x1F a command: change
key (sixteen possible starts on the scale, two semitones apart), jump somewhere
else (that is how they repeat) or end. Each note starts at volume 14, goes up
to 15 and drops one every two frames (musica_canal, 0x57A5).
The starting tune, the first one of the game, begins ten frames late: the music divider (0xE012) still holds the 10 the title put there.
| Who asks for it | Length | |
|---|---|---|
| 0 | empieza (0x40F3), when the game starts |
13.1 s |
| 1 | ronda_baja (0x4159) |
12.8 s, and starts over |
| 4 | ronda_superada (0x4223) |
13.1 s |
| 2 | ronda_sube (0x428F) |
12.8 s, and starts over |
| 3 | ronda_bonus (0x44AA), with the sign |
9.8 s |
| 5 | the bonus round (0x451C) | 20.9 s; goes back to 8.8 s |
| 6 | game_over (0x4358) |
3.1 s |
There are also two effect channels (0x589A), which play on the PSG's channels B and C and, while they play, silence the music on that channel (0x5879): the shot, the meat picked up, the popping balloons, the bouncing arrow, the broken or bouncing stone and the pig's fall (from 0x4C80 to 0x4DFF). They are not published.