Lab2
|
00001 #ifndef __VBE_H 00002 #define __VBE_H 00003 00004 #include <stdint.h> 00005 00018 typedef struct { 00019 /* Mandatory information for all VBE revisions */ 00020 uint16_t ModeAttributes; 00021 uint8_t WinAAttributes; 00022 uint8_t WinBAttributes; 00023 uint16_t WinGranularity; 00024 uint16_t WinSize; 00025 uint16_t WinASegment; 00026 uint16_t WinBSegment; 00027 phys_bytes WinFuncPtr; 00028 uint16_t BytesPerScanLine; 00030 /* Mandatory information for VBE 1.2 and above */ 00031 00032 uint16_t XResolution; 00033 uint16_t YResolution; 00034 uint8_t XCharSize; 00035 uint8_t YCharSize; 00036 uint8_t NumberOfPlanes; 00037 uint8_t BitsPerPixel; 00038 uint8_t NumberOfBanks; 00039 uint8_t MemoryModel; 00040 uint8_t BankSize; 00041 uint8_t NumberOfImagePages; 00042 uint8_t Reserved1; 00044 /* Direct Color fields (required for direct/6 and YUV/7 memory models) */ 00045 00046 uint8_t RedMaskSize; /* size of direct color red mask in bits */ 00047 uint8_t RedFieldPosition; /* bit position of lsb of red mask */ 00048 uint8_t GreenMaskSize; /* size of direct color green mask in bits */ 00049 uint8_t GreenFieldPosition; /* bit position of lsb of green mask */ 00050 uint8_t BlueMaskSize; /* size of direct color blue mask in bits */ 00051 uint8_t BlueFieldPosition; /* bit position of lsb of blue mask */ 00052 uint8_t RsvdMaskSize; /* size of direct color reserved mask in bits */ 00053 uint8_t RsvdFieldPosition; /* bit position of lsb of reserved mask */ 00054 uint8_t DirectColorModeInfo; /* direct color mode attributes */ 00055 00056 /* Mandatory information for VBE 2.0 and above */ 00057 phys_bytes PhysBasePtr; 00058 uint8_t Reserved2[4]; 00059 uint8_t Reserved3[2]; 00061 /* Mandatory information for VBE 3.0 and above */ 00062 uint16_t LinBytesPerScanLine; /* bytes per scan line for linear modes */ 00063 uint8_t BnkNumberOfImagePages; /* number of images for banked modes */ 00064 uint8_t LinNumberOfImagePages; /* number of images for linear modes */ 00065 uint8_t LinRedMaskSize; /* size of direct color red mask (linear modes) */ 00066 uint8_t LinRedFieldPosition; /* bit position of lsb of red mask (linear modes) */ 00067 uint8_t LinGreenMaskSize; /* size of direct color green mask (linear modes) */ 00068 uint8_t LinGreenFieldPosition; /* bit position of lsb of green mask (linear modes) */ 00069 uint8_t LinBlueMaskSize; /* size of direct color blue mask (linear modes) */ 00070 uint8_t LinBlueFieldPosition; /* bit position of lsb of blue mask (linear modes ) */ 00071 uint8_t LinRsvdMaskSize; /* size of direct color reserved mask (linear modes) */ 00072 uint8_t LinRsvdFieldPosition; /* bit position of lsb of reserved mask (linear modes) */ 00073 uint32_t MaxPixelClock; /* maximum pixel clock (in Hz) for graphics mode */ 00074 uint8_t Reserved4[190]; /* remainder of ModeInfoBlock */ 00075 } vbe_mode_info_t; 00076 00092 int vbe_get_mode_info(unsigned short mode, vbe_mode_info_t *vmi_p); 00093 00096 #endif /* __VBE_H */