VirtualBox

source: vbox/trunk/src/VBox/Devices/Graphics/DevVGAModes.h@ 26163

Last change on this file since 26163 was 11166, checked in by vboxsync, 16 years ago

headers.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 8.4 KB
Line 
1/* $Id: DevVGAModes.h 11166 2008-08-06 00:24:37Z vboxsync $ */
2/** @file
3 * DevVGA - VBox VGA/VESA device, VBE modes.
4 *
5 * List of static mode information, containing all "supported" VBE
6 * modes and their 'settings'.
7 */
8
9/*
10 * Copyright (C) 2006-2007 Sun Microsystems, Inc.
11 *
12 * This file is part of VirtualBox Open Source Edition (OSE), as
13 * available from http://www.virtualbox.org. This file is free software;
14 * you can redistribute it and/or modify it under the terms of the GNU
15 * General Public License (GPL) as published by the Free Software
16 * Foundation, in version 2 as it comes in the "COPYING" file of the
17 * VirtualBox OSE distribution. VirtualBox OSE is distributed in the
18 * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
19 *
20 * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa
21 * Clara, CA 95054 USA or visit http://www.sun.com if you need
22 * additional information or have any questions.
23 */
24
25#ifdef VBE_NEW_DYN_LIST
26
27/* VBE Mode Numbers */
28#define VBE_MODE_VESA_DEFINED 0x0100
29#define VBE_MODE_REFRESH_RATE_USE_CRTC 0x0800
30#define VBE_MODE_LINEAR_FRAME_BUFFER 0x4000
31#define VBE_MODE_PRESERVE_DISPLAY_MEMORY 0x8000
32
33/* VBE GFX Mode Number */
34#define VBE_VESA_MODE_640X400X8 0x100
35#define VBE_VESA_MODE_640X480X8 0x101
36#define VBE_VESA_MODE_800X600X4 0x102
37#define VBE_VESA_MODE_800X600X8 0x103
38#define VBE_VESA_MODE_1024X768X4 0x104
39#define VBE_VESA_MODE_1024X768X8 0x105
40#define VBE_VESA_MODE_1280X1024X4 0x106
41#define VBE_VESA_MODE_1280X1024X8 0x107
42#define VBE_VESA_MODE_320X200X1555 0x10D
43#define VBE_VESA_MODE_320X200X565 0x10E
44#define VBE_VESA_MODE_320X200X888 0x10F
45#define VBE_VESA_MODE_640X480X1555 0x110
46#define VBE_VESA_MODE_640X480X565 0x111
47#define VBE_VESA_MODE_640X480X888 0x112
48#define VBE_VESA_MODE_800X600X1555 0x113
49#define VBE_VESA_MODE_800X600X565 0x114
50#define VBE_VESA_MODE_800X600X888 0x115
51#define VBE_VESA_MODE_1024X768X1555 0x116
52#define VBE_VESA_MODE_1024X768X565 0x117
53#define VBE_VESA_MODE_1024X768X888 0x118
54#define VBE_VESA_MODE_1280X1024X1555 0x119
55#define VBE_VESA_MODE_1280X1024X565 0x11A
56#define VBE_VESA_MODE_1280X1024X888 0x11B
57
58#if 0 /* Ubuntu fails with this */
59#define VBE_VESA_MODE_1600X1200X8 0x11C
60#define VBE_VESA_MODE_1600X1200X1555 0x11D
61#define VBE_VESA_MODE_1600X1200X565 0x11E
62#define VBE_VESA_MODE_1600X1200X888 0x11F
63#endif
64
65/* BOCHS/PLEX86 'own' mode numbers */
66#define VBE_OWN_MODE_320X200X8888 0x140
67#define VBE_OWN_MODE_640X400X8888 0x141
68#define VBE_OWN_MODE_640X480X8888 0x142
69#define VBE_OWN_MODE_800X600X8888 0x143
70#define VBE_OWN_MODE_1024X768X8888 0x144
71#define VBE_OWN_MODE_1280X1024X8888 0x145
72#define VBE_OWN_MODE_320X200X8 0x146
73#define VBE_OWN_MODE_1600X1200X8888 0x147
74#define VBE_OWN_MODE_1152X864X8 0x148
75#define VBE_OWN_MODE_1152X864X1555 0x149
76#define VBE_OWN_MODE_1152X864X565 0x14a
77#define VBE_OWN_MODE_1152X864X888 0x14b
78#define VBE_OWN_MODE_1152X864X8888 0x14c
79
80#define VBE_VESA_MODE_END_OF_LIST 0xFFFF
81
82/* Capabilities */
83#define VBE_CAPABILITY_8BIT_DAC 0x0001
84#define VBE_CAPABILITY_NOT_VGA_COMPATIBLE 0x0002
85#define VBE_CAPABILITY_RAMDAC_USE_BLANK_BIT 0x0004
86#define VBE_CAPABILITY_STEREOSCOPIC_SUPPORT 0x0008
87#define VBE_CAPABILITY_STEREO_VIA_VESA_EVC 0x0010
88
89/* Mode Attributes */
90#define VBE_MODE_ATTRIBUTE_SUPPORTED 0x0001
91#define VBE_MODE_ATTRIBUTE_EXTENDED_INFORMATION_AVAILABLE 0x0002
92#define VBE_MODE_ATTRIBUTE_TTY_BIOS_SUPPORT 0x0004
93#define VBE_MODE_ATTRIBUTE_COLOR_MODE 0x0008
94#define VBE_MODE_ATTRIBUTE_GRAPHICS_MODE 0x0010
95#define VBE_MODE_ATTRIBUTE_NOT_VGA_COMPATIBLE 0x0020
96#define VBE_MODE_ATTRIBUTE_NO_VGA_COMPATIBLE_WINDOW 0x0040
97#define VBE_MODE_ATTRIBUTE_LINEAR_FRAME_BUFFER_MODE 0x0080
98#define VBE_MODE_ATTRIBUTE_DOUBLE_SCAN_MODE 0x0100
99#define VBE_MODE_ATTRIBUTE_INTERLACE_MODE 0x0200
100#define VBE_MODE_ATTRIBUTE_HARDWARE_TRIPLE_BUFFER 0x0400
101#define VBE_MODE_ATTRIBUTE_HARDWARE_STEREOSCOPIC_DISPLAY 0x0800
102#define VBE_MODE_ATTRIBUTE_DUAL_DISPLAY_START_ADDRESS 0x1000
103
104#define VBE_MODE_ATTTRIBUTE_LFB_ONLY ( VBE_MODE_ATTRIBUTE_NO_VGA_COMPATIBLE_WINDOW | VBE_MODE_ATTRIBUTE_LINEAR_FRAME_BUFFER_MODE )
105
106/* Window attributes */
107#define VBE_WINDOW_ATTRIBUTE_RELOCATABLE 0x01
108#define VBE_WINDOW_ATTRIBUTE_READABLE 0x02
109#define VBE_WINDOW_ATTRIBUTE_WRITEABLE 0x04
110
111/* Memory model */
112#define VBE_MEMORYMODEL_TEXT_MODE 0x00
113#define VBE_MEMORYMODEL_CGA_GRAPHICS 0x01
114#define VBE_MEMORYMODEL_HERCULES_GRAPHICS 0x02
115#define VBE_MEMORYMODEL_PLANAR 0x03
116#define VBE_MEMORYMODEL_PACKED_PIXEL 0x04
117#define VBE_MEMORYMODEL_NON_CHAIN_4_256 0x05
118#define VBE_MEMORYMODEL_DIRECT_COLOR 0x06
119#define VBE_MEMORYMODEL_YUV 0x07
120
121/* DirectColorModeInfo */
122#define VBE_DIRECTCOLOR_COLOR_RAMP_PROGRAMMABLE 0x01
123#define VBE_DIRECTCOLOR_RESERVED_BITS_AVAILABLE 0x02
124
125/* Video memory */
126#define VGAMEM_GRAPH 0xA000
127#define VBE_DISPI_BANK_SIZE_KB 64
128#define VBE_DISPI_LFB_PHYSICAL_ADDRESS 0xE0000000
129
130/*
131 * This one is for compactly storing a list of mode info blocks
132 */
133#pragma pack(1) /* pack(1) is important! (you'll get a byte extra for each of the u8 fields elsewise...) */
134typedef struct ModeInfoBlockCompact
135{
136 /* Mandatory information for all VBE revisions */
137 uint16_t ModeAttributes;
138 uint8_t WinAAttributes;
139 uint8_t WinBAttributes;
140 uint16_t WinGranularity;
141 uint16_t WinSize;
142 uint16_t WinASegment;
143 uint16_t WinBSegment;
144 uint32_t WinFuncPtr;
145 uint16_t BytesPerScanLine;
146 /* Mandatory information for VBE 1.2 and above */
147 uint16_t XResolution;
148 uint16_t YResolution;
149 uint8_t XCharSize;
150 uint8_t YCharSize;
151 uint8_t NumberOfPlanes;
152 uint8_t BitsPerPixel;
153 uint8_t NumberOfBanks;
154 uint8_t MemoryModel;
155 uint8_t BankSize;
156 uint8_t NumberOfImagePages;
157 uint8_t Reserved_page;
158 /* Direct Color fields (required for direct/6 and YUV/7 memory models) */
159 uint8_t RedMaskSize;
160 uint8_t RedFieldPosition;
161 uint8_t GreenMaskSize;
162 uint8_t GreenFieldPosition;
163 uint8_t BlueMaskSize;
164 uint8_t BlueFieldPosition;
165 uint8_t RsvdMaskSize;
166 uint8_t RsvdFieldPosition;
167 uint8_t DirectColorModeInfo;
168 /* Mandatory information for VBE 2.0 and above */
169 uint32_t PhysBasePtr;
170 uint32_t OffScreenMemOffset;
171 uint16_t OffScreenMemSize;
172 /* Mandatory information for VBE 3.0 and above */
173 uint16_t LinBytesPerScanLine;
174 uint8_t BnkNumberOfPages;
175 uint8_t LinNumberOfPages;
176 uint8_t LinRedMaskSize;
177 uint8_t LinRedFieldPosition;
178 uint8_t LinGreenMaskSize;
179 uint8_t LinGreenFieldPosition;
180 uint8_t LinBlueMaskSize;
181 uint8_t LinBlueFieldPosition;
182 uint8_t LinRsvdMaskSize;
183 uint8_t LinRsvdFieldPosition;
184 uint32_t MaxPixelClock;
185} ModeInfoBlockCompact;
186
187#pragma pack()
188
189typedef struct ModeInfoListItem
190{
191 uint16_t mode;
192 ModeInfoBlockCompact info;
193} ModeInfoListItem;
194
195#include "vbetables.h"
196
197#define MODE_INFO_SIZE ( sizeof(mode_info_list) / sizeof(ModeInfoListItem) )
198
199#endif /* VBE_NEW_DYN_LIST */
Note: See TracBrowser for help on using the repository browser.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette