VGATV Version 2.0

By Paulo Sergio Coelho, 1997

Taken from Paulo Sergio Coelho's VGA to TV driver documentation and converted to HTML format by Tomi Engdahl with permission from Paulo Sergio Coelho.

The program

This program allows you to use your TV as a monitor, given that you use the proper hardware to connect your VGA to the output equipment.

The driver is a TSR (Terminate and Stay Resident) which will try to make sure your VGA card is, at all times, properly programmed for TV timings, which are quite different from VGA standards:

There will be programs which won't work well, others won't work at all, because they either use an unsupported video mode, or program the video card directly.

For this to work, you need the following:

Optionally, you can also have this:

The limitations

Humm, right. As stated above, besides the occasional badly-behaved program, this driver comes with guaranteed limitations:

With PAL timings, only resolutions up to 800x600 can be fully viewed. With NTSC this figure goes down to 640x480, thanks to the lower resolution of this TV standard (525 horizontal lines, as opposed to PAL's 625). Note that these resolutions are available in ALL VGA cards.

Since there are obvious limitations on the number of lines, modes that have more than 525/625 lines, use the trick described below, in which the resolution is actually halved, though for most purposes, it doesn't show much. Only if you're trying to display text, you might run into trouble if the pitch is too small. However, for photographs or most drawings, there isn't a noticeable decrease in resolution.

In order to get the correct aspect ratio of the screen modes, the maximum resolution in PAL is 1600x1280 and in NTSC 1280x1024. Resolution is halved in modes 1024x768 and above, in both PAL and NTSC, but NTSC has much more overscan than PAL. Resolution is also halved in unsupported chipsets at 640x480 and above resolutions, if they aren't interlaced originally.

Because standard VGA has no support for interlaced screen modes, a trick has to be employed to get the visible area of a video mode in the screen at all times. This, however, implies that every other line in the screen will be missing, namely, the odd numbered lines (1,3,5,...). While this doesn't affect images and drawings much, text is a pain to read. Fortunately, your VGA card's chipset may be supported by the program, thus allowing you to have an interlaced screen and no missing lines.

Also, the program is clever enough to, under certain conditions, support non-standard VGA modes while not supporting any specific chipset. This depends on the fact that some modes on some boards, specifically turn on interlacing so that the driver doesn't have to do it, and you can see a 1280x1024 mode even if the driver doesn't actually support your board. If the mode has more than 600 lines, and doesn't turn on interlacing, only part of the screen will be shown, full-screen, but stretched downwards. Also, depending on how the program sets the dot-clock, some modes might not sync, while others, higher resolution ones, might do. 800x600 is a general culprit...

There is no limit about colours, though some boards, due to the way they program the card, might not allow us to see 640x480 at 16.7Mcolours, or more than 800x600 at 64K/32K colours. Others do, however!

Note that screen modes which have less than 300 lines, don't need interlacing, thus are fully viewable, with no lines missing. This includes all low resolution modes, such as mode 13h (320x200 with 256 colours).

Text modes are limited to 32 lines, but there is no limitation on width. Currently, modes 40x25, 80x25 and 132x25 are supported since I know of none other. If they appear, there might be a chance that the program does recognize them. Modes with more than 25 (or 30, if your card has 30-line modes) won't show more than 32 lines at one time. The remaining lines aren't shown.

Also, some programs reprogram text mode fonts (namely those from PC Tools, Norton Utilities, and others), which may have nasty effects when you get back to DOS. If the screen is corrupted on exit, try resetting the screen by pressing Ctrl+Alt+R.

200-line modes are not interlaced. I tried to, but it seemed impossible, at least on the Oak 087 chipset. Anyway, as it is, the screen is much stabler, since there is no interlacing.

The hardware

First, there's the the original VGA->SCART project, by Tomi Engdahl. This circuit is in HTML format, in http://www.hut.fi/~then/circuits/vga2tv.html, which contains help, hints, schematics (proper drawings), even a picture of one PCB, plus drivers. My ASCII version wouldn't make justice to the schema- tics on that page, so you'll have to check there for them. I'll have enough trouble to place my own circuit design here...

Anyway, about the SCART version. SCART has an RGB input, therefore it's much better than the composite video version. Remember however, that what you see on your everyday TV broadcast, is truly composite video, so it's not that bad. Except RGB is even better. However, composite has other advantages, such as:

I've got the composite way because of issues number 1 and 2. I don't have SCART equipment at hand, and I would like to get the output recorded at some time, so, despite the more complicated design, I've chosen this way. This driver however, will work no matter the output device.

On my circuit, I used a simplified version of Tomi Engdahl's VGA->SCART circuit, to get composite sync, so, some credit must go to him. I also based the design heavily on Motorola's MC1377 datasheet, using more or less the same components, with mostly the same values. You should see this datasheet if in doubt. Check out http://motserv.indirect.com/cgi-bin/dlsrch, and follow on-screen instructions.

You can (and probably should) build an RGB circuit around another chip. I know of 2: Analog Devices AD722/AD724, which is a chip as simple as it gets, allowing S-VHS output, easily (unlike the MC1377, which requires yet more circuitry for this), and Sony's CXA1645, which is a bit more complicated than the AD722/AD724, but has RGB passthrough, allowing RGB signals to feed the chip and go on to something else in the board (like a SCART output).

The circuit is comprised of 3 parts: the circuit box itself, a cable going to the outside the case plugged into the VGA output, and another cable which goes from the circuit box to the input equipment. This cable also plugs on the circuit box (and is not soldered to the circuit's PCB as the other cable). You can, of course, do it your own way.

Outside component list:

  1 DB15P male VGA plug
  1 multi-wire cable (I used 8 wires+shield) to connect the VGA to the circuit
    box.
  1 box (metalic is better, though a plastic one is cheaper, and it's the one
    I also used). This holds the circuit. The box is 13cm x 5.5cm x 2.5 cm
    (W x D x H).
  1 female panel-mountable RCA plug
  1 male PCB mountable DC socket
  2 male RCA plugs (for the connecting cable)
  1 75� cable, to connect the box to the input equipment. You can probably get
    one of these in a shop somewhere. In that case, disregard the 2 male RCAs
    above. I used a 50� cable (by mistake), but it's quite okay. Just don't
    use plain audio cable for this. It's AWFUL...
  1 12VDC power supply. The circuit I made is only regulated for 5V. The chip
    itself (MC1377) has an internal 8.5V regulator. Thus, you can plug in from
    about 10V to 14V, unregulated power supply. This means a 9VDC transformer
    can be used. I do. The chip needs 60mA maximum, but I haven't determined
    the entire circuit supply current needs.

The inside component list is comprised of:

  1 Motorola MC1377P chip
  1 DIP-20 socket, for the chip
  1 7805 5V PS regulator
  2 BC547 transistors
  1 Philips 330ns delay-line. These are H-A-R-D to find. Motorola suggests a
    400ns delay line, though it seems 330ns are more common here in Europe.
    Best place to look for one of these things, is inside a TV. The Philips
    one is green, and about the size of your thumb (1 inch). I have seen 3 so
    far, including the one I have. I have seen 2 other, being used in 2
    Elektor Magazine projects. You can try your local TV repair shop. Beware
    that some folks don't even know what this is, so be patient...
    The impedance on these delay lines is 1K�. Motorola advises that it falls
    between 1K� and 1.5K�.
  1 chroma bandpass transformer. This one's a little hard to tell what it is.
    If you don't know diddley about this, it's one of those things inside the
    TV that you turn round and around, which have a lot of wires around them.
    About 1 cm high. For details on skiping this, refer to the MC1377P
    datasheet. But you can probably get one of your electronics-skilled
    friends to built one for you. Here's the details.

    The transformer itself is 15mm high, plus 3.5mm for the pins, which are
    0.7mm in diameter. Has 2 windings, and each one takes 60 turns of #38 AWG
    wire (0.1 m/m).
    Unloaded Q (Pins 1-3): 15 @ 2.5Mhz. Inductance: 30�H � 10% @ 2.5Mhz.

    Bottom view:
      ___________
     /           \
    � 3 -\   /-4 � --------
    �    /   \   �      ^
    � 2  \ S / S �    7 � 0.2mm
    �    /  /    �      v
    � 1 -   \- 5 � --------
     \___________/

  1 4.43Mhz crystal, just like the ones found on TVs. 4.43Mhz is the PAL color
    carrier frequency. NTSC is 3.58Mhz, so you should get the appropriate one
    for you.

  Resistors:

  1 trimmer, 47Kohm
  4 75ohm
  3 47ohm
  3 1.8Kohm
  1 2.7Kohm
  1 33Kohm
  1 3.3Kohm
  2 1Kohm
  1 220ohm

  Capacitors:

  1 trimmer 5pF-25pF (doesn't matter much, get one around this)
  1 100uF, 16V (or more V)
  1 10uF, 25V
  4 100nF
  1 12pF
  2 1nF
  2 10nF
  2 180pF
  1 33pF (NTSC: 47pF)
  1 62pF (NTSC:100pF)
  3 22uF
Now, follows 3 parts of the circuit, which should be joined together in the end.

Power Supply

Power supply circuit diagram

Composite Sync

Sync combiner circuit

Application Circuit

PAL encoder circuit diagram

The contacts

If you want to share some comments on this, suggestions, criticism, chipset programming details on unsupported cards, post-cards, money, etc, just write to:

e-mail : [email protected]

or,

  snail-mail : Paulo Srgio Coelho
               Rua Luis de Cames, 25
               Pateiro
               8400 Lagoa
               Portugal
Please note that mail-bombs will be returned to sender. No kidding.

The legal juice

Ok, so you find this little piece of software useful.

Very well, you can use it, at your OWN risk, meaning if you blow up the TV, the VCR or your room, I really don't give a damn, it was YOUR fault, NOT mine. Same thing for the hardware description. So there.

Also, this software may be copied, used and abused, but nowhere modified. This includes not only the executable, but also this DOC file, which should always be present with the executable.

Additionally, you can consider this work, one of the following:

Ok, I think this one's done. Next!

The contributions

All right, here's a bunch of thanks for the folks which have a piece in this.

and other people who also contributed to the project.

Thanks to you all!