Purpose:
To provide a standardized software interface for Super VGA adapters, so that simple software applications can make use of the capabilities of advanced VGA adapters.
Overview:
This standard provides a set of functions that applications can use.
1. To obtain the compatibility of a specified Super VGA device and its unique features.
2. To control hardware operations such as display modes, initialization, and video memory access.
These functions are provided as extensions to the VGA BIOS video services, accessed through interrupt 10h.
Contents:
1. Introduction
2. Goals and objectives
2-1. Video environment information
2-2. Programming support
2-3. Compatibility
2-4. The status of the standard
3. Standard VGA BIOS
4. Super VGA mode numbers
5. CPU video memory control
5-1. Hardware design considerations
5-1-1. Limited by the CPU's 64K/128K address space
5-1-2. Crossing CPU video memory window boundaries
5-1-3. Processing data from different regions
5-1-4. Combining data from different windows
5-2. Different types of hardware windows
5-2-1. Single-window systems
5-2-2. Dual-window systems
6. Extended VGA BIOS
6-1. Status information
6-2. 00h - Return Super VGA information
6-3. 01h - Return Super VGA mode information
6-4. 02h - Set Super VGA mode
6-5. 03h - Return Super VGA mode
6-6. 04h - Save/restore Super VGA state
6-7. 05h - Super VGA video memory window control
6-8. 06h - Set/get logical scan line length
6-9. 07h - Set/get display start
6-10. 08h - Set/get DAC palette control
7. Application examples
------------------------------------------------------------------------------------------
1. Introduction
This document contains the specification of a standardized interface for extended VGA video modes and functions. It consists of the following structure: standard extended video modes and functions approved by the main VESA committee, as well as non-standard video modes. This allows independent VGA vendors to add the use of extended VGA to applications in a unified manner, by ignoring the need to understand the complex details unique to each VGA hardware implementation.
The subject of this document is to define the need for application software to understand the characteristics of extended VGA video modes and to manipulate the extended memory associated with those video modes.
Readers of this document should already have some understanding of VGA programming at the hardware level and INTEL iAPX real-mode assembly language. Readers unfamiliar with VGA programming should first read the many existing VGA programming tutorials before attempting to understand standard VGA extensions.
2. Goals and objectives
In the PC graphics world, IBM VGA has become the de facto standard. The various existing VGA vendors on the market all ensure compatibility with IBM VGA in terms of BIOS and registers. More and more VGA-compatible products have produced various VGA extensions. These extensions offer higher resolutions, more colors, and some graphics processing capabilities. Fierce competition has improved price/performance, and the end users have benefited.
However, software developers intending to take advantage of the new benefits of the Super VGA environment face some serious problems. Because there is no standard hardware, they have to deal with all kinds of different Super VGA hardware architectures. The lack of a general software interface leads to high costs in designing related software, and it is also technically very difficult. Aside from the VGA products provided by OEMs, there are hardly any VGA products whose powerful features can actually be used by software.
The introduction of the VESA VGA BIOS Extensions is precisely to make up for this deficiency. As a general software interface for Super VGA graphics products, its main purpose is to enable application software and system software to adapt to and exploit the rich features found in the broad range of VGA extensions.
Specifically, the VESA BIOS Extensions are meant to solve the following problems:
1. Return video environment information to applications.
2. Help applications initialize and program the hardware.
2-1. Video environment information
Even now, there is still no standard software mechanism to determine what kind of Super VGA hardware a program is running on. The existence of a display adapter can only be known through OEM-specific product features. This is usually done by reading and testing the I/O ports unique to each OEM vendor. If the hardware environment is unknown, very few (if any) low-level hardware features can be used.
The VESA BIOS Extensions provide some functions for returning information about the video environment. These functions return system information such as detailed data about display modes. Function 00h returns general system-level information, including an OEM identification string. The function also returns a pointer to the supported display modes. Function 01h can be used to obtain detailed information about each supported display mode. Function 03h returns the current display mode.
2-2. Programming support
Because different Super VGA products have different hardware architectures, it is difficult for software to adapt to every environment. But since they are all based on the VGA hardware architecture, the differences mainly lie in display mode initialization and memory mapping. The rest of the architecture is usually not touched, including I/O-mapped registers, the placement of the video buffer in CPU address space, and the location and functions of the DAC.
The VESA BIOS Extensions provide interface functions for different Super VGA hardware devices. The most important is function 02h, which sets the Super VGA display mode. This function frees the application from the monotonous and complicated process of setting display modes. Function 05h provides an interface to the underlying memory mapping hardware. Function 04h allows an application to save and restore Super VGA state without needing to understand any implementation details.
2-3. Compatibility
One major design goal of the VESA BIOS Extensions is to ensure maximum compatibility with the standard VGA environment. Yet it is impossible for BIOS to sacrifice performance in order to achieve compatibility. Another point is to make only minimal modifications to existing VGA BIOS. As with ROM-based devices, RAM-based extensions should also be possible.
2-4. The status of the standard
The purpose of the VESA BIOS Extensions is to provide support for the extended VGA environment. Therefore the underlying hardware is assumed to be VGA. Graphics software should drive Super VGA the same way it drives standard VGA: for example, directly writing to the VGA frame buffer, operating graphics control registers, and directly setting the palette. The hardware need not perform major graphics processing. For this reason, the VESA BIOS Extensions do not provide any graphics output functions, such as bit block transfer, line drawing, or circle drawing.
The restrictions on VESA BIOS Extension functions are due to the very limited ROM space available in existing BIOS devices.
Outside the VESA BIOS Extensions, there are also operations and timings for different monitors. These things are covered in other VESA forums. The purpose of the VESA BIOS Extensions is to provide a standard software interface to Super VGA graphics modes, independent of monitor and monitor timing issues.
3. Standard VGA BIOS
The design goal of the VESA BIOS Extensions is to minimize their impact on the standard VGA BIOS. The functions of the standard VGA BIOS should be modified as little as possible. This is because ROM extensions may exist.
However, two standard VGA BIOS functions are affected by the VESA extensions. They are function 00h (set display mode) and function 0Fh (read current video state). Programs using VESA will not use VGA BIOS function 00h to set the display mode, nor will they use function 0Fh. Instead they use VESA function 02h (set Super VGA mode) and 03h (get Super VGA mode).
To make programs work, VESA recommends that the return value of function 0Fh in the VESA BIOS Extensions (as determined by the OEM) be used with VGA BIOS function 00h to reinitialize the display mode. In this way, the BIOS will effectively record the most recent Super VGA mode.
It is recommended (but not required) that output functions (such as TTY output, scrolling, plotting, etc.) be supported in Super VGA modes. If the BIOS extension does not support these functions, then bit D2 (output function support) in the mode attributes field (returned by VESA BIOS function 01h) will be cleared.
4. Super VGA mode numbers
Standard VGA mode numbers are 7 bits, currently ranging from 00h to 13h. OEMs may define extended display modes in the range 14h-7Fh. The range 80h-FFh cannot be used, because VGA BIOS function 00h (set display mode) uses the seventh bit as a flag indicating whether video memory should be cleared.
Because of the 7-bit limitation on mode numbers, VESA display mode numbers are 15 bits wide. Their values are passed through register BX to VESA BIOS function 02h (set Super VGA mode) to initialize a Super VGA mode.
The format of a VESA mode number is as follows:
D0-D8 mode number
If D8 is 0, it is not a VESA-defined mode
If D8 is 1, it is a VESA-defined mode
D9-D14 reserved by VESA for future expansion (set to 0)
D15 reserved (set to 0)
Therefore, VESA mode numbers start from 100h. This numbering scheme effectively makes standard VGA mode numbers and OEM mode numbers part of the VESA mode number space. This means ordinary VGA display modes can also be set through VESA BIOS function 02h by putting the mode number into BL and clearing the high byte BH. OEM-defined modes can be initialized in the same way.
As an exception, VESA defines the 7-bit mode number 6Ah to represent the 800x600, 16-color, 4-plane display mode. The corresponding 15-bit mode number is 102h.
The following VESA mode numbers have already been defined:
Graphics Text
15-bit mode number 7-bit mode number Resolution Colors 15-bit mode number 7-bit mode number Columns Rows
------------------------------------------------------------------------------------------
100h --- 640x400 256 108h --- 80 60
101h --- 640x480 256
109h --- 132 25
102h 6Ah 800x600 16 10Ah --- 132 43
103h --- 800x600 256 10Bh --- 132 50
10Ch --- 132 60
104h --- 1024x768 16
105h --- 1024x768 256
106h --- 1280x1024 16
107h --- 1280x1024 256
10Dh --- 320x200 32K 1:5:5:5
10Eh --- 320x200 64k 6:5:5
10Fh --- 320x200 16.8M 8:8:8
110h --- 640x480 32K 1:5:5:5
111h --- 640x480 64K 6:5:5
112h --- 640x480 16.5M 8:8:8
113h --- 800x600 32K 1:5:5:5
114h --- 800x600 64K 6:5:5
115h --- 800x600 16.5M 8:8:8
116h --- 1024x768 32K 1:5:5:5
117h --- 1024x768 64K 6:5:5
118h --- 1024x768 16.5M 8:8:8
119h --- 1280x1024 32K 1:5:5:5
11Ah --- 1280x1024 64K 6:5:5
11Bh --- 1280x1024 16.5M 8:8:8
11Ch --- 1600x1200 256
11Dh --- 1600x1200 32K unverified
11Eh --- 1600x1200 64K unverified
To provide a standardized software interface for Super VGA adapters, so that simple software applications can make use of the capabilities of advanced VGA adapters.
Overview:
This standard provides a set of functions that applications can use.
1. To obtain the compatibility of a specified Super VGA device and its unique features.
2. To control hardware operations such as display modes, initialization, and video memory access.
These functions are provided as extensions to the VGA BIOS video services, accessed through interrupt 10h.
Contents:
1. Introduction
2. Goals and objectives
2-1. Video environment information
2-2. Programming support
2-3. Compatibility
2-4. The status of the standard
3. Standard VGA BIOS
4. Super VGA mode numbers
5. CPU video memory control
5-1. Hardware design considerations
5-1-1. Limited by the CPU's 64K/128K address space
5-1-2. Crossing CPU video memory window boundaries
5-1-3. Processing data from different regions
5-1-4. Combining data from different windows
5-2. Different types of hardware windows
5-2-1. Single-window systems
5-2-2. Dual-window systems
6. Extended VGA BIOS
6-1. Status information
6-2. 00h - Return Super VGA information
6-3. 01h - Return Super VGA mode information
6-4. 02h - Set Super VGA mode
6-5. 03h - Return Super VGA mode
6-6. 04h - Save/restore Super VGA state
6-7. 05h - Super VGA video memory window control
6-8. 06h - Set/get logical scan line length
6-9. 07h - Set/get display start
6-10. 08h - Set/get DAC palette control
7. Application examples
------------------------------------------------------------------------------------------
1. Introduction
This document contains the specification of a standardized interface for extended VGA video modes and functions. It consists of the following structure: standard extended video modes and functions approved by the main VESA committee, as well as non-standard video modes. This allows independent VGA vendors to add the use of extended VGA to applications in a unified manner, by ignoring the need to understand the complex details unique to each VGA hardware implementation.
The subject of this document is to define the need for application software to understand the characteristics of extended VGA video modes and to manipulate the extended memory associated with those video modes.
Readers of this document should already have some understanding of VGA programming at the hardware level and INTEL iAPX real-mode assembly language. Readers unfamiliar with VGA programming should first read the many existing VGA programming tutorials before attempting to understand standard VGA extensions.
2. Goals and objectives
In the PC graphics world, IBM VGA has become the de facto standard. The various existing VGA vendors on the market all ensure compatibility with IBM VGA in terms of BIOS and registers. More and more VGA-compatible products have produced various VGA extensions. These extensions offer higher resolutions, more colors, and some graphics processing capabilities. Fierce competition has improved price/performance, and the end users have benefited.
However, software developers intending to take advantage of the new benefits of the Super VGA environment face some serious problems. Because there is no standard hardware, they have to deal with all kinds of different Super VGA hardware architectures. The lack of a general software interface leads to high costs in designing related software, and it is also technically very difficult. Aside from the VGA products provided by OEMs, there are hardly any VGA products whose powerful features can actually be used by software.
The introduction of the VESA VGA BIOS Extensions is precisely to make up for this deficiency. As a general software interface for Super VGA graphics products, its main purpose is to enable application software and system software to adapt to and exploit the rich features found in the broad range of VGA extensions.
Specifically, the VESA BIOS Extensions are meant to solve the following problems:
1. Return video environment information to applications.
2. Help applications initialize and program the hardware.
2-1. Video environment information
Even now, there is still no standard software mechanism to determine what kind of Super VGA hardware a program is running on. The existence of a display adapter can only be known through OEM-specific product features. This is usually done by reading and testing the I/O ports unique to each OEM vendor. If the hardware environment is unknown, very few (if any) low-level hardware features can be used.
The VESA BIOS Extensions provide some functions for returning information about the video environment. These functions return system information such as detailed data about display modes. Function 00h returns general system-level information, including an OEM identification string. The function also returns a pointer to the supported display modes. Function 01h can be used to obtain detailed information about each supported display mode. Function 03h returns the current display mode.
2-2. Programming support
Because different Super VGA products have different hardware architectures, it is difficult for software to adapt to every environment. But since they are all based on the VGA hardware architecture, the differences mainly lie in display mode initialization and memory mapping. The rest of the architecture is usually not touched, including I/O-mapped registers, the placement of the video buffer in CPU address space, and the location and functions of the DAC.
The VESA BIOS Extensions provide interface functions for different Super VGA hardware devices. The most important is function 02h, which sets the Super VGA display mode. This function frees the application from the monotonous and complicated process of setting display modes. Function 05h provides an interface to the underlying memory mapping hardware. Function 04h allows an application to save and restore Super VGA state without needing to understand any implementation details.
2-3. Compatibility
One major design goal of the VESA BIOS Extensions is to ensure maximum compatibility with the standard VGA environment. Yet it is impossible for BIOS to sacrifice performance in order to achieve compatibility. Another point is to make only minimal modifications to existing VGA BIOS. As with ROM-based devices, RAM-based extensions should also be possible.
2-4. The status of the standard
The purpose of the VESA BIOS Extensions is to provide support for the extended VGA environment. Therefore the underlying hardware is assumed to be VGA. Graphics software should drive Super VGA the same way it drives standard VGA: for example, directly writing to the VGA frame buffer, operating graphics control registers, and directly setting the palette. The hardware need not perform major graphics processing. For this reason, the VESA BIOS Extensions do not provide any graphics output functions, such as bit block transfer, line drawing, or circle drawing.
The restrictions on VESA BIOS Extension functions are due to the very limited ROM space available in existing BIOS devices.
Outside the VESA BIOS Extensions, there are also operations and timings for different monitors. These things are covered in other VESA forums. The purpose of the VESA BIOS Extensions is to provide a standard software interface to Super VGA graphics modes, independent of monitor and monitor timing issues.
3. Standard VGA BIOS
The design goal of the VESA BIOS Extensions is to minimize their impact on the standard VGA BIOS. The functions of the standard VGA BIOS should be modified as little as possible. This is because ROM extensions may exist.
However, two standard VGA BIOS functions are affected by the VESA extensions. They are function 00h (set display mode) and function 0Fh (read current video state). Programs using VESA will not use VGA BIOS function 00h to set the display mode, nor will they use function 0Fh. Instead they use VESA function 02h (set Super VGA mode) and 03h (get Super VGA mode).
To make programs work, VESA recommends that the return value of function 0Fh in the VESA BIOS Extensions (as determined by the OEM) be used with VGA BIOS function 00h to reinitialize the display mode. In this way, the BIOS will effectively record the most recent Super VGA mode.
It is recommended (but not required) that output functions (such as TTY output, scrolling, plotting, etc.) be supported in Super VGA modes. If the BIOS extension does not support these functions, then bit D2 (output function support) in the mode attributes field (returned by VESA BIOS function 01h) will be cleared.
4. Super VGA mode numbers
Standard VGA mode numbers are 7 bits, currently ranging from 00h to 13h. OEMs may define extended display modes in the range 14h-7Fh. The range 80h-FFh cannot be used, because VGA BIOS function 00h (set display mode) uses the seventh bit as a flag indicating whether video memory should be cleared.
Because of the 7-bit limitation on mode numbers, VESA display mode numbers are 15 bits wide. Their values are passed through register BX to VESA BIOS function 02h (set Super VGA mode) to initialize a Super VGA mode.
The format of a VESA mode number is as follows:
D0-D8 mode number
If D8 is 0, it is not a VESA-defined mode
If D8 is 1, it is a VESA-defined mode
D9-D14 reserved by VESA for future expansion (set to 0)
D15 reserved (set to 0)
Therefore, VESA mode numbers start from 100h. This numbering scheme effectively makes standard VGA mode numbers and OEM mode numbers part of the VESA mode number space. This means ordinary VGA display modes can also be set through VESA BIOS function 02h by putting the mode number into BL and clearing the high byte BH. OEM-defined modes can be initialized in the same way.
As an exception, VESA defines the 7-bit mode number 6Ah to represent the 800x600, 16-color, 4-plane display mode. The corresponding 15-bit mode number is 102h.
The following VESA mode numbers have already been defined:
Graphics Text
15-bit mode number 7-bit mode number Resolution Colors 15-bit mode number 7-bit mode number Columns Rows
------------------------------------------------------------------------------------------
100h --- 640x400 256 108h --- 80 60
101h --- 640x480 256
109h --- 132 25
102h 6Ah 800x600 16 10Ah --- 132 43
103h --- 800x600 256 10Bh --- 132 50
10Ch --- 132 60
104h --- 1024x768 16
105h --- 1024x768 256
106h --- 1280x1024 16
107h --- 1280x1024 256
10Dh --- 320x200 32K 1:5:5:5
10Eh --- 320x200 64k 6:5:5
10Fh --- 320x200 16.8M 8:8:8
110h --- 640x480 32K 1:5:5:5
111h --- 640x480 64K 6:5:5
112h --- 640x480 16.5M 8:8:8
113h --- 800x600 32K 1:5:5:5
114h --- 800x600 64K 6:5:5
115h --- 800x600 16.5M 8:8:8
116h --- 1024x768 32K 1:5:5:5
117h --- 1024x768 64K 6:5:5
118h --- 1024x768 16.5M 8:8:8
119h --- 1280x1024 32K 1:5:5:5
11Ah --- 1280x1024 64K 6:5:5
11Bh --- 1280x1024 16.5M 8:8:8
11Ch --- 1600x1200 256
11Dh --- 1600x1200 32K unverified
11Eh --- 1600x1200 64K unverified
MSN:tiqit2@hotmail.com



I = buffer pointer



