Subversion Repositories shark

Rev

Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
132 giacomo 1
/*
2
Copyright (C) 1996 by Josh Vanderhoof
3
 
4
You are free to distribute and modify this file, as long as you
5
do not remove this copyright notice and clearly label modified
6
versions as being modified.
7
 
8
This software has NO WARRANTY.  Use it at your own risk.
9
*/
10
 
11
#ifndef _VBE_H
12
#define _VBE_H
13
 
14
/* structures for vbe 2.0 */
15
 
16
struct vbe_info_block
17
        {
18
        char vbe_signature[4];
19
        short vbe_version;
20
        unsigned short oem_string_off;
21
        unsigned short oem_string_seg;
22
        int capabilities;
23
        unsigned short video_mode_list_off;
24
        unsigned short video_mode_list_seg;
25
        short total_memory;
26
        short oem_software_rev;
27
        unsigned short oem_vendor_name_off;
28
        unsigned short oem_vendor_name_seg;
29
        unsigned short oem_product_name_off;
30
        unsigned short oem_product_name_seg;
31
        unsigned short oem_product_rev_off;
32
        unsigned short oem_product_rev_seg;
33
        char reserved[222];
34
        char oem_data[256];
35
        } __attribute__ ((packed));
36
 
37
#define VBE_ATTR_MODE_SUPPORTED         (1 << 0)
38
#define VBE_ATTR_TTY    (1 << 2)
39
#define VBE_ATTR_COLOR  (1 << 3)
40
#define VBE_ATTR_GRAPHICS       (1 << 4)
41
#define VBE_ATTR_NOT_VGA        (1 << 5)
42
#define VBE_ATTR_NOT_WINDOWED   (1 << 6)
43
#define VBE_ATTR_LINEAR         (1 << 7)
44
 
45
#define VBE_WIN_RELOCATABLE     (1 << 0)
46
#define VBE_WIN_READABLE        (1 << 1)
47
#define VBE_WIN_WRITEABLE       (1 << 2)
48
 
49
#define VBE_MODEL_TEXT  0
50
#define VBE_MODEL_CGA   1
51
#define VBE_MODEL_HERCULES      2
52
#define VBE_MODEL_PLANAR        3
53
#define VBE_MODEL_PACKED        4
54
#define VBE_MODEL_256   5
55
#define VBE_MODEL_RGB   6
56
#define VBE_MODEL_YUV   7
57
 
58
struct vbe_mode_info_block
59
        {
60
        unsigned short mode_attributes;
61
        uint8_t win_a_attributes;
62
        uint8_t win_b_attributes;
63
        unsigned short win_granularity;
64
        unsigned short win_size;
65
        unsigned short win_a_segment;
66
        unsigned short win_b_segment;
67
        unsigned short win_func_ptr_off;
68
        unsigned short win_func_ptr_seg;
69
        unsigned short bytes_per_scanline;
70
        unsigned short x_resolution;
71
        unsigned short y_resolution;
72
        uint8_t x_char_size;
73
        uint8_t y_char_size;
74
        uint8_t number_of_planes;
75
        uint8_t bits_per_pixel;
76
        uint8_t number_of_banks;
77
        uint8_t memory_model;
78
        uint8_t bank_size;
79
        uint8_t number_of_image_pages;
80
        uint8_t res1;
81
        uint8_t red_mask_size;
82
        uint8_t red_field_position;
83
        uint8_t green_mask_size;
84
        uint8_t green_field_position;
85
        uint8_t blue_mask_size;
86
        uint8_t blue_field_position;
87
        uint8_t rsvd_mask_size;
88
        uint8_t rsvd_field_position;
89
        uint8_t direct_color_mode_info;
90
        unsigned int phys_base_ptr;
91
        unsigned int offscreen_mem_offset;
92
        unsigned short offscreen_mem_size;
93
        uint8_t res2[206];
94
        } __attribute__ ((packed));
95
 
96
struct vbe_palette_entry
97
        {
98
        uint8_t blue;
99
        uint8_t green;
100
        uint8_t red;
101
        uint8_t align;
102
        } __attribute__ ((packed));
103
 
104
#endif