Skip to content

Commit e89e3e8

Browse files
Jayeson Lee-SteereJayeson Lee-Steere
authored andcommitted
First pass at Coco 1/2 Improved color burst logic. Uses 16v8 GAL.
1 parent f9b4b0f commit e89e3e8

File tree

5 files changed

+301
-0
lines changed

5 files changed

+301
-0
lines changed
2.62 KB
Binary file not shown.
3.17 KB
Binary file not shown.
Lines changed: 89 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,89 @@
1+
%SIGNAL
2+
PIN 12 = Q0
3+
PIN 13 = Q1
4+
PIN 14 = Q2
5+
PIN 15 = Q3
6+
PIN 1 = clk
7+
PIN 2 = clk_copy
8+
PIN 19 = clk_thru
9+
PIN 17 = colorburst_active_out
10+
PIN 18 = colorburst_out
11+
PIN 4 = css
12+
PIN 3 = hs
13+
PIN 5 = inv_gm0
14+
PIN 6 = invert_colorburst_outputs
15+
PIN 16 = last_hs
16+
PIN 11 = oe
17+
%END
18+
19+
%FIELD
20+
%END
21+
22+
%EQUATION
23+
Q0.d =>
24+
!Q0 & Q1 & css & inv_gm0
25+
# !Q0 & Q2 & css & inv_gm0
26+
# !Q0 & Q3 & css & inv_gm0
27+
# !Q0 & css & !hs & inv_gm0 & last_hs
28+
29+
Q1.d =>
30+
Q0 & !Q1 & css & inv_gm0
31+
# !Q0 & Q1 & css & inv_gm0
32+
33+
Q2.d =>
34+
Q0 & Q1 & !Q2 & css & inv_gm0
35+
# !Q1 & Q2 & css & inv_gm0
36+
# !Q0 & Q2 & css & inv_gm0
37+
38+
Q3.d =>
39+
Q0 & Q1 & Q2 & !Q3 & css & inv_gm0
40+
# !Q0 & Q3 & css & inv_gm0
41+
# !Q2 & Q3 & css & inv_gm0
42+
# !Q1 & Q3 & css & inv_gm0
43+
44+
clk_thru =>
45+
clk_copy
46+
47+
colorburst_active =>
48+
Q2 & !Q3
49+
# !Q2 & Q3
50+
# !Q1 & Q2 & Q3
51+
52+
colorburst_active_out =>
53+
!Q1 & Q2 & Q3 & !invert_colorburst_outputs
54+
# !Q2 & Q3 & !invert_colorburst_outputs
55+
# Q2 & !Q3 & !invert_colorburst_outputs
56+
# !Q2 & !Q3 & invert_colorburst_outputs
57+
# Q1 & Q2 & Q3 & invert_colorburst_outputs
58+
59+
colorburst_out =>
60+
!Q1 & Q2 & Q3 & !clk_copy & !invert_colorburst_outputs
61+
# Q2 & !Q3 & !clk_copy & !invert_colorburst_outputs
62+
# !Q2 & Q3 & !clk_copy & !invert_colorburst_outputs
63+
# clk_copy & invert_colorburst_outputs
64+
# !Q2 & !Q3 & invert_colorburst_outputs
65+
# Q1 & Q2 & Q3 & invert_colorburst_outputs
66+
67+
count_active =>
68+
Q0 & css & inv_gm0
69+
# Q1 & css & inv_gm0
70+
# Q2 & css & inv_gm0
71+
# css & !hs & inv_gm0 & last_hs
72+
# Q3 & css & inv_gm0
73+
74+
last_hs.d =>
75+
hs
76+
77+
trigger =>
78+
!hs & last_hs
79+
80+
clk_thru.oe =>
81+
1
82+
83+
colorburst_active_out.oe =>
84+
1
85+
86+
colorburst_out.oe =>
87+
1
88+
89+
%END
Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+

