Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
Introduction to SVGA
A long time ago, IBM defined the first video standards, MDA (monochrome), CGA, EGA and the
MCGA. In 1987 the VGA was released. As the computer market grew, more video card
manufactures created hi-res cards. However, they were not created after any kind of standard.
640x480x256, for example, had, and still has, number 32h on one card, 63h on another and 45h
on a third. That was not all, the bank size (refer section 4) differed, they were overlapping... You
get the picture, NO STANDARD!
Programmers therefore had to write several different drivers for each and every card, and ask the
computer or the user what driver to use. The manufacturers got together and created the Video
Electronics Standards Association (VESA). VESA defined a new standard so that programmers
just had to write a single set of graphic routines. They called it VESA VBE (VESA Video Bios
Extensions), and has nothing to do with VESA Local Bus, witch also is a standard from the same
group about a completely other hardware problem.
To become a good SVGA programmer one should know all the information about the following
items.
1. Video Buffer
The video buffer is the location where the graphic information is stored. Its address is
0xA000:0000- 0xA000:FFFF. All the information we see on the computer screen is actually
stored in this buffer.
2. The interrupt 0x10h
All the ROM-BIOS video services so called VESA interrupts are performed using the interrupt
0x10 with sub function 4F(AH=4F).All functions return 004F in AX if they are successful. The
sub function value is stored in AL register.
Sub function 00 - get VESA information
Sub function 01 - get VESA mode information
Sub function 02 - set VESA video mode
Sub function 03 - get current video mode
Sub function 04 - save/restore VESA video state
Sub function 05 - bank switching
Sub function 06 - get/set logical scan line length
Sub function 07 - get/set display start
Sub function 08 - get/set DAC palette control
3. Video Modes:
Mode Resolution Colors Banks Memory
00h
640x400
256
256Kb
101h 640x480
256
320Kb
102h 800x600
16
256Kb
103h 800x600
256
512Kb
104h 1024x768 16
192Kb
12
768Kb
106h 1280x1024 16
10
0.7Mb
20
1.3Mb
108h 80x60
text
109h 132x25
text
10Ah 132x43
text
10Bh 132x50
text
10Ch 132x60
text
10Dh 320x200
32k
128Kb
10Eh 320x200
64k
128Kb
10Fh 320x200
16.8M 3
192Kb
110h 640x480
32k
10
0.7Mb
111h 640x480
64k
10
0.7Mb
112h 640x480
16.8M 15
1.0Mb
113h 800x600
32k
15
1.0Mb
114h 800x600
64k
15
1.0Mb
115h 800x600
16.8M 22
1.4Mb
24
1.5Mb
24
1.5Mb
2.3Mb
40
2.5Mb
40
2.5Mb
3.7Mb
Offset
0
2
3
4
6
8
Size(Bytes)
2
1
1
2
2
2
Description
Mode Attributes
Window A attributes
Window B attributes
Window granularity
Window size
Segment address of Window A
WinBSegment
WinFuncPtr
BytesPerScanLine
XResolution
YResolution
XCharSize
YCharSize
NumberOfPlanes
BitsPerPixel
NumberOfBanks
MemoryModel
BankSize
NumberOfPages
Reserved1
RedMaskSize
RedMaskPosition
GreenMaskSize
GreenMaskPosition
BlueMaskSize
BlueMaskPosition
ReservedMaskSize
ReservedMaskPosition
DirectScreenModeInfo
Reserved2
10
12
16
18
20
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
2
4
2
2
2
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
216
Byte 2
Pixel 2
Byte 3
Byte 4
Byte 5
Byte 6
Byte 1
RRRRRGGG GGGBBBBB
When it is put in memory it looks like this:
Pixel 1
Byte 1
Pixel 2
Byte 2
Byte 3
Byte 4
Byte 1
0RRRRRGG GGGBBBBB
Pixel 1
Byte 1
Pixel 2
Byte 2
Byte 3
Byte 4
Address port
3C4h
3B4h
3D4h
--------3CEh
3C0h
-----
Data port
3C5h
3B5h
3D5h
3C2h,3CCh
3C2h,3CCh
3CFh
3C1h
3C8h,3C9h