Magazine Archive

Home -> Magazines -> Issues -> Articles in this issue -> View


ZonX-81 Programmable Sound Generator

Soundmaking for the Sinclair Micro with the Zon X-81.

The ZonX-81 is a programmable sound generator designed to plug directly into the back of a ZX81. It is completely self-contained, being powered from the ZX81, and having its own internal amplifier and speaker. The unit also has an extension PCB which extends the edge connector to allow a 16k ram pack or printer to be used.

A General Instruments AY-3-8912 integrated circuit is used for sound generation. This device contains 3 digital oscillators and a noise generator with programmable pitch, any combination of which can be passed through 3 sound channels with independent volume or overall envelope control.


To programme the ZonX-81, the data required to set up the desired sound is written into the internal registers of the AY-3-8912. There are 13 registers in all:

Register D0 Channel A Fine Tuning 0-255
Register D1 Channel A Coarse Tuning 0-15
Register D2 Channel B Fine Tuning 0-255
Register D3 Channel B Coarse Tuning 0-15
Register D4 Channel C Fine Tuning 0-255
Register D5 Channel C Coarse Tuning 0-15
Register D6 Period of Noise Generator 1-31
Register D7 Enable/Disable Noise and Tones
Register D8 Channel A Volume/Envelope 0-15/16
Register D9 Channel B Volume/Envelope 0-15/16
Register D10 Channel C Volume/Envelope 0-15/16
Register D11 Envelope Period Fine 0-255
Register D12 Envelope Period Coarse 0-255
Register D13 Envelope Shape

Figure 1. ZonX-81 performance program.

Sample Program

The simple program, shown in Figure 1, demonstrates some of the possibilities of the Programmable Sound Generator (PSG). It uses the numerical keys on the ZX81 to select the sounds. The selections are:

1 - Low pitched noise.
2 - High pitched noise.
3 - Single tone 'C'.
4 - Two tones 'C,E'.
5 - Three tones 'C,E,G'.
6 - Single envelope, short decay.
7 - Single envelope, long decay.
8 - Continuous slow rise and fall in amplitude.
9 - Continuous sawtooth envelope.
0 - Clear sound.

By selecting a sound source, 1-5, then the envelope type, 6-9, a wide variety of sounds can be created. You can include more of your own sounds by simply changing the data string A$.

Program Breakdown

Lines 1-9 are required to output the data to the registers of the PSG. The first line is actually in machine code which makes access to the PSG much quicker.

Lines 3-6 make up a subroutine which is used each time data (C) is written to a specific register (D). The selection is taken from the keyboard via lines 10-30. The program will jump to the data string selected via line 30.

The data string is split using the second subroutine contained in lines 40-95. This extracts the register number (D) and data (C) from the string then calls the machine code subroutine which writes into the selected registers. When this is complete the program returns to line 10 to await another key selection.

The ZonX-81 is supplied by BI-PAK (Contact Details), complete with detailed instruction booklet at £25.95 inc. VAT and p&p.

Also featuring gear in this article

Previous Article in this issue

The Transpozer

Next article in this issue

The Kit

Electronics & Music Maker - Copyright: Music Maker Publications (UK), Future Publishing.


Electronics & Music Maker - Dec 1982



Gear in this article:

Computer > Sinclair > ZX81

Feature by Kenneth McAlpine

Previous article in this issue:

> The Transpozer

Next article in this issue:

> The Kit

Help Support The Things You Love

mu:zines is the result of thousands of hours of effort, and will require many thousands more going forward to reach our goals of getting all this content online.

If you value this resource, you can support this project - it really helps!

Please Contribute to mu:zines by supplying magazines, scanning or donating funds. Thanks!

We currently are running with a balance of £100+, with total outgoings so far of £1,036.00. More details...

Small Print

Terms of usePrivacy