Michael Batty's ZX Spectrum beeper music engine
Original Z80 code by Michael Batty, 1990
Reverse-engineered by Oleg Origin, 2012
1tracker version by Shiru, 2013


The engine was written by Michael Batty and used in his great ZX 
Spectrum game Earth Shaker. This is probably the only game that uses it. 

The engine has very distinctive sound. It provides two channels of tone, 
without a rest note, so both channels always active. Notes mixed in a 
special way that produces harmonics with intermodulations, so not all 
note combinations will work well. It is somewhat similar to the 
overdriven electric guitar in this regard. The engine also provides two 
simple drum sounds generated by the Sinclair Basic ROM routine, mere 
short blips. It has per-row speed support. 

1tracker version has a heavily modified song data parsing code, but the 
original sound generation loop kept intact, so the sound is exactly the 
same. Song format also has been changed to use three bytes per row 
instead of four, for more efficient memory use. 


The columns are:

Spd T1  T2  D
... ... ... .
    | | | |
	ch1 ch2
	
Spd : Speed, 1..255

T1,T2 : Tone channels
 Tn : Note, F-1..F-7
 
 D : Drum, 1..2
