www.jupiter-ace.co.uk
 
News, Reviews and Letters Index > EME AY-3-8910 Sound board Review.
Radio & Electronics World January 1984 page 74
'Ding Ding': next stop on the Expansion Bus is the Jupiter Ace SOUNDBOARD from Essex Micro Electronics. 'Sounds' like a good idea. Roland Perry finds out what we have 'hear'.
Most personal computers have some sort of sound output built in, and many have a small loudspeaker as well. To have more than a puny 'beep' or more than a single voice, however, usually requires some help from a dedicated sound generation chip. Custom designed devices are used in some personal computers, but the easiest route is to use one of the readily available general purpose programmable sound generator chips. In the case in point, Essex Micro Electronics have chosen the same chip to expand the range of sounds available from the Jupiter Ace as is used in, amongst others, the ORIC and COLOUR GENIE. This is no less than the AY-3-8910 from General Instrument.
The AY-3-8910 was originally designed for use with the CP1600 microprocessor which has a multiplexed data and address bus. In practice this origin is not a problem, and interfaces to such well-known 8-bit micros as the Z80 merely require two distinct I/O operations to send each byte of information to the sound generator. A much more comprehensive study of the chip, and how to create 'interesting' noises will be published in R & EW
next month; for now we need to know just the general principles.
The sound generator is intended to be used on a system, such as a video game, where the processor has many other tasks to perform and the overhead of making music would thus be too great a burden. Once the commands have been latched into the various registers within the AY-3-8910, it will continue to produce the sound without any further intervention from the host microprocessor. Ten registers are required to specify the sound which comes out (see Figure 1): some of these are 8-bit registers while others are 16-bit, giving a total of fourteen 8-bit locations to program. In practice, many are only active on the lower order bits and the higher order bits are ignored.
Principles
First, let's look at the generation of tones and white noise. Three different notes can be specified, obtained by dividing the clock by a 'magic' number to get the frequency of the output. These magic numbers, which are set into the first six, registers, are effectively values for the period of each tone: they are 12-bit numbers divided between
coarse and fine tune registers. More about the mathematics next month: for now, we offer a program, published below, which shows how to calculate the values (in HEX) for a specific clock frequency. Seven or eight octaves of, notes in the standard musical scale can reasonably be expected from typical clock frequencies. The noise period is derived in the same way, but an internal divide by 16 means you effectively start with a lower clock frequency.
Now that the tone and noise are under way, the user has complete control over how the three tones and noise are switched through to the 'volume control' of each channel. This is achieved via the enable register. Note that although there are three different tones, the 'same' noise is sent to all channels which have noise enabled. The three-channel volume control allows either a fixed amplitude specified by a number in the range 0-15 from each of the three mixed tone and noise sources, or automatic envelope control of each mixture. The envelope control is envoked by setting an amplitude in the range 16-31 (i.e. the 'M' bit is on) although volume control bits 'LO' to 'L3' are ignored in this configuration.
All channels with envelope control selected obey the same envelope period and shape. The period is, yet again, derived from the clock frequency by division - this time after a x256 prescaler. The longest period normally available will be a few seconds; the shortest, fractions of a millisecond. The envelope shape is defined by a combination of four bits which control such matters as the slope direction and repeat enabling. For now it is sufficient to demonstrate the envelope generator outputs given by particular set-up values (see Figure 2). The most useful of these in practice is the single decaying note at the top of the chart.
Results
Any single register or combination of registers can be changed to alter the quality of the final output and it is common practice to publish 'recipes' of well-known effects. The Essex Micro Electronics SOUNDBOARD manual has suggested recipies for a wolf-whistle, a trimphone and a train, along with register values for other effects such as a piano. Their wolf-whistle sweeps a little slowly, but the trimphone and train are excellent. The recipies published by General Instrument are couched in terms of clock frequencies, register values and milliseconds: the SOUND-BOARD recipies use various routines in FORTH to do the hard work of calculating and setting up the and setting up the period registers, as
Radio & Electronics World January 1984 page 75
Fig 1: AY-3-8910 Register Layout               Fig 2 Envelope profiles
 

100 REM COMPUTE A TABLE FOR AY-3-8912 NOTES
110 REM 23/10/83
120 REM
130 FCLOCKE=1E+06
140 PRINT "Equal tempered chromatic scale 
    (Fclock=";USING "#######";FCLOCK#;
150 PRINT "Hz)":PRINT
160 WIDTH 80
170 PRINT "NOTE  OCTAVE  IDEAL  ACTUAL  DIVIDE"
180 PRINT "----  ------  -----  ------  ------"
190 PRINT
200 NOTE$="C C#D D#E F F#G G#A A#B"
210 FOR OCTAVE=1 TO 8
220 FOR NOTE= 1 TO 12
230 TWOPOWER#=((OCTAVE*12+NOTE-22)/12)
240 FT#=55#*2^TVVOPOWER#
250 TP10=INT((FCLOCK# /(16*FT#))+.5)
260 CT10=INT(TP10/256)
270 FT10=TP10 -(CT1O*256)
280 AF#=FCLOCK# /(16*(256*CT1O+FT10))
290 HEXFT10$=HEX$(FTT10):IF LEN(HEXFT10$)=1 
    THEN HEXFT 10$="0"+HEXFT10$
300 PRINT MID$(NOTE$,NOTE*2-1,2),
    OCTAVE,USING "####.###";FT#,
310 PRINT" ";USING "####.###";AF#,
320 PRINT " ",HEX$(CT10);HEXFT10$;
330 NEXT NOTE
340 NEXT OCTAVE
	
well as that of switching the various combinations of tone and white noise.
The SOUNDBOARD plugs directly into the expansion port of the Jupiter Ace using a flexible cable to avoid connector wobble problems. An extension to the expansion bus at the rear of the unit allows the recommended RAM add-on to be fitted as well. It also has a fitted volume control and a loudspeaker giving ample output, plus jack socket for an alternative external speaker if required. A reset button feeds to the sound generator chip (rather than the processor) permitting instant relief if required.
On the side of the case is an input/output port which uses a facility of the AY-3-8910 not discussed so far. (Indeed, you will have to wait for next month's instalment!) It also has a parallel port. The latter is accessed via the last two of the sixteen sound generator chip registers and the upper two bits in the enable register. Essex Micro Electronics provide some helpful suggestions as to how to make use of this added facility by giving some circuit diagrams and, yet again, routines in FORTH.
Sections in the manual describe how the sound chip is organised, the register descriptions and functions. A library of commands is built up step by step in FORTH to let the operator have a highlevel-language interface to the hardware.
Conclusions
Altogether this add-on is highly recommended. The manual is comprehensive and clear and the SOUNDBOARD really does make superb noises. The only flies in the ointment are (a) that it is dedicated to the Jupiter Ace and, at the time of writing, Jupiter's future is uncertain - and (b) that writing programs in FORTH gives yours truly a headache!