2 ; $Source: s:/prj/tech/libsrc/dev2d/RCS/vesa.inc $
5 ; $Date: 1996/04/10 16:26:52 $
7 ; Constants and declarations for VESA.
9 ; This file is part of the 2d library.
16 ; We begin with the the equates for the VBE functions themselves
17 ; together with the version number with which each is associated
20 VBE_DETECT equ 4F00h ; 1.0
21 VBE_GET_MODE_INFO equ 4F01h ; 1.0
22 VBE_SET_MODE equ 4F02h ; 1.0
23 VBE_GET_MODE equ 4F03h ; 1.0
24 VBE_STATE_FUNC equ 4F04h ; 1.0
25 VBE_STATE_SIZE equ 0h ; 1.0
26 VBE_SAVE_STATE equ 1h ; 1.0
27 VBE_RESTORE_STATE equ 2h ; 1.0
28 VBE_BANK_FUNC equ 4F05h ; 1.0
29 VBE_SET_BANK equ 0h ; 1.0
30 VBE_GET_BANK equ 1h ; 1.0
31 VBE_SCAN_LINE_FUNC equ 4F06h ; 1.1
32 VBE_SET_PIXEL_W equ 0h ; 1.1
33 VBE_GET_SCAN_LEN equ 1h ; 1.1
34 VBE_SET_BYTE_W equ 2h ; 2.0
35 VBE_GET_MAX_LEN equ 3h ; 2.0
36 VBE_DISP_START_FUNC equ 4F07h ; 1.1
37 VBE_SET_START equ 0h ; 1.1
38 VBE_GET_START equ 1h ; 1.1
39 VBE_DAC_WIDTH_FUNC equ 4F08h ; 1.2
40 VBE_SET_DAC_W equ 0h ; 1.2
41 VBE_GET_DAC_W equ 1h ; 1.2
42 VBE_PAL_FUNC equ 4F09h ; 2.0
43 VBE_SET_PAL equ 0h ; 2.0
44 VBE_GET_PAL equ 1h ; 2.0
45 VBE_SET_2ND_PAL equ 2h ; 2.0
46 VBE_GET_2ND_PAL equ 3h ; 2.0
47 VBE_GET_FUNCS equ 4F0Ah ; 2.0
48 VBE_GET_SETBANK equ 1h ; 2.0
49 VBE_GET_SETDISP equ 2h ; 2.0
50 VBE_GET_SETPAL equ 3h ; 2.0
54 ; Flags for the save/restore state function
56 VBE_STATE_HARDWARE equ 0001h
57 VBE_STATE_BIOS equ 0002h
58 VBE_STATE_DAC equ 0004h
59 VBE_STATE_SVGA equ 0008h
60 VBE_STATE_ALL equ 000Fh
62 ; Flags for the mode setting function
64 VBE_DONT_CLEAR equ 8000h ; don't clear display memory
65 VBE_DONT_CLEAR_SHIFT equ 0Fh ; shift 15 for don't clear bit
66 VBE_LINEAR_BUFFER equ 4000h ; enable linear frame buffer
67 VBE_LINEAR_BUFF_SHIFT equ 0Eh ; shift 14 for linear buff bit
69 ; The following can be OR'd with either VBE_SET_START or
70 ; VBE_SET_PAL to make sure these two are set only on retrace.
72 VBE_WAIT_VRT equ 0080h ; VBE 2.0
73 VBE_WAIT_VRT_SHIFT equ 7h ; bit position of wait bit
76 ; Now for the structure definitions
79 VBE_VESA_SIG equ 000000000h ; 'VESA' signature
80 VBE_VESA_VERSION equ 000000004h ; VBE version number
81 VBE_OEM_STRING equ 000000006h ; pointer to OEM string
82 VBE_CAPABILITIES equ 00000000Ah ; capabilities of video card
83 VBE_VIDEO_MODE_LIST equ 00000000Eh ; pointer to mode list
85 VBE_TOTAL_MEMORY equ 000000012h ; number of 64Kb blocks
87 VBE_OEM_SOFTWARE_REV equ 000000014h ; OEM software revision number
88 VBE_OEM_VENDOR_NAME equ 000000016h ; pointer to vendor name str
89 VBE_OEM_PRODUCT_NAME equ 00000001Ah ; pointer to product name str
90 VBE_OEM_PRODUCT_REV equ 00000001Eh ; pointer to product revision str
91 VBE_RESERVED equ 000000022h ; start of 222 byte reserved area
92 VBE_OEM_DATA equ 000000100h ; start of scratch area for OEM data
93 VBE_INFO_SIZE equ 000000200h ; total size of info (if 2.0)
95 ; Capabilities field flags
97 VBE_8_BIT_DAC equ 000000001h ; DAC width can be made 8 bit
99 VBE_NON_VGA equ 000000002h ; Controller is non-VGA
100 VBE_BLANK_RAM_DAC equ 000000004h ; Programmed DAC with blank bit
103 ; Next the offsets of the data in the 256 byte structure returned
104 ; by the VBE_MODE_INFO function
107 VBE_MODE_ATTRIBUTES equ 000000000h ; mode attributes
108 VBE_WIN_A_ATTRIBUTES equ 000000002h ; window A attributes
109 VBE_WIN_B_ATTRIBUTES equ 000000003h ; window B attributes
110 VBE_WIN_GRANULARITY equ 000000004h ; window granularity in Kb
111 VBE_WIN_SIZE equ 000000006h ; window size in Kb
112 VBE_WIN_A_SEGMENT equ 000000008h ; window A segment
113 VBE_WIN_B_SEGMENT equ 00000000Ah ; window B segment
114 VBE_WIN_FUNC_PTR equ 00000000Ch ; pointer to window function
115 VBE_BYTES_PER_SCAN_LINE equ 000000010h ; bytes per scanline
116 VBE_X_RESOLUTION equ 000000012h ; horizontal resolution
117 VBE_Y_RESOLUTION equ 000000014h ; vertical resolution
118 VBE_X_CHAR_SIZE equ 000000016h ; character cell width
119 VBE_Y_CHAR_SIZE equ 000000017h ; character cell height
120 VBE_NUMBER_OF_PLANES equ 000000018h ; number of memory planes
121 VBE_BITS_PER_PIXEL equ 000000019h ; bits per pixel
122 VBE_NUMBER_OF_BANKS equ 00000001Ah ; number of CGA style banks
123 VBE_MEMORY_MODEL equ 00000001Bh ; memory model type
124 VBE_BANK_SIZE equ 00000001Ch ; size of CGA style banks
128 VBE_NUM_IMAGE_PAGES equ 00000001Dh ; number of image pages
129 VBE_BYTE_RESERVED equ 00000001Eh ; reserved byte (for page function)
133 VBE_RED_MASK_SIZE equ 00000001Fh ; size of direct color red mask
134 VBE_RED_FIELD_POS equ 000000020h ; bit posn of lsb of red mask
135 VBE_GREEN_MASK_SIZE equ 000000021h ; size of direct color green mask
136 VBE_GREEN_FIELD_POS equ 000000022h ; bit posn of lsb of green mask
137 VBE_BLUE_MASK_SIZE equ 000000023h ; size of direct color blue mask
138 VBE_BLUE_FIELD_POS equ 000000024h ; bit posn of lsb of blue mask
139 VBE_RSVD_MASK_SIZE equ 000000025h ; size of direct color res mask
140 VBE_RSVD_FIELD_POS equ 000000026h ; bit posn of lsb of res mask
141 VBE_DIRET_COLOR_INFO equ 000000027h ; direct color mode attributes
145 VBE_PHYSICAL_BASE_PTR equ 000000028h ; physical address for linear buf
146 VBE_OFF_SCREEN_MEM_OFF equ 00000002Ch ; pointer to start of offscreen mem
147 VBE_OFF_SCREEN_MEM_SIZE equ 000000030h ; amount of offscreen mem in Kb
148 VBE_INFO_PAD_BLOCK equ 000000032h ; pad block to 256 bytes
149 VBE_MODE_INFO_SIZE equ 000000100h ; size of mode info block
152 ; Next come defines for some of the information in the above block
155 ; First the mode attributes (bit 1 reserved)
157 VBE_MODE_SUPPORTED equ 000000001h ; video mode is supported
158 VBE_BIOS_TTY_OUTPUT equ 000000004h ; tty output supported by BIOS
159 VBE_COLOR_MODE equ 000000008h ; mode is a color mode
160 VBE_GRAPHICS_MODE equ 000000010h ; mode is a graphics mode
162 VBE_NON_VGA_MODE equ 000000020h ; mode is not VGA compatible
163 VBE_NON_BANK_MODE equ 000000040h ; mode does not support banking
164 VBE_MODE_LINEAR equ 000000080h ; linear mode is supported
166 ; WinA and WinB attributes
168 VBE_WIN_SUPPORTED equ 000000001h
169 VBE_WIN_READABLE equ 000000002h
170 VBE_WIN_WRITABLE equ 000000003h
171 VBE_WIN_ALL_ATTR equ 000000007h ; can read/write window
173 ; Direct color mode info
175 VBE_RAMP_CHANGES equ 000000001h ; indicates color ramp is programmable
176 VBE_COLOR_RSVD_AVAIL equ 000000002h ; indicates that rsvd bits avail
178 ; Memory model identification
180 VBE_TEXT_MEMORY equ 000000000h ; text mode memory model
181 VBE_CGA_MEMORY equ 000000001h ; CGA style mode
182 VBE_HERCULES_MEMORY equ 000000002h ; hercules graphics mode
183 VBE_PLANAR_MEMORY equ 000000003h ; 16 color VGA planar mode
184 VBE_PACKED_MEMORY equ 000000004h ; packed pixel mode (256 color)
185 VBE_MODEX_MEMORY equ 000000005h ; non-chain 4, 256 color (mode x)
186 VBE_RGB_MEMORY equ 000000006h ; direct color RGB mode
187 VBE_YUV_MEMORY equ 000000007h ; direct color YUV mode
190 ; The VBE 2.0 palette format (the same as used by Windows but different
191 ; from the one used by normal VGA BIOS)
194 VBE_PALETTE_BLUE equ 000000000h ; one byte (or 6 bits) blue
195 VBE_PALETTE_GREEN equ 000000001h ; one byte (or 6 bits) green
196 VBE_PALETTE_RED equ 000000002h ; one byte (or 6 bits) red
197 VBE_PALETTE_ALPHA equ 000000003h ; alpha/alignment