Changeset 69052 in vbox for trunk/src/VBox/Devices/Graphics/BIOS
- Timestamp:
- Oct 11, 2017 7:04:39 PM (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Devices/Graphics/BIOS/vbe.h
r65381 r69052 5 5 6 6 #include <VBoxVideoVBE.h> 7 #include <VBoxVideoVBEPrivate.h> 7 8 8 9 // DISPI helper function … … 45 46 } VbeInfoBlock; 46 47 47 48 // This one is for compactly storing a static list of mode info blocks49 // this saves us 189 bytes per block50 typedef struct ModeInfoBlockCompact51 {52 // Mandatory information for all VBE revisions53 uint16_t ModeAttributes;54 uint8_t WinAAttributes;55 uint8_t WinBAttributes;56 uint16_t WinGranularity;57 uint16_t WinSize;58 uint16_t WinASegment;59 uint16_t WinBSegment;60 uint32_t WinFuncPtr;61 uint16_t BytesPerScanLine;62 // Mandatory information for VBE 1.2 and above63 uint16_t XResolution;64 uint16_t YResolution;65 uint8_t XCharSize;66 uint8_t YCharSize;67 uint8_t NumberOfPlanes;68 uint8_t BitsPerPixel;69 uint8_t NumberOfBanks;70 uint8_t MemoryModel;71 uint8_t BankSize;72 uint8_t NumberOfImagePages;73 uint8_t Reserved_page;74 // Direct Color fields (required for direct/6 and YUV/7 memory models)75 uint8_t RedMaskSize;76 uint8_t RedFieldPosition;77 uint8_t GreenMaskSize;78 uint8_t GreenFieldPosition;79 uint8_t BlueMaskSize;80 uint8_t BlueFieldPosition;81 uint8_t RsvdMaskSize;82 uint8_t RsvdFieldPosition;83 uint8_t DirectColorModeInfo;84 // Mandatory information for VBE 2.0 and above85 uint32_t PhysBasePtr;86 uint32_t OffScreenMemOffset;87 uint16_t OffScreenMemSize;88 // Mandatory information for VBE 3.0 and above89 uint16_t LinBytesPerScanLine;90 uint8_t BnkNumberOfPages;91 uint8_t LinNumberOfPages;92 uint8_t LinRedMaskSize;93 uint8_t LinRedFieldPosition;94 uint8_t LinGreenMaskSize;95 uint8_t LinGreenFieldPosition;96 uint8_t LinBlueMaskSize;97 uint8_t LinBlueFieldPosition;98 uint8_t LinRsvdMaskSize;99 uint8_t LinRsvdFieldPosition;100 uint32_t MaxPixelClock;101 // uint8_t Reserved[189]; // DO NOT PUT THIS IN HERE because of Compact Mode Info storage in bios102 } ModeInfoBlockCompact;103 48 104 49 typedef struct ModeInfoBlock … … 156 101 } ModeInfoBlock; 157 102 158 typedef struct ModeInfoListItem159 {160 uint16_t mode;161 ModeInfoBlockCompact info;162 } ModeInfoListItem;163 164 103 // VBE Return Status Info 165 104 // AL … … 172 111 #define VBE_RETURN_STATUS_INVALID 0x03 173 112 174 // VBE Mode Numbers175 176 #define VBE_MODE_VESA_DEFINED 0x0100177 #define VBE_MODE_REFRESH_RATE_USE_CRTC 0x0800178 #define VBE_MODE_LINEAR_FRAME_BUFFER 0x4000179 #define VBE_MODE_PRESERVE_DISPLAY_MEMORY 0x8000180 181 // VBE GFX Mode Number182 183 #define VBE_VESA_MODE_640X400X8 0x100184 #define VBE_VESA_MODE_640X480X8 0x101185 #define VBE_VESA_MODE_800X600X4 0x102186 #define VBE_VESA_MODE_800X600X8 0x103187 #define VBE_VESA_MODE_1024X768X4 0x104188 #define VBE_VESA_MODE_1024X768X8 0x105189 #define VBE_VESA_MODE_1280X1024X4 0x106190 #define VBE_VESA_MODE_1280X1024X8 0x107191 #define VBE_VESA_MODE_320X200X1555 0x10D192 #define VBE_VESA_MODE_320X200X565 0x10E193 #define VBE_VESA_MODE_320X200X888 0x10F194 #define VBE_VESA_MODE_640X480X1555 0x110195 #define VBE_VESA_MODE_640X480X565 0x111196 #define VBE_VESA_MODE_640X480X888 0x112197 #define VBE_VESA_MODE_800X600X1555 0x113198 #define VBE_VESA_MODE_800X600X565 0x114199 #define VBE_VESA_MODE_800X600X888 0x115200 #define VBE_VESA_MODE_1024X768X1555 0x116201 #define VBE_VESA_MODE_1024X768X565 0x117202 #define VBE_VESA_MODE_1024X768X888 0x118203 #define VBE_VESA_MODE_1280X1024X1555 0x119204 #define VBE_VESA_MODE_1280X1024X565 0x11A205 #define VBE_VESA_MODE_1280X1024X888 0x11B206 #define VBE_VESA_MODE_1600X1200X8 0x11C207 #define VBE_VESA_MODE_1600X1200X1555 0x11D208 #define VBE_VESA_MODE_1600X1200X565 0x11E209 #define VBE_VESA_MODE_1600X1200X888 0x11F210 211 // BOCHS/PLEX86 'own' mode numbers212 #define VBE_OWN_MODE_320X200X8888 0x140213 #define VBE_OWN_MODE_640X400X8888 0x141214 #define VBE_OWN_MODE_640X480X8888 0x142215 #define VBE_OWN_MODE_800X600X8888 0x143216 #define VBE_OWN_MODE_1024X768X8888 0x144217 #define VBE_OWN_MODE_1280X1024X8888 0x145218 #define VBE_OWN_MODE_320X200X8 0x146219 #define VBE_OWN_MODE_1600X1200X8888 0x147220 #define VBE_OWN_MODE_1152X864X8 0x148221 #define VBE_OWN_MODE_1152X864X1555 0x149222 #define VBE_OWN_MODE_1152X864X565 0x14a223 #define VBE_OWN_MODE_1152X864X888 0x14b224 #define VBE_OWN_MODE_1152X864X8888 0x14c225 226 #define VBE_VESA_MODE_END_OF_LIST 0xFFFF227 228 // Capabilities229 230 #define VBE_CAPABILITY_8BIT_DAC 0x0001231 #define VBE_CAPABILITY_NOT_VGA_COMPATIBLE 0x0002232 #define VBE_CAPABILITY_RAMDAC_USE_BLANK_BIT 0x0004233 #define VBE_CAPABILITY_STEREOSCOPIC_SUPPORT 0x0008234 #define VBE_CAPABILITY_STEREO_VIA_VESA_EVC 0x0010235 236 // Mode Attributes237 238 #define VBE_MODE_ATTRIBUTE_SUPPORTED 0x0001239 #define VBE_MODE_ATTRIBUTE_EXTENDED_INFORMATION_AVAILABLE 0x0002240 #define VBE_MODE_ATTRIBUTE_TTY_BIOS_SUPPORT 0x0004241 #define VBE_MODE_ATTRIBUTE_COLOR_MODE 0x0008242 #define VBE_MODE_ATTRIBUTE_GRAPHICS_MODE 0x0010243 #define VBE_MODE_ATTRIBUTE_NOT_VGA_COMPATIBLE 0x0020244 #define VBE_MODE_ATTRIBUTE_NO_VGA_COMPATIBLE_WINDOW 0x0040245 #define VBE_MODE_ATTRIBUTE_LINEAR_FRAME_BUFFER_MODE 0x0080246 #define VBE_MODE_ATTRIBUTE_DOUBLE_SCAN_MODE 0x0100247 #define VBE_MODE_ATTRIBUTE_INTERLACE_MODE 0x0200248 #define VBE_MODE_ATTRIBUTE_HARDWARE_TRIPLE_BUFFER 0x0400249 #define VBE_MODE_ATTRIBUTE_HARDWARE_STEREOSCOPIC_DISPLAY 0x0800250 #define VBE_MODE_ATTRIBUTE_DUAL_DISPLAY_START_ADDRESS 0x1000251 252 #define VBE_MODE_ATTTRIBUTE_LFB_ONLY ( VBE_MODE_ATTRIBUTE_NO_VGA_COMPATIBLE_WINDOW | VBE_MODE_ATTRIBUTE_LINEAR_FRAME_BUFFER_MODE )253 254 // Window attributes255 256 #define VBE_WINDOW_ATTRIBUTE_RELOCATABLE 0x01257 #define VBE_WINDOW_ATTRIBUTE_READABLE 0x02258 #define VBE_WINDOW_ATTRIBUTE_WRITEABLE 0x04259 260 // Memory model261 262 #define VBE_MEMORYMODEL_TEXT_MODE 0x00263 #define VBE_MEMORYMODEL_CGA_GRAPHICS 0x01264 #define VBE_MEMORYMODEL_HERCULES_GRAPHICS 0x02265 #define VBE_MEMORYMODEL_PLANAR 0x03266 #define VBE_MEMORYMODEL_PACKED_PIXEL 0x04267 #define VBE_MEMORYMODEL_NON_CHAIN_4_256 0x05268 #define VBE_MEMORYMODEL_DIRECT_COLOR 0x06269 #define VBE_MEMORYMODEL_YUV 0x07270 271 // DirectColorModeInfo272 273 #define VBE_DIRECTCOLOR_COLOR_RAMP_PROGRAMMABLE 0x01274 #define VBE_DIRECTCOLOR_RESERVED_BITS_AVAILABLE 0x02275 276 /**277 * VBE Bios Extra Data structure.278 * @remark duplicated in DevVGA.h.279 */280 typedef struct VBEHeader281 {282 /** Signature (VBEHEADER_MAGIC). */283 uint16_t u16Signature;284 /** Data size. */285 uint16_t cbData;286 } VBEHeader;287 288 /** The value of the VBEHEADER::u16Signature field.289 * @remark duplicated in DevVGA.h. */290 #define VBEHEADER_MAGIC 0x77CC291 292 /** The extra port which is used to read the mode list.293 * @remark duplicated in DevVGA.h. */294 #define VBE_EXTRA_PORT 0x3b6295 296 /** The extra port which is used for debug printf.297 * @remark duplicated in DevVGA.h. */298 #define VBE_PRINTF_PORT 0x3b7299 300 113 #endif
Note:
See TracChangeset
for help on using the changeset viewer.