|
|
|
|
GA_CRTCInfo
Declaration
typedef struct {
N_uint16 HorizontalTotal;
N_uint16 HorizontalSyncStart;
N_uint16 HorizontalSyncEnd;
N_uint16 VerticalTotal;
N_uint16 VerticalSyncStart;
N_uint16 VerticalSyncEnd;
N_uint32 PixelClock;
N_uint16 RefreshRate;
N_uint8 Flags;
} GA_CRTCInfo
Prototype In
snap/graphics.h
Description
CRTC information block for refresh rate control, passed in to the SetVideoMode function.
The HorizontalTotal, HorizontalSyncStart, HorizontalSyncEnd, VerticalTotal, VerticalSyncStart and VerticalSyncEnd members define the default normalized CRTC values that will be programmed if the gaRefreshCtl flag is passed to SetVideoMode. The CRTC values for a particular resolution will always be the same regardless of color depth. Note also that the CRTC table does not contain any information about the horizontal and vertical blank timing positions. It is up the the driver implementation to determine the correct blank timings to use for the mode when it is initialized depending on the constraints of the underlying hardware (some hardware does not require this information, and most VGA compatible hardware can be very picky about the values programmed for the blank timings).
The Flags member defines the flags that modify the operation of the mode, and the values for this member are defined in the GA_CRTCInfoFlagsType enumeration.
The PixelClock member defines the normalized pixel clock that will be programmed into the hardware. This value is represented in a 32 bit unsigned integer in units of Hz. For example to represent a pixel clock of 25.18Mhz one would code a value of 25,180,000. From the pixel clock and the horizontal and vertical totals, you can calculate the refresh rate for the specific graphics mode using the following formula:
refresh rate = (PixelClock * 10,000) /
(HorizontalTotal
* VerticalTotal)
For example a 1024x768 mode with a HTotal of 1360, VTotal of 802, a pixel clock of 130Mhz might be computed as follows:
refresh rate = (130 * 10,000) / (1360 * 802)
=
59.59 Hz
The RefreshRate field defines the refresh rate that the CRTC information values define. This value may not actually be used by the driver but must be calculated by the application program using the above formulas before initializing the mode. This entry may be used by the driver to identify any special cases that may need to be handled when setting the mode for specific refresh rates. The value in this field should be represented in units if 0.01 Hz (ie: a value 7200 represents a refresh rate of 72.00Hz).
Note: The dwSize member is intended for future compatibility, and should be set to the size of the structure as defined in this header file. Future drivers will be compatible with older software by examiming this value.
Members
HorizontalTotal |
Horizontal total (pixels) |
HorizontalSyncStart |
Horizontal sync start position |
HorizontalSyncEnd |
Horizontal sync end position |
VerticalTotal |
Vertical Total (lines) |
VerticalSyncStart |
Vertical sync start position |
VerticalSyncEnd |
Vertical sync end position |
PixelClock |
Pixel clock in units of Hz |
RefreshRate |
Expected refresh rate in .01Hz |
Flags |
Initialisation flags for mode |
Copyright © 2002 SciTech Software, Inc. Visit our web site at http://www.scitechsoft.com