Source code of Windows XP (NT5)
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.

211 lines
5.8 KiB

  1. /************************************************************************/
  2. /* */
  3. /* VDPDATA.H */
  4. /* */
  5. /* Copyright (c) 1993, ATI Technologies Incorporated. */
  6. /************************************************************************/
  7. /********************** PolyTron RCS Utilities
  8. $Revision: 1.1 $
  9. $Date: 20 Jul 1995 18:02:24 $
  10. $Author: mgrubac $
  11. $Log: S:/source/wnt/ms11/miniport/vcs/vdpdata.h $
  12. *
  13. * Rev 1.1 20 Jul 1995 18:02:24 mgrubac
  14. * Added support for VDIF files.
  15. *
  16. * Rev 1.0 31 Jan 1994 11:50:04 RWOLFF
  17. * Initial revision.
  18. Rev 1.1 05 Nov 1993 13:33:58 RWOLFF
  19. Fixed clock frequency table.
  20. Rev 1.0 16 Aug 1993 13:32:32 Robert_Wolff
  21. Initial revision.
  22. Rev 1.1 04 May 1993 16:51:10 RWOLFF
  23. Switched from floating point to long integers due to lack of floating point
  24. support in Windows NT kernel-mode code.
  25. Rev 1.0 30 Apr 1993 16:47:18 RWOLFF
  26. Initial revision.
  27. End of PolyTron RCS section *****************/
  28. #ifdef DOC
  29. VDPDATA.H - Definitions and structures used internally by VDPTOCRT.C.
  30. #endif
  31. /*
  32. * Sync polarities. INTERNAL_ERROR is an error code for functions
  33. * which have 0 as a legitimate return (e.g. GetPolarity). Functions
  34. * which do not have zero as a legitimate return value should follow
  35. * the "Zero = failure, Nonzero = success" convention.
  36. */
  37. #define POSITIVE 0
  38. #define NEGATIVE 1
  39. #define INTERNAL_ERROR -1
  40. // GENERAL CONSTANTS
  41. #define NONINTERLACED 0
  42. #define INTERLACED 1
  43. /*
  44. * Constants used in pseudo-floating point calculations
  45. */
  46. #define THOUSAND 1000L
  47. #define HALF_MILLION 500000L
  48. #define MILLION 1000000L
  49. /*
  50. * Data structure used for horz and vert information from the vddp file
  51. */
  52. typedef struct _HALFDATA
  53. {
  54. long Resolution; // pixels
  55. unsigned long ScanFrequency; // horz - Hz, vert - mHz
  56. char Polarity; // positive or negative
  57. unsigned long SyncWidth, // horz - ns, vert - us
  58. FrontPorch, // horz - ns, vert - us
  59. BackPorch, // horz - ns, vert - us
  60. ActiveTime, // horz - ns, vert - us
  61. BlankTime; // horz - ns, vert - us
  62. } HALFDATA, *P_HALFDATA;
  63. /*
  64. * Data structure used for complete preadjusted timing data set
  65. */
  66. typedef struct _TIMINGDATA
  67. {
  68. char ModeName[33]; // name of the video mode
  69. char Interlaced; // interlaced or non-interlaced mode
  70. HALFDATA HorzData; // horizontal data
  71. HALFDATA VertData; // vertical data
  72. } TIMINGDATA, *P_TIMINGDATA;
  73. /*
  74. * Data structure used to hold number of timings sections and pointers to
  75. * timings buffer for each limits section
  76. */
  77. typedef struct _LIMITSDATA
  78. {
  79. unsigned long DotClock; // maximum pixel clock -- for all assoc. timings
  80. long TimingsCount; // number of timings section for this limits sec.
  81. P_TIMINGDATA TimingsPtr; // pointer to buffer holding timings data
  82. }LIMITSDATA, *P_LIMITSDATA;
  83. typedef struct {
  84. char video_mode[33];
  85. unsigned char h_total, h_disp, h_sync_strt, h_sync_wid;
  86. unsigned long v_total, v_disp, v_sync_strt;
  87. unsigned char v_sync_wid, disp_cntl, crt_pitch, clk_sel;
  88. unsigned long pixel_clk;
  89. // ***** the values below this comment were added for instvddp.exe *****
  90. unsigned char lock,fifo_depth,vga_refresh_rate_code;
  91. unsigned long control,hi_color_ctl,hi_color_vfifo;
  92. } crtT;
  93. #if 0
  94. typedef enum {
  95. clk_43MHz = 0,
  96. clk_49MHz = 1,
  97. clk_93MHz = 2,
  98. clk_36MHz = 3,
  99. clk_50MHz = 4,
  100. clk_57MHz = 5,
  101. clk_extrn1 = 6,
  102. clk_45MHz = 7,
  103. clk_30MHz = 8,
  104. clk_32MHz = 9,
  105. clk_110MHz = 10,
  106. clk_80MHz = 11,
  107. clk_40MHz = 12,
  108. clk_75MHz = 14,
  109. clk_65MHz = 15
  110. } clockT;
  111. #endif
  112. #if 1
  113. typedef enum {
  114. clk_100MHz = 0,
  115. clk_126MHz = 1,
  116. clk_93MHz = 2,
  117. clk_36MHz = 3,
  118. clk_50MHz = 4,
  119. clk_57MHz = 5,
  120. clk_extrn1 = 6,
  121. clk_45MHz = 7,
  122. clk_135MHz = 8,
  123. clk_32MHz = 9,
  124. clk_110MHz = 10,
  125. clk_80MHz = 11,
  126. clk_40MHz = 12,
  127. clk_75MHz = 14,
  128. clk_65MHz = 15
  129. } clockT;
  130. #endif
  131. typedef struct {
  132. long clock_selector;
  133. long clock_freq;
  134. } clk_infoT;
  135. #ifdef INCLUDE_VDPDATA
  136. #if 0
  137. /* These are the pixel clocks for the 18810 Clock Chip */
  138. clk_infoT clock_info[16] = {
  139. { clk_43MHz , 42.95E+6 },
  140. { clk_49MHz , 48.77E+6 },
  141. { clk_93MHz , 92.40E+6 },
  142. { clk_36MHz , 36.00E+6 },
  143. { clk_50MHz , 50.35E+6 },
  144. { clk_57MHz , 56.64E+6 },
  145. { clk_extrn1 , 0.000000 },
  146. { clk_45MHz , 44.90E+6 },
  147. { clk_30MHz , 30.24E+6 },
  148. { clk_32MHz , 32.00E+6 },
  149. { clk_110MHz , 110.0E+6 },
  150. { clk_80MHz , 80.00E+6 },
  151. { clk_40MHz , 40.00E+6 },
  152. { clk_75MHz , 75.00E+6 },
  153. { clk_65MHz , 65.00E+6 },
  154. { -1 , 0.000000 }
  155. };
  156. #endif
  157. #if 1
  158. /* These are the pixel clocks for the 18811-1 Clock Chip */
  159. clk_infoT clock_info[16] = {
  160. { clk_100MHz , 100000000L },
  161. { clk_126MHz , 126000000L },
  162. { clk_93MHz , 92400000L },
  163. { clk_36MHz , 36000000L },
  164. { clk_50MHz , 50350000L },
  165. { clk_57MHz , 56640000L },
  166. { clk_extrn1 , 0L },
  167. { clk_45MHz , 44900000L },
  168. { clk_135MHz , 135000000L },
  169. { clk_32MHz , 32000000L },
  170. { clk_110MHz , 110000000L },
  171. { clk_80MHz , 80000000L },
  172. { clk_40MHz , 40000000L },
  173. { clk_75MHz , 75000000L },
  174. { clk_65MHz , 65000000L },
  175. { -1 , 0L }
  176. };
  177. #endif
  178. #else
  179. extern clk_infoT clock_info[16];
  180. #endif