A "lost" beeper engine: ZX-3
01 05 12 - 12:57A forgotten beeper routine and editor from the early 90s has recently been unearthed. The routine features 3 channels of PDM sound (similar to SpecialFX or Follin routines) with a range just short of 2 1/2 octaves. The program is very minimalistic, and the interface is written entirely in BASIC.
The author of this compact beeper routine is Ján Deák from Slovakia, better known for his 8-channel ZX-7 editor. Originally named "MSG", ZX-3 was published as a type-in in issue 6/91 of the Czechoslovakian computer magazine Elektronika.
You can download it here.
Shortcuts in the editor are as follows:
[CursorShift] -
1 Edit Step
2 Copy Block
3 Fast Forward
4 Fast Rewind
5 Next Channel / Compile / Play
6 Forward
7 Backward
8 Insert Step
0 Delete Step
Notes are entered in the format ABCD.
A is the tone, entered in lower case letters (p for pause);
B is a space or the sharp sign (#);
C is the octave (1..3, on the 3rd octave, only tones c-e are available);
D is the note length (1..8).
So to enter a 4 step long C note of the first octave, write "c 14" (mind the space after C). To enter a rest, write "p n" where n is the length in steps. Note that you must always supply the necessary pauses on inactive channels. If the player encounters an empty step it will stop.
The maximum song length is 255 steps. The note length is variable (1-8 steps), however, you must use the same note length across all 3 channels for each respective step.
The editor features a useful block copy routine, which you can access with [CursorShift]-2. Once activated, simply enter the start and end of the block, the position to copy to, and finally the number of iterations. Be careful not to exceed the 255 step limit.
You can poke [start addr]+151,16..23 for some border effects. By poking [start addr]+125,16 you can halve the song speed. Song speed can also be changed prior to running the editor, by editing the 4th position from the end in BASIC line 1460.
To save the song for use in demos etc, BREAK into the program, then GO TO 300. To restart the program without deleting the song data, GO TO 20.
The engine and song data always amount to a size of 1024 bytes. The player is 221 bytes long, followed by three 256-byte blocks of song data, located at [start addr] + 256 * [channel #]. The player normally starts at 49152. It can be relocated to any place above RAMTOP, however the start address must be a multiple of 256.
Special thanks go to Ján Deák for sending in this great find, and Slavomír Lábsky (Busysoft) for providing a scan of the original magazine article.
one comment