Modules/VESA - Allowed #if-ing out VM8086 use
[tpg/acess2.git] / KernelLand / Modules / Display / VESA / vbe.h
1 /*
2  * Acess2 Kernel VBE Driver
3  * - By John Hodge (thePowersGang)
4  *
5  * vbe.h
6  * - Definitions for VBE structures
7  */
8 #ifndef _VBE_H_
9 #define _VBE_H_
10
11 typedef struct sFarPtr
12 {
13         Uint16  ofs;
14         Uint16  seg;
15 }       tFarPtr;
16
17 typedef struct sVesa_CallModeInfo
18 {
19         /**
20          * 0 : Mode is supported
21          * 1 : Optional information avaliable (Xres onwards)
22          * 2 : BIOS Output Supported
23          * 3 : Colour Mode?
24          * 4 : Graphics mode?
25          * -- VBE v2.0+
26          * 5 : Mode is not VGA compatible
27          * 6 : Bank switched mode supported
28          * 7 : Linear framebuffer mode supported
29          * 8 : Double-scan mode avaliable
30          */
31         Uint16  attributes;
32         /**
33          * 0 : Window exists
34          * 1 : Window is readable
35          * 2 : Window is writable
36          */
37         Uint8   winA,winB;
38         Uint16  granularity;
39         Uint16  winsize;
40         Uint16  segmentA, segmentB;
41         tFarPtr realFctPtr;
42         Uint16  pitch;  // Bytes per scanline
43
44         Uint16  Xres, Yres;
45         Uint8   Wchar, Ychar, planes, bpp, banks;
46         Uint8   memory_model, bank_size, image_pages;
47         Uint8   reserved0;
48
49         // -- VBE v1.2+
50         Uint8   red_mask, red_position;
51         Uint8   green_mask, green_position;
52         Uint8   blue_mask, blue_position;
53         Uint8   rsv_mask, rsv_position;
54         Uint8   directcolor_attributes;
55
56         // -- VBE v2.0+
57         Uint32  physbase;
58         Uint32  offscreen_ptr;  // Start of offscreen memory
59         Uint16  offscreen_size_kb;      // Size of offscreen memory
60         
61         // -- VBE v3.0
62         Uint16  lfb_pitch;
63         Uint8   image_count_banked;
64         Uint8   image_count_lfb;
65 } PACKED        tVesa_CallModeInfo;
66
67 typedef struct sVesa_CallInfo
68 {
69         char            signature[4];           // == "VESA"
70         Uint16  Version;        // == 0x0300 for Vesa 3.0
71         tFarPtr OEMString;      // isa vbeFarPtr
72         Uint8   Capabilities[4];        
73         tFarPtr VideoModes;     // isa vbeParPtr
74         Uint16  TotalMemory;    // as # of 64KB blocks
75 } PACKED        tVesa_CallInfo;
76
77
78 #endif
79

UCC git Repository :: git.ucc.asn.au