vbox的更動 69052 路徑 trunk/src/VBox
- 時間撮記:
- 2017-10-11 下午07:04:39 (7 年 以前)
- 位置:
- trunk/src/VBox/Devices/Graphics
- 檔案:
-
- 修改 4 筆資料
圖例:
- 未更動
- 新增
- 刪除
-
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 -
trunk/src/VBox/Devices/Graphics/DevVGA.cpp
r69047 r69052 6792 6792 if (cCustomModes) 6793 6793 { 6794 uint16_t u16CurMode = 0x160;6794 uint16_t u16CurMode = VBE_VBOX_MODE_CUSTOM1; 6795 6795 for (i = 1; i <= cCustomModes; i++) 6796 6796 { -
trunk/src/VBox/Devices/Graphics/DevVGA.h
r69047 r69052 54 54 55 55 #include <VBoxVideoVBE.h> 56 #include <VBoxVideoVBEPrivate.h> 56 57 57 58 #ifdef VBOX_WITH_HGSMI … … 488 489 #endif 489 490 490 /**491 * VBE Bios Extra Data structure.492 * @remark duplicated in vbe.h.493 */494 typedef struct VBEHeader495 {496 /** Signature (VBEHEADER_MAGIC). */497 uint16_t u16Signature;498 /** Data size. */499 uint16_t cbData;500 } VBEHeader;501 502 491 /** VBE Extra Data. */ 503 492 typedef VBEHeader VBEHEADER; 504 493 /** Pointer to the VBE Extra Data. */ 505 494 typedef VBEHEADER *PVBEHEADER; 506 507 /** The value of the VBEHEADER::u16Signature field.508 * @remark duplicated in vbe.h. */509 #define VBEHEADER_MAGIC 0x77CC510 511 /** The extra port which is used to read the mode list.512 * @remark duplicated in vbe.h. */513 #define VBE_EXTRA_PORT 0x3b6514 515 /** The extra port which is used for debug printf.516 * @remark duplicated in vbe.h. */517 #define VBE_PRINTF_PORT 0x3b7518 495 519 496 #if !defined(VBOX) || defined(IN_RING3) -
trunk/src/VBox/Devices/Graphics/DevVGAModes.h
r69047 r69052 20 20 21 21 #include <VBoxVideoVBE.h> 22 23 /* VBE Mode Numbers */ 24 #define VBE_MODE_VESA_DEFINED 0x0100 25 #define VBE_MODE_REFRESH_RATE_USE_CRTC 0x0800 26 #define VBE_MODE_LINEAR_FRAME_BUFFER 0x4000 27 #define VBE_MODE_PRESERVE_DISPLAY_MEMORY 0x8000 28 29 /* VBE GFX Mode Number */ 30 #define VBE_VESA_MODE_640X400X8 0x100 31 #define VBE_VESA_MODE_640X480X8 0x101 32 #define VBE_VESA_MODE_800X600X4 0x102 33 #define VBE_VESA_MODE_800X600X8 0x103 34 #define VBE_VESA_MODE_1024X768X4 0x104 35 #define VBE_VESA_MODE_1024X768X8 0x105 36 #define VBE_VESA_MODE_1280X1024X4 0x106 37 #define VBE_VESA_MODE_1280X1024X8 0x107 38 #define VBE_VESA_MODE_320X200X1555 0x10D 39 #define VBE_VESA_MODE_320X200X565 0x10E 40 #define VBE_VESA_MODE_320X200X888 0x10F 41 #define VBE_VESA_MODE_640X480X1555 0x110 42 #define VBE_VESA_MODE_640X480X565 0x111 43 #define VBE_VESA_MODE_640X480X888 0x112 44 #define VBE_VESA_MODE_800X600X1555 0x113 45 #define VBE_VESA_MODE_800X600X565 0x114 46 #define VBE_VESA_MODE_800X600X888 0x115 47 #define VBE_VESA_MODE_1024X768X1555 0x116 48 #define VBE_VESA_MODE_1024X768X565 0x117 49 #define VBE_VESA_MODE_1024X768X888 0x118 50 #define VBE_VESA_MODE_1280X1024X1555 0x119 51 #define VBE_VESA_MODE_1280X1024X565 0x11A 52 #define VBE_VESA_MODE_1280X1024X888 0x11B 53 54 #if 0 /* Ubuntu fails with this */ 55 #define VBE_VESA_MODE_1600X1200X8 0x11C 56 #define VBE_VESA_MODE_1600X1200X1555 0x11D 57 #define VBE_VESA_MODE_1600X1200X565 0x11E 58 #define VBE_VESA_MODE_1600X1200X888 0x11F 59 #endif 60 61 /* BOCHS/PLEX86 'own' mode numbers */ 62 #define VBE_OWN_MODE_320X200X8888 0x140 63 #define VBE_OWN_MODE_640X400X8888 0x141 64 #define VBE_OWN_MODE_640X480X8888 0x142 65 #define VBE_OWN_MODE_800X600X8888 0x143 66 #define VBE_OWN_MODE_1024X768X8888 0x144 67 #define VBE_OWN_MODE_1280X1024X8888 0x145 68 #define VBE_OWN_MODE_320X200X8 0x146 69 #define VBE_OWN_MODE_1600X1200X8888 0x147 70 #define VBE_OWN_MODE_1152X864X8 0x148 71 #define VBE_OWN_MODE_1152X864X1555 0x149 72 #define VBE_OWN_MODE_1152X864X565 0x14a 73 #define VBE_OWN_MODE_1152X864X888 0x14b 74 #define VBE_OWN_MODE_1152X864X8888 0x14c 75 76 #define VBE_VESA_MODE_END_OF_LIST 0xFFFF 77 78 /* Capabilities */ 79 #define VBE_CAPABILITY_8BIT_DAC 0x0001 80 #define VBE_CAPABILITY_NOT_VGA_COMPATIBLE 0x0002 81 #define VBE_CAPABILITY_RAMDAC_USE_BLANK_BIT 0x0004 82 #define VBE_CAPABILITY_STEREOSCOPIC_SUPPORT 0x0008 83 #define VBE_CAPABILITY_STEREO_VIA_VESA_EVC 0x0010 84 85 /* Mode Attributes */ 86 #define VBE_MODE_ATTRIBUTE_SUPPORTED 0x0001 87 #define VBE_MODE_ATTRIBUTE_EXTENDED_INFORMATION_AVAILABLE 0x0002 88 #define VBE_MODE_ATTRIBUTE_TTY_BIOS_SUPPORT 0x0004 89 #define VBE_MODE_ATTRIBUTE_COLOR_MODE 0x0008 90 #define VBE_MODE_ATTRIBUTE_GRAPHICS_MODE 0x0010 91 #define VBE_MODE_ATTRIBUTE_NOT_VGA_COMPATIBLE 0x0020 92 #define VBE_MODE_ATTRIBUTE_NO_VGA_COMPATIBLE_WINDOW 0x0040 93 #define VBE_MODE_ATTRIBUTE_LINEAR_FRAME_BUFFER_MODE 0x0080 94 #define VBE_MODE_ATTRIBUTE_DOUBLE_SCAN_MODE 0x0100 95 #define VBE_MODE_ATTRIBUTE_INTERLACE_MODE 0x0200 96 #define VBE_MODE_ATTRIBUTE_HARDWARE_TRIPLE_BUFFER 0x0400 97 #define VBE_MODE_ATTRIBUTE_HARDWARE_STEREOSCOPIC_DISPLAY 0x0800 98 #define VBE_MODE_ATTRIBUTE_DUAL_DISPLAY_START_ADDRESS 0x1000 99 100 #define VBE_MODE_ATTTRIBUTE_LFB_ONLY ( VBE_MODE_ATTRIBUTE_NO_VGA_COMPATIBLE_WINDOW | VBE_MODE_ATTRIBUTE_LINEAR_FRAME_BUFFER_MODE ) 101 102 /* Window attributes */ 103 #define VBE_WINDOW_ATTRIBUTE_RELOCATABLE 0x01 104 #define VBE_WINDOW_ATTRIBUTE_READABLE 0x02 105 #define VBE_WINDOW_ATTRIBUTE_WRITEABLE 0x04 106 107 /* Memory model */ 108 #define VBE_MEMORYMODEL_TEXT_MODE 0x00 109 #define VBE_MEMORYMODEL_CGA_GRAPHICS 0x01 110 #define VBE_MEMORYMODEL_HERCULES_GRAPHICS 0x02 111 #define VBE_MEMORYMODEL_PLANAR 0x03 112 #define VBE_MEMORYMODEL_PACKED_PIXEL 0x04 113 #define VBE_MEMORYMODEL_NON_CHAIN_4_256 0x05 114 #define VBE_MEMORYMODEL_DIRECT_COLOR 0x06 115 #define VBE_MEMORYMODEL_YUV 0x07 116 117 /* DirectColorModeInfo */ 118 #define VBE_DIRECTCOLOR_COLOR_RAMP_PROGRAMMABLE 0x01 119 #define VBE_DIRECTCOLOR_RESERVED_BITS_AVAILABLE 0x02 120 121 /* Video memory */ 122 #define VGAMEM_GRAPH 0xA000 123 124 /* 125 * This one is for compactly storing a list of mode info blocks 126 */ 127 #pragma pack(1) /* pack(1) is important! (you'll get a byte extra for each of the u8 fields elsewise...) */ 128 typedef struct ModeInfoBlockCompact 129 { 130 /* Mandatory information for all VBE revisions */ 131 uint16_t ModeAttributes; 132 uint8_t WinAAttributes; 133 uint8_t WinBAttributes; 134 uint16_t WinGranularity; 135 uint16_t WinSize; 136 uint16_t WinASegment; 137 uint16_t WinBSegment; 138 uint32_t WinFuncPtr; 139 uint16_t BytesPerScanLine; 140 /* Mandatory information for VBE 1.2 and above */ 141 uint16_t XResolution; 142 uint16_t YResolution; 143 uint8_t XCharSize; 144 uint8_t YCharSize; 145 uint8_t NumberOfPlanes; 146 uint8_t BitsPerPixel; 147 uint8_t NumberOfBanks; 148 uint8_t MemoryModel; 149 uint8_t BankSize; 150 uint8_t NumberOfImagePages; 151 uint8_t Reserved_page; 152 /* Direct Color fields (required for direct/6 and YUV/7 memory models) */ 153 uint8_t RedMaskSize; 154 uint8_t RedFieldPosition; 155 uint8_t GreenMaskSize; 156 uint8_t GreenFieldPosition; 157 uint8_t BlueMaskSize; 158 uint8_t BlueFieldPosition; 159 uint8_t RsvdMaskSize; 160 uint8_t RsvdFieldPosition; 161 uint8_t DirectColorModeInfo; 162 /* Mandatory information for VBE 2.0 and above */ 163 uint32_t PhysBasePtr; 164 uint32_t OffScreenMemOffset; 165 uint16_t OffScreenMemSize; 166 /* Mandatory information for VBE 3.0 and above */ 167 uint16_t LinBytesPerScanLine; 168 uint8_t BnkNumberOfPages; 169 uint8_t LinNumberOfPages; 170 uint8_t LinRedMaskSize; 171 uint8_t LinRedFieldPosition; 172 uint8_t LinGreenMaskSize; 173 uint8_t LinGreenFieldPosition; 174 uint8_t LinBlueMaskSize; 175 uint8_t LinBlueFieldPosition; 176 uint8_t LinRsvdMaskSize; 177 uint8_t LinRsvdFieldPosition; 178 uint32_t MaxPixelClock; 179 } ModeInfoBlockCompact; 180 181 #pragma pack() 182 183 typedef struct ModeInfoListItem 184 { 185 uint16_t mode; 186 ModeInfoBlockCompact info; 187 } ModeInfoListItem; 22 #include <VBoxVideoVBEPrivate.h> 188 23 189 24 #include "vbetables.h"
注意:
瀏覽 TracChangeset
來幫助您使用更動檢視器