vesah.inc 3.5 KB

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