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 | |
Register | B7 | B6 | B5 | B4 | B3 | B2 | B1 | B0 |
R0 | Channel A Tone Period | 8-bit fine tune A |
R1 | | 4-bit course tune A |
R2 | Channel B Tone Period | 8-bit fine tune B |
R3 | | 4-bit course tune B |
R4 | Channel C Tone Period | 8-bit fine tune C |
R5 | | 4-bit course tune C |
R6 | Noise Period | | 5-bit noise period |
R7 | Enable | IN/OUT | | Noise | | Tone | |
| | IOB | IOA | C | B | A | C | B | A |
R10 | Channel A amplitude | | M | L3 | L2 | L1 | L0 |
R11 | Channel B amplitude | | M | L3 | L2 | L1 | L0 |
R12 | Channel C amplitude | | M | L3 | L2 | L1 | L0 |
R13 | Envelope period | 8-bit fine tune envelope |
R14 | | 8-bit course tune envelope |
R15 | Envelope shape/cycle | | CONT | ATT | ALT | HOLD |
R16 | I/O PORT A data | 8-bit parallel I/O |
R17 | I/O PORT B data | 8-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.