Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
alexbevi
GitHub Repository: alexbevi/BizHawk
Path: blob/master/BizHawk.Emulation.Cores/Consoles/Coleco/docs/CV-Tech.txt
2 views
1
2
Coleco Vision Cart Info
3
-----------------------
4
5
6
7
8
All carts start at 8000h with a header that tells the BIOS what to do.
9
10
8000 - 8001: If bytes are AAh and 55h, the CV will show a title screen
11
and game name, etc.
12
13
If bytes are 55h and AAh, the CV will jump directly to the
14
start of code vector.
15
16
8002 - 8003: Vector; ??? --\
17
\
18
8004 - 8005: Vector; ??? \
19
>--- These always point to 0000 or RAM (7xxx)
20
8006 - 8007: Vector; ??? /
21
/
22
8008 - 8009: Vector; ??? --/
23
24
800A - 800B: Vector; Start of code
25
26
800C - 800E: Jmp to: RST 08h
27
28
800F - 8011: Jmp to: RST 10h
29
30
8012 - 8014: Jmp to: RST 18h
31
32
8015 - 8017: Jmp to: RST 20h
33
34
8018 - 801A: Jmp to: RST 28h
35
36
801B - 801D: Jmp to: RST 30h
37
38
801E - 8020: Jmp to: RST 38h
39
40
8021 - 8023: JMP to: NMI (Vertical Blanking Interrupt from video chip)
41
42
8024 - nnnn: Title screen data:
43
44
45
Data for the title screen is composed of 4 lines in the format:
46
47
48
49
+--------------+
50
| COLECOVISION |
51
| |
52
| LINE 2 |
53
| LINE 3 |
54
|(c)xxxx COLECO|
55
+--------------+
56
57
Typical Screen
58
59
60
The 'ColecoVision' line cannot be changed, as well as the '(C)xxxx Coleco'
61
part of the bottom line. Only the xxxx part can be changed.
62
63
64
The data is stored as one string with the '/' character (2Fh) used as a
65
delimiter. It signals the end of a line, and isn't printed.
66
67
The lines are stored out of order like so:
68
69
70
"LINE 3/LINE 2/xxxx" There isn't an end-of-line delimiter, because the
71
last line is always 4 characters (it's meant for a year like 1983)
72
73
74
So, if we want to see the following:
75
76
77
+--------------+
78
| COLECOVISION |
79
| |
80
| MY GAME! |
81
| BY: ME |
82
|(c)1995 COLECO|
83
+--------------+
84
85
86
87
We would use the string:
88
89
90
"BY: ME!/MY GAME!/1995"
91
92
Remember, we cannot change the "(c)xxxx COLECO" part, only the xxxx in the
93
middle of the line.
94
95
The lines are self-centering on the screen.
96
97
Altho the BIOS ROM has both upper-case and lower-case characters in the
98
character set, only upper-case is supported.
99
100
All printable characters are based on the ASCII character set:
101
102
103
(all values in hex)
104
105
00-1C: Blank
106
1D : (c) (Copyright symbol)
107
1E-1F: tm (TradeMark symbol, uses 2 chars side-by-side)
108
20-2E: (respectively) space ! " # $ % & ' ( ) * + , - .
109
2F : Delimiter- used to end a line, not printable
110
30-39: 0-9
111
3A-40: (respectively) : ; < = > ? @
112
41-5A: A-Z
113
5B-5F: (respectively) [ \ ] ^ _
114
115
The chars # 60-8F are the 4-char blocks that make up the 'COLECOVISION'
116
name at the top, arranged like so:
117
118
119
6062 6466 686A 6C6E 7072 7476 787A 7C7E 8082 8486 888A 8C8E
120
6163 6567 696B 6D6F 7173 7577 797B 7D7F 8183 8587 898B 8D8F
121
122
123
C O L E C O V I S I O N
124
125
(purple) (orange) (pink) (yellow) (green) (blue)
126
127
128
What's intresting, is when these are in the title lines, they show up in
129
their respective colours! All other printable chars are white.
130
131
132
Chars 90-FF are all blank
133
134
135
136
Controls:
137
---------
138
139
140
There are 4 ports governing the operation of the controls. They are:
141
142
80- When written to, enables the keypads and right buttons on both controls.
143
144
C0- When written to, enables the joysticks and left buttons on both controls.
145
146
These 2 ports toggle a flip-flop, so the data going out the ports
147
is irrelevant.
148
149
FC- Reading this port gives the status of controller #1. (farthest from front)
150
151
FF- Reading this one gives the status of controller #2. (closest to front)
152
153
154
All switch closures are represented by a '0' Open switches are '1'
155
156
Only 5 bits of ports FC and FF are used:
157
158
159
'80' mode (port 80 written to)
160
161
162
bit #6= status of right button
163
164
The keypad returns a 4-bit binary word for a button pressed:
165
166
bit #
167
168
btn: 0 1 2 3
169
-----------------------
170
0 0 1 0 1
171
1 1 0 1 1
172
2 1 1 1 0
173
3 0 0 1 1
174
4 0 1 0 0
175
5 1 1 0 0
176
6 0 1 1 1
177
7 1 0 1 0
178
8 1 0 0 0
179
9 1 1 0 1
180
* 1 0 0 1
181
# 0 1 1 0
182
183
184
Re-arranged, in order:
185
186
187
188
btn: 0 1 2 3 hex#
189
-------------------------------
190
inv. 0 0 0 0 0
191
8 1 0 0 0 1
192
4 0 1 0 0 2
193
5 1 1 0 0 3
194
inv. 0 0 1 0 4
195
7 1 0 1 0 5
196
# 0 1 1 0 6
197
2 1 1 1 0 7
198
inv. 0 0 0 1 8
199
* 1 0 0 1 9
200
0 0 1 0 1 A
201
9 1 1 0 1 B
202
3 0 0 1 1 C
203
1 1 0 1 1 D
204
6 0 1 1 1 E
205
inv. 1 1 1 1 F (No buttons down)
206
207
208
The controllers have 28 diodes in them that generate the above table.
209
Coleco did this so the programmer wouldn't have to scan the keys. Also,
210
there wouldn't have been enough pins on the end of the cable to accomodate
211
the array. (There are only 7 pins on the connector. That's just enough
212
to scan a 3*4 matrix, but that doesn't include the stick or other 2
213
buttons.)
214
215
216
217
'C0' mode (port C0 written to)
218
219
220
This mode allows you to read the stick and left button:
221
222
223
Bit 6=Left button
224
Bit 0=Left
225
Bit 1=Down
226
Bit 2=Right
227
Bit 3=Up
228
229
230
CV's memory/IO map
231
------------------
232
233
The CV uses 2 74138 3-8 line decoders to generate the memory and IO maps.
234
235
As you would expect, memory is broken up into 8 8K blocks. However, the IO
236
map is broken up into 4 write and 4 read ports.
237
238
Memory:
239
240
(ABC lines of decoder go to A5, A6, and A7 respectively /E1 -> /M_request
241
/E2 -> Reset; E3 -> +V)
242
243
0000-1FFF = BIOS ROM
244
2000-3FFF = Expansion port
245
4000-5FFF = Expansion port
246
6000-7FFF = SRAM (1K)
247
8000-9FFF = Cart
248
A000-BFFF = Cart
249
C000-DFFF = Cart
250
E000-FFFF = Cart
251
252
253
IO:
254
255
(ABC lines of decoder go to /WR, A5, and A6 respectively /E1 -> /IO_request
256
/E2 -> Reset; E3 -> A7)
257
258
259
80-9F (W) = Controls _ Set to keypad mode
260
80-9F (R) = Not Connected
261
262
A0-BF (W) = Video \___ A0 also decoded by video chip
263
A0-BF (R) = Video /
264
265
C0-DF (W) = Controls _ Set to joystick mode
266
C0-DF (R) = Not Connected
267
268
E0-FF (W) = Sound
269
E0-FF (R) = Controls _ A1 also decoded by chips (A1=0 ctrl 1; A1=1 ctrl 2)
270
271
272
273
CV's sound chip
274
---------------
275
276
The sound chip in the CV is a SN76489AN manufactured by Texas Instruments.
277
It has 4 sound channels- 3 tone and 1 noise.
278
279
The volume of each channel can be controlled seperately in 16 steps from
280
full volume to silence.
281
282
A byte written into the sound chip determines which register is used, along
283
with the frequency/ attenuation information.
284
285
The frequency of each channel is represented by 10 bits. 10 bits won't
286
fit into 1 byte, so the data is written in as 2 bytes.
287
288
Here's the control word:
289
290
+--+--+--+--+--+--+--+--+
291
|1 |R2|R1|R0|D3|D2|D1|D0|
292
+--+--+--+--+--+--+--+--+
293
294
1: This denotes that this is a control word
295
R2-R0 the register number:
296
297
000 Tone 1 Frequency
298
001 Tone 1 Volume
299
010 Tone 2 Frequency
300
011 Tone 2 Volume
301
100 Tone 3 Frequency
302
101 Tone 3 Volume
303
110 Noise Control
304
111 Noise Volume
305
306
D3-D0 is the data
307
308
Here's the second frequency register:
309
310
+--+--+--+--+--+--+--+--+
311
|0 |xx|D9|D8|D7|D6|D5|D4|
312
+--+--+--+--+--+--+--+--+
313
314
0: This denotes that we are sending the 2nd part of the frequency
315
316
D9-D4 is 6 more bits of frequency
317
318
319
To write a 10-bit word for frequenct into the sound chip you must first
320
send the control word, then the second frequency register. Note that the
321
second frequency register doesn't have a register number. When you write
322
to it, it uses which ever register you used in the control word.
323
324
So, if we want to output 11 0011 1010b to tone channel 1:
325
326
First, we write the control word:
327
328
LD A,1000 1010b
329
OUT (F0h),A
330
331
Then, the second half of the frequency:
332
333
LD A,0011 0011b
334
OUT (F0h),A
335
336
To tell the frequency of the wave generated, use this formula:
337
338
339
3579545
340
f= -------
341
32n
342
343
Where f= frequency out,
344
and n= your 10-bit binary number in
345
346
347
To control the Volume:
348
349
350
+--+--+--+--+--+--+--+--+
351
|1 |R2|R1|R0|V3|V2|V1|V0|
352
+--+--+--+--+--+--+--+--+
353
354
R2-R0 tell the register
355
356
V3-V0 tell the volume:
357
358
0000=Full volume
359
.
360
.
361
.
362
1111=Silence
363
364
365
The noise source is quite intresting. It has several modes of operation.
366
Here's a control word:
367
368
+--+--+--+--+--+--+--+--+
369
|1 |1 |1 |0 |xx|FB|M1|M0|
370
+--+--+--+--+--+--+--+--+
371
372
FB= Feedback:
373
374
0= 'Periodic' noise
375
1= 'white' noise
376
377
The white noise sounds, well, like white noise.
378
The periodic noise is intresting. Depending on the frequency, it can
379
sound very tonal and smooth.
380
381
M1-M0= mode bits:
382
383
00= Fosc/512 Very 'hissy'; like grease frying
384
01= Fosc/1024 Slightly lower
385
10= Fosc/2048 More of a high rumble
386
11= output of tone generator #3
387
388
You can use the output of gen. #3 for intresting effects. If you sweep
389
the frequency of gen. #3, it'll cause a cool sweeping effect of the noise.
390
The usual way of using this mode is to attenuate gen. #3, and use the
391
output of the noise source only.
392
393
The attenuator for noise works in the same way as it does for the other
394
channels.
395
396
397
398
Video
399
-----
400
401
The CV uses a TMS9918a chip made by Texas Instruments.
402
403
404
405