The X on TV micro-HOWTO Marcus Priesch, marcus@priesch.at v0.2, 06 Jan 2001 How to connect your Linux box to your TV Set ------------------------------------------------------------------------------- Table of Contents: 1. Disclaimer 2. Introduction 3. Requirements 4. Hardware 5. Software 6. Tested Graphic Cards 7. Hall of Fame (who is using it) 8. Famous last words 9. Things that are really mindblasting ------------------------------------------------------------------------------- 1. Disclaimer The following document is offered as a guideline if you intend to connect your Linux box to your TV set. However if you really try this a can not give you any warranty that it will work and of course, i will not buy you a new TV or VGA Card :-) 2. Introduction The most recent version of this document can always be found at http://www.priesch.at/marcus/Linux/XonTV-micro-HOWTO This description works for PAL systems, although by modifying the modelines it will also work for NTSC. Let me know if you have been successful ! The (PAL) TV signal is basically an interlaced display operating at 50Hz with 720x576 pixels resolution. However the visible part of the picture you can see on the TV is most often limited to approx. 640x550 pixels. this may depend on the TV but as a rule of thumb you can expect this resolution. As a matter of fact the refresh rate with 25 frames per second (and 50 halfframes) is very poor. So the result will most likely flicker very much, especially vertical "one pixel" lines are very annoying. So dont' try to make your office work on the TV :). You can limit this effect if you dim the contrast, use the other colors and try to avoid having lots of one pixel lines. Maybe someone could write a filtering software for XF86 to reduce the flickering. There are such devices out there with adaptive filering techniques operating in hardware. 3. Requirements Beside the correct timing there are some other things we have to take care of: First of all this only works with TV's equipped with a SCART socket which is capable of displaying the RGB signals. Note that this is not implemented in all SCART connectors and cables which are available. Most often they have only Audio/Video inputs connected. If your TV has two SCART inputs one for TV and the other for e.g VideoDisc Players etc. you are on the safe side. Commonly the SCART sockets are named VCR for the Audio/ Video only type and AUX for the RGB inputs. On my Philips TV the VCR SCART is blue and the AUX SCART is orange. For the synchronisation we need a composite sync signal which contains both the horizonal and vertical synchronisation information. If your VGA card can generate this you can be lucky, if not, don't hesitate, there is also a solution for seperate sync's - you only need one transistor additional :) Another point is that the Amplitude of the Sync signal has to be limited somehow. The Sync from the VGA card is 5 V peak to peak and the sync input on the SCART is specified to be no more than 0.3 V peak to peak. There is an input on the SCART which is named "BLANK" this has to be set to somewhere between 1 and 3 volts so that the TV switches to RGB display. 4. Hardware You need at least these things to build a cable to connect your VGA directly to your TV: 1 SCART plug (or socket if you want to buy an extra RGB SCART cable) 1 VGA 15 pin high density sub-d connector (male) (the other end of the cable). 4 (or 5 if your card cannot suport composite sync) units of a 75 Ohm video cable. Note that instead of the last two items you can also take a VGA Monitor cable with BNC connectors and cut them off. 1 Resistor 680 Ohms for the Sync signal level adaption. 1 Diode (e.g. 1N4148) \ > this is for the generation of the BLANK signal. 1 Capacitor 100 uF / Additionally for the generation of the composite sync signal you need 1 npn Transistor BC548 1 Resistor 3 kOhms Glue all this togehter as shown in the following drawing: VGA card: SCART Red o---------------------------------------------------o Red (15) Red Ground o---------------------------------------------------o Red Ground (13) Green o---------------------------------------------------o Green (11) Green Ground o---------------------------------------------------o Green Ground (9) Blue o---------------------------------------------------o Blue (7) Blue Ground o---------------------------------------------------o Blue Ground (5) For Csync operation: 680 Ohms H/CSync o-------o---------------------/\/\/\----------------o Vin (20) | | 1N 4148 | |\ | ----| >|------o----------------------------o Blank (16) |/ | | | + ----- 100uF ----- | --o Blank Ground (18) | | H/CSync Ground o----------------------o-------------------------o--o Vout Ground (17) alternatively, if your card can_not_ generate a CSync signal: 680 Ohms HSync o-------------------- _ ----------/\/\/\--------o Vin (20) c \ /|e \ / ------- b| BC 548 *) | 3 kOhms | VSync o---o------/\/\/\------- | | 1N 4148 | |\ | --------| >|------o----------------------------o Blank (16) |/ | | | + ----- 100uF ----- HSync Ground o-- | --o Blank Ground (18) | | | VSync Ground o--o-------------------o-------------------------o--o Vout Ground (17) *) bottom view of a BC548 in TO92 package: ----------- / \ | | | o o o | | c b e | \ / \ / \__ __/ - not so easy to draw, but i hope this is clear :-) 5. Software Besides all this you need the right software to set the timing of your VGA card, but if you wouldn't already use the right software, maybe you would not read this ;-) Well, this all works well for XF86 ... i assume in all versions. Things to be taken care of when editing XF86Config: HorizSync 15.0-115.0 # has to start at 15.0 kHz VertRefresh 50.0-160.0 # has to start at 50 Hz The Modeline for general PAL video mode timing is Modeline "720x576i" 13.5 702 722 785 864 576 580 584 625 interlace Composite -csync for VGA cards capable of generating composite sync and Modeline "720x576i" 13.5 702 722 785 864 576 580 584 625 interlace -hsync -vsync for the others. Note that -hsync and -vsync is mandatory because otherwise the circuit is not working. The Modeline for my TV which covers only the visible portion of the display is Modeline "640x545" 13.5 640 702 756 864 545 568 572 625 interlace composite Note that if you double the clockspeed you get 100Hz interlaced and can view this on your VGA monitor. 6. Tested Graphic Cards The following cards are proven to work by me: o ATI Mach64 GB (rev 92) which is capable of generating a composite sync. o Tseng'Lab ET4000W32P rev C (rev 0) which cannot generate a composite sync. 7. Hall of Fame (who is using this) At the moment the only person i know of is myself, but maybe this will change in the future ! 8. Famous last words Well, thanks to all those great guys for the great Linux operating system and all the great and cool free software projects out there ! - Thank You. I would be very pleased if you have some suggestions, remarks, etc. on this "micro" HOWTO, sorry for the english, and feel free to send any comments, flames, cheques, etc to marcus@priesch.at. Hope this can be useful for anyone ... marcus. 9. Things that are really mindblasting o run XMMS with your favourite skin in double size with equalizer on your TV and control it with your Remote control via IRman :) o run windows in vmware on your tv using winword to write a mail to your friend o run xpilot on your tv with friends all over the world o or just watch the matrix screensaver :) o try the modeline with SVGATextmode (YEAH, interlaced texmode with 50 Hz !)