~ubuntu-branches/ubuntu/feisty/fpc/feisty

« back to all changes in this revision

Viewing changes to packages/base/graph/go32v2/vesah.inc

  • Committer: Bazaar Package Importer
  • Author(s): Torsten Werner
  • Date: 2007-01-27 20:08:50 UTC
  • mfrom: (1.2.3 upstream)
  • Revision ID: james.westby@ubuntu.com-20070127200850-9mrptaqqjsx9nwa7
Tags: 2.0.4-5
* Fixed Build-Depends.
* Add myself to Uploaders in debian/control.
* Make sure that the sources are really patched before building them.
* Build unit 'libc' on powerpc too.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
{
 
2
 
 
3
    This file is part of the Free Pascal run time library.
 
4
    Copyright (c) 1999-2000 by Carl Eric Codere
 
5
 
 
6
    This include implements VESA basic access.
 
7
 
 
8
    See the file COPYING.FPC, included in this distribution,
 
9
    for details about the copyright.
 
10
 
 
11
    This program is distributed in the hope that it will be useful,
 
12
    but WITHOUT ANY WARRANTY; without even the implied warranty of
 
13
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
 
14
 
 
15
 **********************************************************************}
 
16
 
 
17
 
 
18
TYPE
 
19
 
 
20
  pModeList = ^tModeList;
 
21
  tModeList = Array [0..255] of word; {list of modes terminated by -1}
 
22
                                      {VESA modes are >=100h}
 
23
 
 
24
  TVESAinfo = packed record  { VESA Information request }
 
25
    signature : array [1..4] of char;     { This should be VESA   }
 
26
    version   : word;                     { VESA revision         }
 
27
    str       : pChar;                    { pointer to OEM string }
 
28
    caps      : longint;                  { video capabilities    }
 
29
    modeList  : pModeList;                { pointer to SVGA modes }
 
30
(*    pad       : array [18..260] of byte;  { extra padding more then   }
 
31
  end;                             { VESA standard because of bugs on }
 
32
                                   { some video cards.                }
 
33
  *)
 
34
    TotalMem     : word;
 
35
  { VESA 2.0 }
 
36
    OEMversion   : word;
 
37
    VendorPtr    : longint;
 
38
    ProductPtr   : longint;
 
39
    RevisionPtr  : longint;
 
40
    filler       : Array[1..478]of Byte;
 
41
  end;
 
42
 
 
43
  TVESAModeInfo = packed record
 
44
    attr           : word;             { mode attributes   (1.0)    }
 
45
    winAAttr,
 
46
    winBAttr       : byte;             { window attributes (1.0)    }
 
47
    winGranularity : word;  {in K}     { Window granularity (1.0)   }
 
48
    winSize        : word;  {in K}     { window size       (1.0)    }
 
49
    winASeg,                           { Window A Segment address (1.0) }
 
50
    winBSeg        : word;             { Window B Segment address (1.0) }
 
51
    winFunct       : procedure;        { Function to swtich bank    }
 
52
    BytesPerScanLine: word;            {bytes per scan line (1.0)   }
 
53
    { extended information }
 
54
    xRes, yRes : word;    {pixels}
 
55
    xCharSize,
 
56
    yCharSize  : byte;
 
57
    planes     : byte;
 
58
    bitsPixel  : byte;
 
59
    banks      : byte;
 
60
    memModel   : byte;
 
61
    bankSize   : byte;  {in K}
 
62
    NumberOfPages: byte;
 
63
(*
 
64
    pad : array [29..260] of byte; { always put some more space then required}
 
65
  end; *)
 
66
    reserved       : byte; { pos $1E }
 
67
    rm_size        : byte; { pos $1F }
 
68
    rf_pos         : byte; { pos $20 }
 
69
    gm_size        : byte; { pos $21 }
 
70
    gf_pos         : byte; { pos $22 }
 
71
    bm_size        : byte; { pos $23 }
 
72
    bf_pos         : byte; { pos $24 }
 
73
    (* res_mask       : word; { pos $25 }
 
74
      here there was an alignment problem !!
 
75
      with default alignment
 
76
      res_mask was shifted to $26
 
77
      and after PhysAddress to $2A !!! PM *)
 
78
    res_size       : byte;
 
79
    res_pos        : byte;
 
80
    DirectColorInfo: byte; { pos $27 }
 
81
  { VESA 2.0 }
 
82
    PhysAddress    : longint; { pos $28 }
 
83
    OffscreenPtr   : longint; { pos $2C }
 
84
    OffscreenMem   : word; { pos $30 }
 
85
    reserved2      : Array[1..458]of Byte; { pos $32 }
 
86
   end;
 
87
 
 
88
 
 
89
 
 
90
 
 
91
var
 
92
  VESAInfo    : TVESAInfo;         { VESA Driver information  }
 
93
  VESAModeInfo    : TVESAModeInfo;     { Current Mode information }
 
94
  hasVesa: Boolean;       { true if we have a VESA compatible graphics card}
 
95
                          { initialized in QueryAdapterInfo in graph.inc }