1/*
2** Copyright 2001, Travis Geiselbrecht. All rights reserved.
3** Distributed under the terms of the NewOS License.
4*/
5#ifndef _STAGE2_VESA_H
6#define _STAGE2_VESA_H
7
8
9#include <SupportDefs.h>
10
11
12struct VBEInfoBlock {
13	char   signature[4]; // should be 'VESA'
14	uint16 version;
15	uint32 oem_ptr;
16	uint32 capabilities;
17	uint32 video_ptr;
18	uint16 total_memory;
19	// VESA 2.x stuff
20	uint16 oem_software_rev;
21	uint32 oem_vendor_name_ptr;
22	uint32 oem_product_name_ptr;
23	uint32 oem_product_rev_ptr;
24	uint8  reserved[222];
25	uint8  oem_data[256];
26} _PACKED;
27
28struct VBEModeInfoBlock {
29	uint16 attributes;
30	uint8  wina_attributes;
31	uint8  winb_attributes;
32	uint16 win_granulatiry;
33	uint16 win_size;
34	uint16 wina_segment;
35	uint16 winb_segment;
36	uint32 win_function_ptr;
37	uint16 bytes_per_scanline;
38
39	uint16 x_resolution;
40	uint16 y_resolution;
41	uint8  x_charsize;
42	uint8  y_charsize;
43	uint8  num_planes;
44	uint8  bits_per_pixel;
45	uint8  num_banks;
46	uint8  memory_model;
47	uint8  bank_size;
48	uint8  num_image_pages;
49	uint8  _reserved;
50
51	uint8  red_mask_size;
52	uint8  red_field_position;
53	uint8  green_mask_size;
54	uint8  green_field_position;
55	uint8  blue_mask_size;
56	uint8  blue_field_position;
57	uint8  reserved_mask_size;
58	uint8  reserved_field_position;
59	uint8  direct_color_mode_info;
60
61	uint32 phys_base_ptr;
62	uint32 offscreen_mem_offset;
63	uint16 offscreen_mem_size;
64	uint8  _reserved2[206];
65} _PACKED;
66
67#endif
68
69