2 ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿
\r
3 ³ Programming the GameBlaster Sound Card ³
\r
4 ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ
\r
6 Written for the PC-GPE by Mark Feldman
\r
7 e-mail address : u914097@student.canberra.edu.au
\r
8 myndale@cairo.anu.edu.au
\r
10 ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿
\r
11 ³ THIS FILE MAY NOT BE DISTRIBUTED ³
\r
12 ³ SEPARATE TO THE ENTIRE PC-GPE COLLECTION. ³
\r
13 ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ
\r
16 ÚÄÄÄÄÄÄÄÄÄÄÄÄÂÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ
\r
20 I assume no responsibility whatsoever for any effect that this file, the
\r
21 information contained therein or the use thereof has on you, your sanity,
\r
22 computer, spouse, children, pets or anything else related to you or your
\r
23 existance. No warranty is provided nor implied with this information.
\r
25 ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÂÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ
\r
29 The GameBlaster sound card (also known as the CMS) is now pretty much
\r
30 obsolete, well I haven't seen any apart from the one I own. The card was
\r
31 developped by Creative Labs, the same people who designed the SoundBlaster.
\r
32 You can still buy the CMS chips to place inside your SoundBlaster 1.0 and
\r
33 2.0 cards to make them compatible, but believe me, it isn't worth it. The
\r
34 only reason I'm writing this file is because the GameBlaster chips are really
\r
35 easy to program (due to the fact that it can't do anything) so this should be
\r
36 of use to those of you who already own one.
\r
38 I have no idea how to detect the presence of the CMS chips in a SoundBlaster,
\r
39 trying to write to it's registers while the chips were not installed made
\r
42 ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÂÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ
\r
43 ³ General Programming Info ³
\r
44 ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ
\r
46 The GameBlaster has 12 channels. Each channel can produce either a single
\r
47 sine wave of a given frequency and magnitude (in stereo), or noise.
\r
49 The GameBlaster is programmed through 4 ports as follows:
\r
52 Write 2x1 with register address
\r
53 Write 2x0 with data to register
\r
56 Write 2x3 with register address
\r
57 Write 2x2 with data to register
\r
59 The x value depends on the jumper setting on your card, x = 1 for 210h, x =
\r
62 ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÂÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ
\r
63 ³ Reseting the GameBlaster ³
\r
64 ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ
\r
66 First you have to reset the GameBlaster and enable all voices. This is done
\r
67 by setting register 1Ch, which is laid out as follows:
\r
69 ÚÄÄÄÂÄÄÄÂÄÄÄÂÄÄÄÂÄÄÄÂÄÄÄÂÄÄÄÂÄÄÄ¿
\r
70 ³ 7 ³ 6 ³ 5 ³ 4 ³ 3 ³ 2 ³ 1 ³ 0 ³
\r
71 ÀÄÄÄÁÄÄÄÁÄÄÄÁÄÄÄÁÄÄÄÁÄÄÄÁÄÄÄÁÄÄÄÙ
\r
73 Sound Enable for all channels ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ ³
\r
74 0 all channels disabled ³
\r
75 1 all channels enabled ³
\r
77 Reset signal to all generators ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ
\r
78 0 all generators enabled
\r
79 1 all generators reset and synchronized
\r
81 The following Pascal code will reset and enable the card (assuming jumper
\r
82 setting is for 220h) :
\r
85 Port[$220] := $02; { Reset voices }
\r
87 Port[$220] := $00; { Disable noise * }
\r
89 Port[$220] := $01; { Enable voices }
\r
91 * Noise is discussed in the next section
\r
94 ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÂÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ
\r
95 ³ Enabling Voice Frequency ³
\r
96 ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ
\r
98 To hear a frequency from a voice you must set the appropriate bit in
\r
101 ÚÄÄÄÂÄÄÄÂÄÄÄÂÄÄÄÂÄÄÄÂÄÄÄÂÄÄÄÂÄÄÄ¿
\r
102 ³ 7 ³ 6 ³ 5 ³ 4 ³ 3 ³ 2 ³ 1 ³ 0 ³
\r
103 ÀÄÄÄÁÄÄÄÁÄÄÄÁÄÄÄÁÄÄÄÁÄÄÄÁÄÄÄÁÄÄÄÙ
\r
105 ³ ³ ³ ³ ³ ÀÄÄ Frequency enable 1/7
\r
106 ³ ³ ³ ³ ÀÄÄÄÄÄÄ Frequency enable 2/8
\r
107 ³ ³ ³ ÀÄÄÄÄÄÄÄÄÄÄ Frequency enable 3/9
\r
108 ³ ³ ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄ Frequency enable 4/10
\r
109 ³ ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ Frequency enable 5/11
\r
110 ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ Frequency enable 6/12
\r
112 Note that for each bit in the above table two voice numbers are given. If
\r
113 ports 2x1 and 2x0 are used then the first voice is modified. If ports 2x3
\r
114 and 2x2 are used then the second voice is modified.
\r
116 Setting a bit to 1 enables the voice. Clearing it to 0 disables the voice.
\r
118 ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÂÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ
\r
119 ³ Setting a Voice Volume ³
\r
120 ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ
\r
122 Each voice can have a volume between 0 and 15 on both left and right
\r
123 channels. The amplitude registers are laid out as follows:
\r
125 ÚÄÄÄÂÄÄÄÂÄÄÄÂÄÄÄÂÄÄÄÂÄÄÄÂÄÄÄÂÄÄÄ¿
\r
126 ³ 7 ³ 6 ³ 5 ³ 4 ³ 3 ³ 2 ³ 1 ³ 0 ³
\r
127 ÀÄÄÄÁÄÄÄÁÄÄÄÁÄÄÄÁÄÄÄÁÄÄÄÁÄÄÄÁÄÄÄÙ
\r
128 ÀÄÄÄÄÄÂÄÄÄÄÄÙ ÀÄÄÄÄÄÂÄÄÄÄÄÙ
\r
130 Right channel volume ÄÄÄÄÄÄÄÄÙ ÀÄÄÄÄÄÄÄÄ Left channel volume
\r
133 To set a channel volume you write the register address to the appropriate
\r
134 Register Address port and write the volume byte to the Data To Register
\r
135 port. The register address map for amplitudes is as follows:
\r
137 ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿
\r
138 ³ Register Address Voice ³
\r
139 ÃÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´
\r
146 ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ
\r
148 ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÂÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ
\r
149 ³ Setting a Voice Frequency ³
\r
150 ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ
\r
152 Setting a voice frequency is similar to setting the volume, one byte is
\r
153 written to the appropriate register. The frequency register map is as
\r
156 ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿
\r
157 ³ Register Address Voice ³
\r
158 ÃÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´
\r
165 ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ
\r
167 The following table is a list of the bytes you write for each note:
\r
187 This is the first octave available. The C frequency in this octave is
\r
190 To get tones in higher octaves you need to set the octave register for a
\r
191 voice. Each octave register stores the octave number for two voices. The
\r
192 octave registers are laid out as follows:
\r
194 ÚÄÄÄÂÄÄÄÂÄÄÄÂÄÄÄÂÄÄÄÂÄÄÄÂÄÄÄÂÄÄÄ¿
\r
195 ³ 7 ³ 6 ³ 5 ³ 4 ³ 3 ³ 2 ³ 1 ³ 0 ³
\r
196 ÀÄÄÄÁÄÄÄÁÄÄÄÁÄÄÄÁÄÄÄÁÄÄÄÁÄÄÄÁÄÄÄÙ
\r
197 ÀÄÄÄÂÄÄÄÙ ÀÄÄÄÂÄÄÄÙ
\r
199 Octave Number 2 ÄÄÄÄÄÄÄÄÙ ÀÄÄÄÄÄÄ Octave number 1
\r
201 The octave register address map is as follows:
\r
203 ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿
\r
204 ³ Register Address Voices ³
\r
205 ÃÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´
\r
208 ³ 12h 6;5 / 12;11 ³
\r
209 ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ
\r
211 ÚÄÄÄÄÄÄÄÂÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ
\r
215 There are 4 noise generators, each noise genrator can be connected up to
\r
216 any of three voices:
\r
218 ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿
\r
220 ³ Generator Voices ³
\r
221 ÃÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´
\r
226 ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ
\r
229 The noise generators are controlled via two registers:
\r
231 Register 16h at ports 2x1 and 2x0 :
\r
233 ÚÄÄÄÂÄÄÄÂÄÄÄÂÄÄÄÂÄÄÄÂÄÄÄÂÄÄÄÂÄÄÄ¿
\r
234 ³ 7 ³ 6 ³ 5 ³ 4 ³ 3 ³ 2 ³ 1 ³ 0 ³
\r
235 ÀÄÄÄÁÄÄÄÁÄÄÄÁÄÄÄÁÄÄÄÁÄÄÄÁÄÄÄÁÄÄÄÙ
\r
238 Noise Gen 2 ÄÄÄÄÄÄÄÄÙ ÀÄÄÄÄÄÄ Noise Gen 1
\r
240 Register 16h at ports 2x3 and 2x2 :
\r
242 ÚÄÄÄÂÄÄÄÂÄÄÄÂÄÄÄÂÄÄÄÂÄÄÄÂÄÄÄÂÄÄÄ¿
\r
243 ³ 7 ³ 6 ³ 5 ³ 4 ³ 3 ³ 2 ³ 1 ³ 0 ³
\r
244 ÀÄÄÄÁÄÄÄÁÄÄÄÁÄÄÄÁÄÄÄÁÄÄÄÁÄÄÄÁÄÄÄÙ
\r
247 Noise Gen 4 ÄÄÄÄÄÄÄÄÙ ÀÄÄÄÄÄÄ Noise Gen 3
\r
249 Each generator has two bits associated with it which control the noise
\r
252 ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿
\r
253 ³ Nn1 Nn0 Frequency ³
\r
254 ÃÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´
\r
258 ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ
\r
260 A voice can be connected to it's noise generator by setting the appropriate
\r
261 bit in register 15h:
\r
263 ÚÄÄÄÂÄÄÄÂÄÄÄÂÄÄÄÂÄÄÄÂÄÄÄÂÄÄÄÂÄÄÄ¿
\r
264 ³ 7 ³ 6 ³ 5 ³ 4 ³ 3 ³ 2 ³ 1 ³ 0 ³
\r
265 ÀÄÄÄÁÄÄÄÁÄÄÄÁÄÄÄÁÄÄÄÁÄÄÄÁÄÄÄÁÄÄÄÙ
\r
267 ³ ³ ³ ³ ³ ÀÄÄ Noice enable 1/7
\r
268 ³ ³ ³ ³ ÀÄÄÄÄÄÄ Noice enable 2/8
\r
269 ³ ³ ³ ÀÄÄÄÄÄÄÄÄÄÄ Noice enable 3/9
\r
270 ³ ³ ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄ Noice enable 4/10
\r
271 ³ ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ Noice enable 5/11
\r
272 ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ Noice enable 6/12
\r
274 Setting a bit to 1 enables the voice. Clearing it to 0 disables the voice.
\r