3
\$\begingroup\$

I'm designing an 8-bit computer, trying to stick with low-cost components available in 1984+/-3. Following a previous question, I've completed the 6845-based hardware, except that I have no clue how to generate the RGB video signal.

I looked at the schematics of many computers of the era, especially the Amstrad CPC and the BBC Micro, but found that everything was done in an opaque ULA, with no details about operation.

I have the hsync and vsync from the 6845, and my design is now able to produce synchronously for each pixel a N-bits value for each R-G-B component, either in parallel or serialized via shift registers. What then?

I suppose I should feed the values to some DAC able to convert those to analogic signal, but I saw nothing of the kind on the schematics. It looks like they are feeding video ram values, character rom and color latches into the ULA and then, presto, direct to the video connector!

Do those ULA include DAC too, or is the video output standard digital after all, or (most probably) am I missing something?

\$\endgroup\$

4 Answers 4

2
\$\begingroup\$

In the 1980's integrated video DACs were expensive and difficult to embed into custom chips. Most home computers with RGB output either used discrete DACs made from resistors, or had digital outputs (RGB or RGBI).

The Amstrad CPC and BBC micro's ULA did not have internal DACs. The BBC's video processor only produced digital (2 level) outputs, was so it was limited to 8 colors. The Amstrad's Gate Array used its tri-state digital outputs to produce 3 levels (high, low, or floating) with external resistors creating the desired analog voltages. This was able to produce 27 colors.

Here is part of the Amstrad's video circuit. R125-129 pull the outputs high, while R131-133 and R135 pull them low. When a Gate Array output is tri-stated (open circuit) a midpoint voltage results. R131-133 and R135 also mix the colors to produce composite video. R126-130 drop the RGB outputs down to 0.7V when the lines are correctly terminated with 75 Ohms.

enter image description here

Even more colors can easily be produced using resistor based DACs. The Amiga 1000 produced 4096 colors using the circuit below. The Denise video chip produced 4 bit digital RGB outputs which were then converted to analog using binary weighted resistors (1k, 2k, 4k and 8k).

enter image description here

\$\endgroup\$
0
2
\$\begingroup\$

In general, 6845 systems were not intended to drive standard color TVs or displays with composite video. Rather, they were originally intended to drive dedicated monochrome CRTs which required only 3 inputs: HSync, VSync, Video, and Video was normally a TTL logic level. With a bit of extra circuitry you could get the cursor highlighted, but that's it. Plus, of course, it was text-only. The 6845 does not have sufficient speed to do worthwhile non-text display. Maximum clock frequency is 2.5 MHz. Even assuming 48 usec of horizontal display time (standard for 60 Hz displays) that only gives you about 120 pixel horizontal resolution. For text displays, of course, the pixel clock would run about 8 times that, and be divided down to give the CRTC clock.

These CRT monitors, of course, are long gone, although you can still find them on eBay. In general, any modern monitor with analog VGA inputs will accept non-composite video, although not all will operate at the low scan speeds which the 6845 will produce. Also, VGA interface wants to see 1 volt p-p video levels.

In addition to your 6845, you'll need a static RAM to actually hold your screen data. You'll also need a character ROM on the output of the RAM, and a shift register to serialize the ROM output. Plus, of course, bus control logic to determine which element (CPU or CRTC) is actually accessing the RAM.

Making a color output from this setup requires a distinctly non-standard approach. Either you encode your video data with a non-ASCII format, putting the character data in the lower 6 bits and using the upper 2 bits as color select, or your video RAM will need to be more than 8 bits wide, with the attendant complexity involved in writing data to it from an 8-bit data bus. You can do it, but I suspect you need a bit more logic design chops than you have. If I'm wrong, have fun.

If you have 2 bits of color data, the simplest use is to use a 2-4 line decoder to select which primary color (R,G or B) you want the character to appear in. If you've done something non-standard and want better color resolution, you can use the 2 bits to address a lookup table which will convert the 2 bits to 3 sets of RGB values (2 or 3 bits each will fit in an 8-bit ROM, or you can even do something creative with high-speed RAM, although then you'll have to figure out how to access it.

Making a 2-bit video DAC is not hard, but you've got to keep in mind that VGA video inputs are nominally 75 ohm. Something like

schematic

simulate this circuit – Schematic created using CircuitLab

should work, with the buffers just being any 7400 TTL series gates.

If you're determined that you've got to have multi-bit color (which in your timeframe was only available on very high-end monitors), you'll need higher-res video DACs. I'd recommend trying to find old Brooktree DACs, which sometimes show up on eBay. The BT103 has 3 4-bit DACs, and the Bt102 and Bt106 handle 8 bits. All of them have TTL inputs and will give 1 volt into 75 ohms. You can find a 1991 Brooktree catalog on this site and it will give you all the technical information you need.

\$\endgroup\$
1
  • \$\begingroup\$ Great answer! Actually, I'm trying to drive something like interlaced PAL, but I wanted to figure how 6845-based systems got to output their multicolor output. I'm quite new to this but having a lot of fun! For info, I'm using 4K of character RAM + 4K of attribute RAM, both on their own bus driven simultaneously by the MA0-MA11 lines of the CRTC, their data output then combined with color register latches + some other crazy manipulation for the character generator. Thanks. \$\endgroup\$
    – airman
    Sep 19, 2015 at 18:07
1
\$\begingroup\$

You should look at Apple][ schematics. They were based on standard logic gates, with special tricks for generating coloured composite video.

There were also add-on cards for RGB outputs ("Chat Mauve" for example)

\$\endgroup\$
1
\$\begingroup\$

You can roll your own DAC using R-2R resistor chain and an output op amp. The R-2R chain can go with any string of CMOS output pins and you get x bits of resolution if you use x output pins.

For example, a 8 bit DAC can be constructed using one 74HC595, a bunch of resistors, and an op amp. Using three of them you get 24 bit color.

BOM per channel:

  • 74AHC595 (you need the speed. If you can use parallel output bus it would be even better)
  • 18 resistors
  • One op amp (1/4 of LM324)

A complete 24-bit RGB output:

  • 3x 74AHC595's
  • 54 resistors
  • One LM324
\$\endgroup\$
3
  • \$\begingroup\$ Yes, I have shift registers for each color channel in my design. Being a noob in EE, I didn't know that the resistors on the output of the ULA in each of the schematics I mentioned were actually DACs. Thanks for the answer. \$\endgroup\$
    – airman
    Sep 19, 2015 at 19:09
  • \$\begingroup\$ By the way if you are really allowing your 8-bit rig run in 24-bit color mode you will run into performance bottlenecks. Not even modern GPUs handle 24-bit color in high resolutions well. \$\endgroup\$ Sep 19, 2015 at 19:12
  • 1
    \$\begingroup\$ I will only use 8-bit color, in palette registers. No raster graphics. \$\endgroup\$
    – airman
    Sep 19, 2015 at 19:16

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.