PAL signal from VGA card

"...Imagination is more important than knowledge.
Knowledge is limited. Imagination encircles the world..."

There are quite a lot of ways to generate TV signal from our PC's, these include graphics card having TV-out built in, converters from VGA to PAL, and simple cables with some glue logic to generate synchronisation to convert VGA to EURO connector. But people do not know that it's really possible to generate video signal without any hardware. Simply output TV signal from ordinal VGA card in our PC.

It's not a hoax! By adjusting VGA timings and drawing images in a special way we may convince our TV that it's receiving normal video signal on it's luminance (or composite) input.

Theory of operation

We may look at VGA card as a very fast DAC converter with adjustable generation frequency and 8-bit resolution. By careful adjustment of DAC timing and by using special image we may force VGA card to generate PAL TV signal on any of it's R, G, B channels. Yes! it is possible to generate 3 different images to 3 different TV sets using only ONE graphics card! and without any specialised hardware in between!

Each of R, G, B channels is 0,7V p-p with 75R impedance, while composite signal is 1V p-p with 75R impedance. VGA channels have smaller range but it's still enought to generate video. Voltages from 0 (sync) to 0.3V are used for synchronisation, while 0.3 (black) to 0.7 (white) V are for drawing actual image.


I had an old VGA cable which I've divided into 2 parts and old EURO SCART cable. Unfortunetly, my TV does not have composite input so I had little choice. I've connected R signal from VGA connector to Video IN signal from TV. No additional glue logic is neccessary, that's all - just solder two cables!

EURO scart connector VGA connector
Pin 20 (VIDEO input) -----------------------
Pin 1 (RED output)
Pin 17 (VIDEO ground) ----------------------
Pin 6 (RED gnd)
Pin 11 (ID1) ---- Pin 5 (GND)
Connection schematics


It's very handy to have dedicated linux machine with network access to it. My $10 server (which I've used for this) have no monitor connected, vga card built-in and network access. Using same machine as a workstation and test station would be too harmfull.

First step is to configure video timings for X server. This can be done by editing /etc/X11/xorg.conf and inserting special modeline that will force VGA card to work on a neccessary frequency.

part of my /etc/X11/xorg.conf
Section "Monitor"
Identifier "TV"
HorizSync 11.5 - 82.0
VertRefresh 19-155
Modeline "MaxTV" 17.734475 1125 1125 1134 1135 623 623 624 625

Section "Device"
Identifier "rage"
Driver "ati"
Option "SWcursor"

Section "Screen"
Identifier "Screen 1"
Device "rage"
Monitor "TV"
DefaultDepth 16
Subsection "Display"
Depth 16
Modes "MaxTV"
ViewPort 0 0

Section "ServerLayout"
Identifier "Simple Layout"
Screen "Screen 1"
InputDevice "Keyboard1" "CoreKeyboard"

Magical modeline numbers have their sense. First, dotclock, 17.734475 (MHz), is the frequency at which our VGA card will output pixels. This value was choosen as it's four times PAL color frequency 4.4297125. 1135 and 625 is the full resolution of generated image. 625 was taken because there are exactly 625 lines in single PAL frame. Not all are visible on the screen. Note that not all 1135x625 area area is accessible - some lines are used for vertical and horizontal retrace. Unfortunetly, we'are not able to generate signal in these lines. 1135 was chosen as a horizontal resolution because: 17734475 [Hz] divided 625 [PAL_lines] divided by 25 [PAL frames per second] is almost exactly 1135. As a result, our card is generating frames at 25,00014 [Hz] rate. If this resolution will not work for you, try to play with horizontal resolution and dot clock. Leave number of lines untouched.

Logged fragment form X startup:
jakub@jan$ cat /var/log/Xorg.0.log | grep -A 5 -B 5 MaxTV
(II) ATI(0): Not using default mode "1024x768" (height too large for virtual size)
(II) ATI(0): Not using default mode "1024x768" (height too large for virtual size)
(II) ATI(0): Not using default mode "1024x768" (height too large for virtual size)
(II) ATI(0): Not using default mode "832x624" (height too large for virtual size)
(--) ATI(0): Virtual size is 1128x623 (pitch 1152)
(**) ATI(0): *Mode "MaxTV": 17.7 MHz, 15.6 kHz, 25.0 Hz
(II) ATI(0): Modeline "MaxTV" 17.73 1125 1125 1134 1135 623 623 624 625
(**) ATI(0): Default mode "800x600": 56.3 MHz, 53.7 kHz, 85.1 Hz
(II) ATI(0): Modeline "800x600" 56.30 800 832 896 1048 600 601 604 631 +hsync +vsync
(**) ATI(0): Default mode "800x600": 49.5 MHz, 46.9 kHz, 75.0 Hz
(II) ATI(0): Modeline "800x600" 49.50 800 816 896 1056 600 601 604 625 +hsync +vsync
(**) ATI(0): Default mode "800x600": 50.0 MHz, 48.1 kHz, 72.2 Hz

Next step is to get an image which will contain all neccessary PAL signals included. You may try this image if you were able to successfully setup the same resolution as I do, or try this package to generate image by yourself. You have to be a little familiar with C and programming to generate it by yourself. You may compile and run it with command:
    gcc -lm vidgen.c -o vidgen && ./vidgen

Next we need to display generated image on X screen:
    display -window root first.bmp

Voileau, if everything went ok you should be able to see an image no your TV.

Jakub Trznadel (trznadelj at o2 dot pl)

Author of this page does not provide any warranty that method above will work with all graphics cards or TV sets. Use it at your own risk. Color generation is possible but was not tested due to hardware limitations.