INMC 80 News

  

October–December 1981 · Issue 5

Page 23 of 71

knowledge of machine code. (Basic could have been used, but would slow the responce of complicated effects.) Within a couple of hours, we had a very passable ‘sea lapping on shore’ sound with nice changes in level for big and small waves, with a few random seagulls thrown in for good measure. The versatility of the AY-3-8910 is unending, and given a bit of external tone forming, limitless (well almost).

The AY-3-8910 contains three independant ‘tone’ channels, each covering a range from the sub-sonic to the supersonic. Each ‘tone’ channel is preset by a twelve bit word contained in 2 registers. There is a fourth channel, a ‘noise’ generator, which will produce random width pulses with a spectural distribution controlled by a five bit register. It can produce ‘noise’ from a quite throaty ‘shuush’ to a high pitched ‘sssssss’ (if you get my meaning). One register controls the Functions of the channel mixer. Enabling each of the three ‘tone’ channels independantly, and allowing the “noise” channel to be mixed with any or all of the three “tone” channels. Three registers control the amplitude of the three output channels, these require four bits for each. A fifth bit on each amplitude register switches that channel through the ‘envelope shaper’, ignoring the preset amplitude in the lower four bits. The envelope period is controlled by a 16 bit control word in two registers, and may be preset from milliseconds to seconds, and affects those channels directed to it. The envelope shaper could produce quick annoying clicks with each change of envelope level when run close to it’s maximum period. These could probably be filtered out externally. The last register controls the envelope shape and cycle. Allowing positive or negative attack, continuous output, alternate or one shot outputs, and lots of other permutations. There are two other registers which work on conjunction with an external EPROM/​ROM pack for remote and/or preset control. Although the PSG board has these connected to a 16 pin’ socket, they play no part in the use of the PSG.

Bit
RegisterB7B6B5B4B3B2B1B0
R0Channel A Tone Period8-bit fine tune A
R14-bit course tune A
R2Channel B Tone Period8-bit fine tune B
R34-bit course tune B
R4Channel C Tone Period8-bit fine tune C
R54-bit course tune C
R6Noise Period5-bit noise period
R7EnableIN/OUTNoiseTone
IOBIOACBACBA
R10Channel A amplitudeML3L2L1L0
R11Channel B amplitudeML3L2L1L0
R12Channel C amplitudeML3L2L1L0
R13Envelope period8-bit fine tune envelope
R148-bit course tune envelope
R15Envelope shape/​cycleCONTATTALTHOLD
R16I/O PORT A data8-bit parallel I/O
R17I/O PORT B data8-bit parallel I/O

The PHG instruction book gave a machine code routine for updating the PSG registers, and although effective was a little tedious. For experimenting, we found the update routine below a little more handy. The Nascom screen set up with a Tab command to display the register table at the top. Beneath this was an Execute command to execute the command then return to NAS-SYS. Beneath this was an ‘M’ command. By entering the M command, the cursor could be skipped around the Tabbed register table on the screen, a few registers changed changed here and there, and then the cursor skipped down to the ‘E’ command and the routine re-executed to see the affect. That then brought the cursor back to the ‘M’ command ready for the next try.

Page 23 of 71