|
| 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