2+
CUPL(WM) 5.0a Serial# 60008009
3+
Device g16v8ms Library DLIB-h-40-11
4+
Created Sun May 15 14:19:58 2016
5+
Name ImprovedColorBurst
6+
Partno TS0001
7+
Revision 01
8+
Date 2016/05/14
9+
Designer Jayeson Lee-Steere
10+
Company Titanium Studios Pty Ltd
11+
Assembly None
12+
Location None
13+
*QP20
14+
*QF2194
15+
*G0
16+
*F0
17+
*L00000 11111111111111111111111111111111
18+
*L00032 01111111111111111111111111111111
19+
*L00256 11111111111111111111111111111111
20+
*L00288 10111111111111111001110111101111
21+
*L00320 10111111111111111010110111111111
22+
*L00352 10111111111111111001111011111111
23+
*L00384 01111111111111110111111111111111
24+
*L00416 11111111111111110110111011111111
25+
*L00448 11111111111111110101110111011111
26+
*L00512 11111111111111111111111111111111
27+
*L00544 11111111111111111001110111101111
28+
*L00576 11111111111111111001111011111111
29+
*L00608 11111111111111111010110111111111
30+
*L00640 11111111111111110110111011111111
31+
*L00672 11111111111111110101110111011111
32+
*L00768 11110111111111111111111111111111
33+
*L01024 11111111011101111110110111011101
34+
*L01056 11111111011101111101111111111110
35+
*L01088 11111111011101111101111011111111
36+
*L01120 11111111011101111101111111101111
37+
*L01280 11111111011101111111111011011101
38+
*L01312 11111111011101111111110111101111
39+
*L01344 11111111011101111111110111111110
40+
*L01536 11111111011101111111111111101101
41+
*L01568 11111111011101111111111111011110
42+
*L01792 11111111011101111111111111011110
43+
*L01824 11111111011101111111110111111110
44+
*L01856 11111111011101111101111111111110
45+
*L01888 11111011011101011111111111111110
46+
*L02048 11111111010101000101001100110000
47+
*L02080 00110000001100000011000100000000
48+
*L02112 00000000111000001111111111111111
49+
*L02144 11111111111111111111111111111111
50+
*L02176 111111111111111101
51+
*C727A
52+
*6792
Lines changed: 160 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,160 @@
1+
Name ImprovedColorBurst;
2+
Partno TS0001;
3+
Revision 01;
4+
Date 2016/05/14;
5+
Designer Jayeson Lee-Steere;
6+
Company Titanium Studios Pty Ltd;
7+
Location None;
8+
Assembly None;
9+
Device g16v8a;
10+
11+
/******************************************************************************/
12+
/* */
13+
/* Tandy Color Computer 1/2 artifact mode colorburst signal timing. */
14+
/* ================================================================ */
15+
/* */
16+
/* This logic generates two possible ways to generate an accurate colorburst */
17+
/* signal when in MC6847/MC1372 artifact mode: */
18+
/* */
19+
/* 1. The colorburst_active_out signal indicates when a colorburst should */
20+
/* be active. By pulling down the 'A' phase color signal level via a 1K */
21+
/* resistor during this time, an appropriate colorburst will be */
22+
/* generated. Note that it is possible this colorburst is 10 degrees off */
23+
/* the correct phase, resulting in less desireable colors). */
24+
/* 2. The colorburst_out signal generates pulses at the correct frequency */
25+
/* and phase to be added directly to the MC1732 output (pin 12). Note */
26+
/* that due to propogation delays in this logic, the phase may be */
27+
/* incorrect. Using the output clock from this circuit to time the 6847 */
28+
/* and 1372 may produce better results. Might also cause issues with the */
29+
/* 6847 being behind the rest of the Coco timing. How best to strap to the */
30+
/* MC1372 output is not clear either. The Coco 1 F board appears to use an */
31+
/* RLC circuit. More experimentation needed (this approach has not been */
32+
/* tested). */
33+
/* */
34+
/* Theory of Operation */
35+
/* ------------------- */
36+
/* */
37+
/* In the monochrome color modes, the MC6847 does not generate a colorburst */
38+
/* signal. Color TV's, by design, force a monochrome display when no */
39+
/* colorburst is present. This is to avoid issues with color artifacts */
40+
/* on B/W broadcast/content. However there is enough clock noise bleeding */
41+
/* into the video output of early Color Computers that some TV's will */
42+
/* interpret this as a colorburst. The resultant artifact colors are */
43+
/* desireable, and very much used by and expected in Coco games. Later */
44+
/* model Coco's use increasingly complex circuits to generate a stronger, */
45+
/* more reliable colorburst, however none are very correct. This */
46+
/* logic is indended to correct that deficiency. */
47+
/* */
48+
/* CLK and HS, CSS and /GM0 are inputs to this logic. When CSS and */
49+
/* /GM0 are both high, a monochrome color mode has been activated in the 6847 */
50+
/* and the 6847 is no longer generating a color burst. */
51+
/* */
52+
/* The HS signal is high during the entire hsync period of the video signal. */
53+
/* In the period immediately after (back porch), approximately 10 cycles of */
54+
/* colorburst should be generated. The colorburst is at the same frequency as */
55+
/* as the CLK. */
56+
/* */
57+
/* This logic works as follows: on the high to low transition of HS (start of */
58+
/* front porch), and if CSS and /GM0 are both high, a 4 bit counter begins */
59+
/* counting, advanced by CLK. When the counter value is between 4 and 14 */
60+
/* inclusive, COLORBURST_ACTIVE_OUT is raised high and COLORBURST_OUT is */
61+
/* raised high when CLK is high. These outputs can be used to implement */
62+
/* strategies 1 and 2, respectively, as described above. When the counter */
63+
/* loops to zero, counting stops until triggered again by the next HS high */
64+
/* to low transition. */
65+
/* */
66+
/* Input connections */
67+
/* ----------------- */
68+
/* */
69+
/* 1 CLK: Connect to the MC7847 CLK (pin 33). This input must be schmitt */
70+
/* buffered (inverse is OK). */
71+
/* 2 CLK_COPY: Connect the same as pin 1. */
72+
/* 3 HS: Connect to the inverse of MC6847 /HS (pin 38). Recommend schmitt */
73+
/* buffering. */
74+
/* 4 CSS: Connect to MC6847 CSS (pin 39). Does not require schmitt */
75+
/* buffering. */
76+
/* 5 /GM0: Connect to MC6847 /GM0 (pin 30). Does not require schmitt */
77+
/* buffering. */
78+
/* 6 INVERT_COLORBURST_OUTPUTS: Inverts COLORBURST_OUT and */
79+
/* COLORBURST_ACTIVE_OUT outputs. Set low when using the output(s) to */
80+
/* drive an NPN pulldown transistor. Set high when using an output to set */
81+
/* the OE (output enable) input on pin 11. */
82+
/* 7-9 Unused. Connect to VCC. */
83+
/* 11 OE: Output enable. Set low to disable the register outputs. High to */
84+
/* enable the register outputs: LAST_HS and Q0 to Q3. The other 3 outputs */
85+
/* are not registered and always active. */
86+
/* */
87+
/* Output connections */
88+
/* ------------------ */
89+
/* */
90+
/* 12-15 Q0-Q3: Counter registers. All zeros except during back porch. */
91+
/* Tristate when OE is high. */
92+
/* 16 LAST_HS: Register that holds the HS values and is used to detect the */
93+
/* high to low transition (end of hsync, start of back porch). Tristate */
94+
/* when OE is high. */
95+
/* 17 COLORBURST_ACTIVE_OUT: High during the period when colorburst should */
96+
/* be occuring. Inverted when INVERT_COLORBURST_OUTPUTS is high. */
97+
/* 18 COLORBURST_OUT: High when the clock is high during the colorburst */
98+
/* period. Zero otherwise. Inverted when INVERT_COLORBURST_OUTPUTS is */
99+
/* high. */
100+
/* 19 CLK_THRU: Passthrough of CLK_COPY. Provided to yeild a clock where */
101+
/* the phase is closer to the phase of the other outputs (especially, */
102+
/* COLORBURST_OUT). May be useful in approach 2 above. */
103+
/* */
104+
/* Notes */
105+
/* ----- */
106+
/* */
107+
/* The LAST_HS output is low during the period where the colorburst is */
108+
/* required. By pulling OE low, such as with the COLORBURST_OUT or */
109+
/* COLORBURST_ACTIVE_OUT signals, the equivalent of an open collector */
110+
/* pulldown is achieved. This will avoid the need for a separate transistor. */
111+
/* */
112+
/* GAL's have higher switching speeds than the stock circuitry in the Coco. */
113+
/* As previosly mentioned, schmitt buffering the inputs is recommended. Using */
114+
/* a fast logic family is also recommended for this (AHCT?) to reduces */
115+
/* propogation delays and possible issues with slow outputs. */
116+
/* */
117+
/* The high switching speed also means high frequency design issues may come */
118+
/* into play. Use heavy ground planes, large and small decoupling cap values, */
119+
/* short traces. Other impedence matching may be required. Recommend checking */
120+
/* signal quality with a scope. */
121+
/* */
122+
/******************************************************************************/
123+
124+
/* Inputs */
125+
126+
Pin 1 = clk;
127+
Pin 11 = oe;
128+
129+
Pin 2 = clk_copy;
130+
Pin 3 = hs;
131+
Pin 4 = css;
132+
Pin 5 = inv_gm0;
133+
Pin 6 = invert_colorburst_outputs;
134+
135+
/* Outputs */
136+
137+
Pin 19 = clk_thru;
138+
Pin 18 = colorburst_out;
139+
Pin 17 = colorburst_active_out;
140+
Pin 16 = last_hs;
141+
Pin [12..15] = [Q0..3];
142+
143+
/* Declarations and Intermediate Variable Definitions */
144+
145+
/* Equations */
146+
147+
trigger = last_hs & !hs; /* Falling edge */
148+
last_hs.d = hs;
149+
150+
count_active = (Q0 # Q1 # Q2 # Q3 # trigger) & css & inv_gm0;
151+
152+
Q0.d = (!Q0) & count_active;
153+
Q1.d = (Q0 & !Q1 # !Q0 & Q1) & count_active;
154+
Q2.d = (Q0 & Q1 & !Q2 # !(Q0 & Q1) & Q2) & count_active;
155+
Q3.d = (Q0 & Q1 & Q2 & !Q3 # !(Q0 & Q1 & Q2) & Q3) & count_active;
156+
157+
colorburst_active = (Q2 $ Q3) # (!Q1 & Q2 & Q3);
158+
colorburst_active_out = colorburst_active $ invert_colorburst_outputs;
159+
colorburst_out = (colorburst_active & !clk_copy) $ invert_colorburst_outputs;
160+
clk_thru = clk_copy;

0 commit comments

Comments
 (0)