MockingBoard Mini-Manual
by Jeff Hurlburt
EMail:rubywand@aol.com
Part 1: Kinds of MockingBoards
The original MockingBoards come in four basic 'flavors':
Sound I-- produces music tones and a variety of sound
effects (3 voices to 1 Audio Output)
Speech I-- produces speech or limited sound effects
(1 voice output to 1 Audio Output)
Sound II-- 2 x Sound I on a single board (3+3 voices
to 2 Audio Outputs)
Sound/Speech I-- Sound I + Speech I on a single board
(3+1 voices to 2 Audio Outputs)
Note ...
Audio Output: This goes to a speaker or hi-fi amplifier Voice: a musical note,
sound effect, speech sound, etc.
Quite a few of the original MockingBoards were sold. Later MB's use model names
like "MockingBoard A", etc.. The main difference between the original series
and
letter-named boards is wider availability of Speech.
Edhel Iaur and Mike Mahon supplied details on models A-D. Prices are from a Sweet
Micro Systems ad in the December, 1985 issue of _A+_ magazine:
MockingBoard A is a stereo music and sound synthesizer with six voices. Suggested
retail price is $99.00. This model has two sockets for adding speech synthesis
IC's so that a user could add speech to one or both Audio Outputs. Except for the
speech upgrade options, MB-A is very similar to the earlier Sound II.
"MockingBoard B" is just the name of the Speech Upgrade; it is not a separate
MB
board. The kit consists of one speech synthesizer chip. Earlier MB's used the
16-pin SC-01 speech IC, while later board runs provided 24-pin sockets for the
newer (but somewhat flawed) SSI-263 speech synthesizer chip. Suggested kit retail
price is $89.00.
MockingBoard C is simply a MB-A that has been upgraded by plugging in one speech
chip. Suggested retail price is $179.00. (There was an 'undocumented' upgrade,
obtainable by plugging in the other speech chip, which allowed the board to "sing
harmony" with itself!)
MockingBoard D is a stereo music, sound and speech synthesizer for the Apple IIc.
It connects to a IIc through a serial port and is, of course, external (unlike
the Slot board models for other Apple II's). Its drivers are very different from
the slot I/O of the other MockingBoards. Suggested retail price is $195.00.
Phasor is a MockingBoard-compatible sound card produced by Applied Engineering.
Looking at the software that comes with the Phasor may be helpful to MB users.
Phasors may still be available from ABC Direct at 1-800-800-3680 for something
around $100.
MockingBoards work on Apple II's with at least 48K RAM. MB can go into any Slot
(except for MB-D, which must plug into a IIc). Most programs expect it to be in
Slot 4; however, it is fairly common for a program which supports MB to ask you
to enter the Slot #.
Most for-MB products will work with Sound I, Sound II, Sound/Speech I, A, and C.
(Some work with D.) Products that use MB include Ultima III, IV, V Sky Fox, Wiley
Byte', Thunder Bombs, Lancaster, Under Fire, Music Construction Set,
GuitarMaster, and Music Star.
MB's 0.5 Watt Audio Output(s) can directly drive an 8 Ohm speaker. You can also
run the Output(s) to a hi-fi amplifier.
Except for speech-only models, MB uses the General Instruments AY-3-8910
Programmable Sound Generator IC. The PSG has 3 on-chip tone oscillators (via
channels A, B ,C) and a Noise Generator (NG). So, for example, the Sound II can
play up to 6 notes or effects at once. The NG on each PSG can be mixed with any,
all, or none of the three tones.
Many MB "Speech" version boards use the Votrax SC-01 Speech Synthesizer
IC. The
SC-01 uses 64 phoneme sounds to produce speech. MB software lets you adjust
duration of each phoneme in 4 steps, create "rules" for custom sounds,
and speak
sentences from text in BASIC programs. The
SSI-263 speech synthesizer appeared on later model MB's. (At present, more info
on the SSI-263 is not included here.)
All MB versions use the 6522 Versatile Interface IC to handle board I/O. Except
for the Sound I board, early models have circuit board points to which you can
add cables to utilize I/O ports not needed for Sound or Speech.
Part 2: Sound Programming
Each Programmable Sound Generator (PSG) has 3 output Channels: A, B, and C. There
are also 3 Tone oscillators, one committed to each Channel, and one Noise
Generator (NG) which can send its output to any Channel(s). Amplitude (output
Level or Volume) and Envelope Control ON/OFF is set for each Channel.
The PSG's Enable/Disable register has 8 bits. Three bits let you decide whether
or not to send a Tone oscillator''s output to its Channel. For example, you can
enable Tone outputs for the oscillators going through Channels A and B while
disabling Tone output for the oscillator connected to Channel C.
The Enable/Disable register also lets you decide whether or not to send the Noise
Generator's output through a Channel. Three bits let you decide which Channel(s)
the NG's output will go through. For example, you can enable NG output through
Channels A and C but not through B; or, disable NG output through all three
Channels, etc..
If, for example, Channel A's Tone oscillator output is enabled and NG output is
enabled for Channel A, then, a mixed Tone + NG signal will go through Channel A.
Setting Channel A's Amplitude controls the Level for the mixed signal.
Often, a programmer will want to individually control the Levels of Tone outputs
(for music) and Noise outputs (for sound effects). This is accomplished by using
one PSG Channel only for Noise and two Channels only for Tones. Since the MB
Sound II has 2 PSG's, a typical game application using the board will have 4
music tones and 2 effects sounds-- each individually controlled for Level.
More specifically, the user can set Tone Frequency (12 bits, 4 coarse & 8 fine)
and Amplitude (4 bits) for each channel individually. A fifth Amplitude bit lets
you decide if a channel's Level will be "fixed" (use the Level value) or
"variable" (i.e. follow the current Envelope pattern). You have 4 bits
to set
Noise Generator Frequency.
Tone Freq = A2 Clock Freq/ [ (4096 x Coarse) + (16 x Fine) ] Noise Freq = A2
Clock Freq/ (16 x NG value)
The Envelope of the combined outputs of enabled sources can be controlled for
Period (16 bits, 8 coarse & 8 fine)** and, roughly, for Shape (4 bits).
Env Freq = A2 Clock Freq/ [ (65536 x Coarse) + (256 x Fine) ]
The registers of the PSG are described briefly below:
Reg. Function & Bit(s) used
00 A Freq. fine (0-7)
01 A Freq. coarse (0-3)
02 B Freq. fine (0-7)
03 B Freq. coarse (0-3)
04 C Freq. fine (0-7)
05 C Freq. coarse (0-3)
06 NG Freq. (0-4)
07 Enable =0/ Disable =1
NG on A (5) on B (4) on C (3)
Tone on A (2) on B (1) on C (0)
Ex: Writing $F0 to Reg 07 plays tones A, B, C plus noise on C
08 A Level (0-3) and
Envelope Control (4): 1 = Use Env; 0 = Use Level value
09 B Level (0-3) and ...
0A C Level (0-3) and ...
0B Envelope Period Fine (0-7)
0C Envelope Period Coarse (0-7)
0D Envelope Shape (four bits)
Continue (3) 0= do 1 cycle and set Level to zero Attack (2) 1= count up 0= count
down
Alternate (1) 1= reverse count direction each cycle Hold (0) 1= do 1 cycle and
hold count
To program the MB you write to the board's 6522 I/O chip(s). All addresses
reference here are for a MB Sound II (2 Audio Outputs) in Slot 4.
$C400 ORB1 function to perform, OUT 1
$C480 ORB2 function to perform, OUT 2
$C401 ORA1 data, OUT 1
$C481 ORA2 data, OUT 2
$C402 DDRB1 data direction, OUT 1
$C482 DDRB2 data direction, OUT 2
$C403 DDRA1 data direction, OUT 1
$C483 DDRA2 data direction, OUT 2
Before sending music, etc. data to the MB you must Initialize the board's I/O. To
Initialize the 6522's: Store $FF at $C402 and the other three DDRxx addresses.
This needs to be done by your program just once.
Your program gets access to a PSG via the 6522 by using a few basic Function
codes which set the PSG's I/O control lines:
Set Inactive = $04 Set PSG Reg# = $07 Write Data = $06 Reset = $00
To Write to a PSG register: Tell the PSG which Register you wish to access (i.e.
Set the "current register" #) and Write the data. This is easiest to do
with
subroutines to handle the basic Functions.
Example Subroutines (for Output Channel 1):
Set Reg # 1000: A9 07 8D 00 C4 A9 04 8D 00 C4 60
Write Data 100B: A9 06 8D 00 C4 A9 04 8D 00 C4 60
Notice that each Function sub ends by setting the PSG control lines to Inactive.
Similarly, to do a Reset (set all PSG regs to zero) ...
Reset 1016: A9 00 8D 00 C4 A9 04 8D 00 C4 60
To put the value $55 in PSG Register 02 (Channel B Freq. fine) ....
1080: A9 02 put Reg# in A
1082: 8D 01 C4 store A at the Data address ORA1 1085: 20 00 10 JSR to Set Reg#
(sets "current register" to Register 2)
1088: A9 55 put the value $55 in A
108A: 8D 01 C4 store A at the Data address ORA1 108D: 20 0B 10 JSR to Write Data
($55 goes into PSG Register 2) 1090: 60 Exit from subroutine
As always, additions/corrections from; US-A2WUG, CSA2, 1WSW, GS WorlView and all
other accessed readers are welcome.
Send EMail, corrections, comments and questions to:R/\/\/