VGA to TV driver architechture

The DOS drivers for using VGA to TV drivers have to change VGA register to make VGA card to send sync frequencies which are compatible with normal TV. For changing of the those frequencies the following thing needs to be done:

The driver program itself is a TSR (Terminate and Stay Resident) program which stays at the computer's memory when it is loaded. The driver links to BIOS video services interrupt vector INT 10h. The driver must change the function of the following services: This software driver apprach works nicely with all DOS software which uses BIOS services to set up the standard VGA mode and does not do any serious tweaking on VGA registers. This applies to most of the DOS games and even Windows 3.1 standard VGA driver. Sometimes the drivers fail to work with some exotic DOS extenders and memory manager programs.

Text modes

The VGA text modes are:

Mode    Type    Resolution      Chars   Colours
(Hex)
0,1     text    360x400         40x25   16
2,3     text    720x400         80x25   16
7       text    720x400         80x25   mono

Normally VGA text mode has 25 lines. The screen font resolution is 9x16 pixels which leads to 720x400 effective resolution. Showing this resolution in TV would need interlacing, which is not a good idea in text mode because it causes too much flickering to text on TV screen. Getting stable text display on TV involves the following things:

Because the font size is already 9x8 in 25 line VGA mode, the 43 line VGA text mode is not possible to be shown in TV screen.

Graphics modes

The VGA graphics modes are:

Mode    Type    Resolution      Chars   Colours
(Hex)
4,5     gfx     320x200         40x25   4
6       gfx     640x200         80x25   2
D       gfx     320x200         40x25   16
E       gfx     640x200         80x25   16
F       gfx     640x350         80x25   mono
10      gfx     640x350         80x25   16
11      gfx     640x480         80x30   2
12      gfx     640x480         80x30   16
13      gfx     320x200         40x25   256

Graphics with vertical resolution of less than 240 lines

VGA card is set to output non-interlaced pcture. The pixel frequency is set to half of the normal VGA pixel rate using CRT controller. Horizonal frequency and sync signal width is adjustested by changing CRTC timing registers. Vertical frequency is adjusted to suitable rate by adjusting the number of total vertical lines in te picture (black border lines are added to get 50 Hz or 60 Hz picture rate).

Vertical resolution of 480 lines

There are two ways to show 480 line display: vertical scaling and interlacing. In vertical scaling the VGA card is set to show only every other vertical line of the picture. In this way the effective number of scan lines is 240 and it can be handled as lower resolution graphics mode and shown as non-interlaced picture to TV.

To show the full vertical resolution needs use od interlacing. Interlacing in not a standard feature in standard VGA chipset but has been inmpelemented in many modern VGA chipsets. The methods how to set the interlace mode on are VGA chipset specific.

Vertical resolution of 600 lines

This resolution can be shown only on PAL TVs (actually only 580 lines are visible). This screen mode can be handled in the same way as 480 line modes.

Availability of source code

The driver is written fully in assembler and can be compiled with Turbo Assembler. The souce code of the VGA to TV driver is available only to selected group of registered devellopers. If you want to become a develloper e-mail to me for more details.


Tomi Engdahl <[email protected]>