Leaked source code of windows server 2003
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

99 lines
4.8 KiB

  1. //
  2. // This include file contains the format of the VESA EDID data structure as
  3. // described in the VESA Display Data Channel (DDC) Specification. It should
  4. // be included in any assembly language program that requires knowledge of the
  5. // EDID data structure.
  6. //
  7. typedef struct VESA_EDID {
  8. BYTE veHeader[8]; // 0,FFH,FFH,FFH,FFH,FFH,FFH,0
  9. BYTE veManufactID[2]; // in compressed format - see spec
  10. BYTE veProductCode[2]; // vendor assigned code
  11. DWORD veSerialNbr; // 32 bit serial nbr (LSB first)
  12. BYTE veWeekMade; // week of manufacture (0-53)
  13. BYTE veYearMade; // year of manufacture - 1990
  14. BYTE veEDIDVersion; // version number of EDID
  15. BYTE veEDIDRevision; // revision number of EDID
  16. BYTE veVidInputDef; // video input definition
  17. BYTE veMaxHorizSize; // horizontal image size in cm
  18. BYTE veMaxVertSize; // vertical image size in cm
  19. BYTE veGammaXFER; // (gamma * 100) - 100 (1.00-3.55)
  20. BYTE veDPMSFeatures; // DPMS feature support
  21. BYTE veRedGreenLow; // Rx1Rx0Ry1Ry0Gx1Gx0Gy1Gy0
  22. BYTE veBlueWhiteLow; // Bx1Bx0By1By0Wx1Wx0Wy1Wy0
  23. BYTE veRedx; // red X bit 9 - 2
  24. BYTE veRedy; // red Y bit 9 - 2
  25. BYTE veGreenx; // green X bit 9 - 2
  26. BYTE veGreeny; // green Y bit 9 - 2
  27. BYTE veBluex; // blue X bit 9 - 2
  28. BYTE veBluey; // blue Y bit 9 - 2
  29. BYTE veWhitex; // white X bit 9 - 2
  30. BYTE veWhitey; // white Y bit 9 - 2
  31. BYTE veEstTime1; // established timings I
  32. BYTE veEstTime2; // established timings II
  33. BYTE veEstTime3; // established timings II
  34. WORD veStdTimeID1; //
  35. WORD veStdTimeID2; //
  36. WORD veStdTimeID3; //
  37. WORD veStdTimeID4; //
  38. WORD veStdTimeID5; //
  39. WORD veStdTimeID6; //
  40. WORD veStdTimeID7; //
  41. WORD veStdTimeID8; //
  42. BYTE veDetailTime1[18]; //
  43. BYTE veDetailTime2[18]; //
  44. BYTE veDetailTime3[18]; //
  45. BYTE veDetailTime4[18]; //
  46. BYTE veExtensionFlag; // nbr of 128 EDID extensions
  47. BYTE veChecksum; // sum of all bytes == 0
  48. } VESA_EDID;
  49. /*ASM
  50. .errnz size VESA_EDID - 128 ;must be 128 bytes long!
  51. */
  52. //
  53. // bit definitions for the veEstTime1 field
  54. //
  55. #define veEstTime1_720x400x70Hz 0x80 // 720x400x70Hz VGA,IBM
  56. #define veEstTime1_720x400x88Hz 0x40 // 720x400x88Hz XGA2,IBM
  57. #define veEstTime1_640x480x60Hz 0x20 // 640x480x60Hz VGA,IBM
  58. #define veEstTime1_640x480x67Hz 0x10 // 640x480x67Hz MacII,Apple
  59. #define veEstTime1_640x480x72Hz 0x08 // 640x480x72Hz VESA
  60. #define veEstTime1_640x480x75Hz 0x04 // 640x480x75Hz VESA
  61. #define veEstTime1_800x600x56Hz 0x02 // 800x600x56Hz VESA
  62. #define veEstTime1_800x600x60Hz 0x01 // 800x600x60Hz VESA
  63. //
  64. // bit definitions for the veEstTime2 field
  65. //
  66. #define veEstTime2_800x600x72Hz 0x80 // 800x600x72Hz VESA
  67. #define veEstTime2_800x600x75Hz 0x40 // 800x600x75Hz VESA
  68. #define veEstTime2_832x624x75Hz 0x20 // 832x624x75Hz MacII,Apple
  69. #define veEstTime2_1024x768x87Hz 0x10 // 1024x768x87Hz IBM
  70. #define veEstTime2_1024x768x60Hz 0x08 // 1024x768x60Hz VESA
  71. #define veEstTime2_1024x768x70Hz 0x04 // 1024x768x70Hz VESA
  72. #define veEstTime2_1024x768x75Hz 0x02 // 1024x768x75Hz VESA
  73. #define veEstTime2_1280x1024x75Hz 0x01 // 1280x1024x75Hz VESA
  74. //
  75. // bit definitions for the veEstTime3 field (was veManTimes in DDC 1)
  76. //
  77. #define veEstTime3_1152x870x75Hz 0x80 // 800x600x72Hz MacII,Apple
  78. #define veEstTime3_640x480x85Hz 0x40 // 640x480x85Hz VESA
  79. #define veEstTime3_800x600x85Hz 0x20 // 800x600x85Hz VESA
  80. #define veEstTime3_1280x1024x85Hz 0x10 // 1280x1024x85Hz VESA
  81. #define veEstTime3_1024x768x85Hz 0x08 // 1024x768x85Hz VESA
  82. #define veEstTime3_1600x1200x75Hz 0x04 // 1600x1200x75Hz VESA
  83. #define veEstTime3_1600x1200x85Hz 0x02 // 1600x1200x85Hz VESA
  84. #define veEstTime3_ManReservedTime 0x01 // manufacturer's reserved timings
  85. //
  86. // bit definitions for the veStdTime field
  87. //
  88. #define veStdTime_HorzResMask 0x00FF // HorzRes = (X + 31) * 8
  89. #define veStdTime_RefreshRateMask 0x1F00 // RefreshRate = X + 60Hz
  90. #define veStdTime_AspectRatioMask 0xC000 //
  91. #define veStdTime_AspectRatio1to1 0x0000 // 1:1
  92. #define veStdTime_AspectRatio4to3 0x4000 // 4:3
  93. #define veStdTime_AspectRatio5to4 0x8000 // 5:4
  94. #define veStdTime_AspectRatio16to9 0xC000 // 16:9