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

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