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.

412 lines
16 KiB

  1. /*++
  2. Copyright (c) 1994-1995 IBM Corporation
  3. Module Name:
  4. pvgaequ.h
  5. Abstract:
  6. This module contains the constants/macros for WD90C24A/A2 registers
  7. Environment:
  8. kernel mode only
  9. Notes:
  10. Revision History:
  11. --*/
  12. /* */
  13. /* Regular Paradise Registers (0x3CE/0x3CF) */
  14. /* */
  15. #define pr0a 0x09 // Address Offset A
  16. #define pr0b 0x0a // Address Offset B
  17. #define pr1 0x0b // Memory Size
  18. #define pr2 0x0c // Video Select
  19. #define pr3 0x0d // CRT Lock Control
  20. #define pr4 0x0e // Video Control
  21. #define pr5 0x0f // Unlock PR0-PR4
  22. #define pr5_lock 0x00 // protect PR0-PR4
  23. #define pr5_unlock 0x05 // unprotect PR0-PR4
  24. /* */
  25. /* Regular Paradise Registers (0x3?4/0x3?5) */
  26. /* */
  27. #define pr10 0x29 // Unlock PR11-PR17 & Device ID registers
  28. #define pr10_lock 0x00 // protect PR11-PR17
  29. #define pr10_unlock 0x85 // unprotect PR11-PR17
  30. #define pr11 0x2a // EGA Switches
  31. #define pr11_lock 0x95 // protect Misc. Output & Clocking Mode
  32. #define pr11_unlock 0x90 // unprotect Misc. Output & Clocking Mode
  33. #define pr12 0x2b // Scratch Pad
  34. #define pr13 0x2c // Interlace H/2 Start
  35. #define pr14 0x2d // Interlace H/2 End
  36. #define pr15 0x2e // Miscellaneous Control 1
  37. #define pr16 0x2f // Miscellaneous Control 2
  38. #define pr17 0x30 // Miscellaneous Control 3
  39. #define pr18a 0x3d // CRTC Vertical Timing Overflow
  40. /* */
  41. /* Paradise Extended Registers (0x3C4/0x3C5) */
  42. /* */
  43. #define pr20 0x06 // Unlock Paradise Extended Registers
  44. #define pr20_lock 0x00 // protect PR21-PR73
  45. #define pr20_unlock 0x48 // unprotect PR21-PR73
  46. #define pr21 0x07 // Display Configuraiton Status
  47. #define pr22 0x08 // Scratch Pad
  48. #define pr23 0x09 // Scratch Pad
  49. #define pr30a 0x10 // Write Buffer & FIFO Control
  50. #define pr31 0x11 // System Interface Control
  51. #define pr32 0x12 // Miscellaneous Control 4
  52. #define pr33a 0x13 // DRAM Timing & 0 Wait State Control
  53. #define pr34a 0x14 // Display Memory Mapping
  54. #define pr35a 0x15 // FPUSR0, FPUSR1 Output Select
  55. #define pr45 0x16 // Video Signal Analyzer Control
  56. #define pr45a 0x17 // Signal Analyzer Data I
  57. #define pr45b 0x18 // Signal Analyzer Data II
  58. #define pr57 0x19 // Feature Register I
  59. #define pr58 0x20 // Feature Register II
  60. #define pr59 0x21 // Memory Arbitration Cycle Setup
  61. #define pr62 0x24 // FR Timing
  62. #define pr63 0x25 // Read/Write FIFO Control
  63. #define pr58a 0x26 // Memory Map to I/O Register for BitBlt
  64. #define pr64 0x27 // CRT Lock Control II
  65. #define pr65 0x28 // reserved
  66. #define pr66 0x29 // Feature Register III
  67. #define pr68 0x31 // Programmable Clock Selection
  68. #define pr69 0x32 // Programmable VCLK Frequency
  69. #define pr70 0x33 // Mixed Voltage Override
  70. #define pr71 0x34 // Programmable Refresh Timing
  71. #define pr72 0x35 // Unlock PR68
  72. #define pr72_lock 0x00 // protect PR68
  73. #define pr72_unlock 0x50 // unprotect PR68
  74. #define pr73 0x36 // VGA Status Detect
  75. /* */
  76. /* Flat Panel Paradise Registers (0x3?4/0x3?5) */
  77. /* */
  78. #define pr18 0x31 // Flat Panel Status
  79. #define pr19 0x32 // Flat Panel Control I
  80. #define pr1a 0x33 // Flat Panel Control II
  81. #define pr1b 0x34 // Unlock Flat Panel Registers
  82. #define pr1b_lock 0x00 // protect PR18-PR44 & shadow registers
  83. #define pr1b_unlock_shadow 0x06 // unprotect shadow CRTC registers
  84. #define pr1b_unlock_pr 0xa0 // unprotect PR18-PR44
  85. #define pr1b_unlock (pr1b_unlock_shadow | pr1b_unlock_pr)
  86. #define pr36 0x3b // Flat Panel Height Select
  87. #define pr37 0x3c // Flat Panel Blinking Control
  88. #define pr39 0x3e // Color LCD Control
  89. #define pr41 0x37 // Vertical Expansion Initial Value
  90. #define pr44 0x3f // Powerdown & Memory Refresh Control
  91. /* */
  92. /* Mapping RAM Registers (0x3?4/0x3?5) */
  93. /* */
  94. #define pr30 0x35 // Unlock Mapping RAM
  95. #define pr30_lock 0x00 // protect PR33-PR35
  96. #define pr30_unlock 0x30 // unprotect PR33-PR35
  97. #define pr33 0x38 // Mapping RAM Address Counter
  98. #define pr34 0x39 // Mapping RAM Data
  99. #define pr35 0x3a // Mapping RAM & Powerdown Control
  100. /* */
  101. /* Register Initialization Parameters */
  102. /* */
  103. #define pr0a_all 0x00
  104. #define pr0b_all 0x00
  105. #define pr1_all 0xc5
  106. #define pr2_crt 0x00
  107. #define pr2_tft 0x01
  108. #define pr2_s32 0x01
  109. #define pr2_stn 0x01
  110. #define pr2_s16 0x01
  111. #define pr2_stnc 0x01
  112. #define pr3_all 0x02 // <- 0x00
  113. #define pr3_tft800s 0x02
  114. #define pr3_tft800e 0x21
  115. #define pr4_all 0x61 // <- 0x40
  116. #define pr12_all 0x00
  117. #define pr12_244LP 0xe8
  118. #define pr13_all 0x00
  119. #define pr14_all 0x00
  120. #define pr15_all 0x00
  121. #define pr15_tft800 0x40
  122. #define pr16_all 0x42
  123. #define pr17_all 0x00
  124. #define pr17_244LP 0x40
  125. #define pr18_crt_tft 0x43
  126. #define pr18_crt_stn 0x00
  127. #define pr18_tft 0xc7
  128. #define pr18_s32 0x47
  129. #define pr18_stn 0x80
  130. #define pr18_s16 0x00
  131. #define pr18_stnc 0x00
  132. #define pr18_tft800 0x47
  133. #define pr19_disable 0x40
  134. #define pr19_crt 0x64
  135. #define pr19_tft 0x44 // <- 0x54
  136. #define pr19_s32 0x64 // <- 0x74
  137. #define pr19_stn 0x44 // <- 0x54
  138. #define pr19_s16 0x64 // <- 0x74
  139. #define pr19_stnc 0x64 // <- 0x74
  140. #define pr19_stnc_only 0x44 // <- 0x54
  141. #define pr19_tft800 0x60 // <- 0x70
  142. #define pr39_crt 0x24
  143. #define pr39_tft 0x24
  144. #define pr39_s32 0x24
  145. #define pr39_stn 0x00
  146. #define pr39_s16 0x04
  147. #define pr39_stnc 0x24
  148. #define pr39_tft800 0x24
  149. #define pr1a_all 0x00
  150. #define pr1a_stnc 0x60
  151. #define pr1a_tft800 0x90
  152. #define pr36_all 0xef
  153. #define pr37_crt 0x9a
  154. #define pr37_tft 0x9a
  155. #define pr37_s32 0x9a
  156. #define pr37_stn 0x9a
  157. #define pr37_s16 0x1a
  158. #define pr37_stnc 0x9a
  159. #define pr18a_all 0x00
  160. #define pr41_all 0x00
  161. #define pr44_all 0x00
  162. #define pr33_all 0x00
  163. #define pr34_all 0x00
  164. #define pr35_all 0x22 // <- 0x02
  165. #define pr35_suspend 0xa2
  166. #define pr21_all 0x00
  167. #define pr22_all 0x00
  168. #define pr23_all 0x00
  169. #define pr30a_crt 0xc1
  170. #define pr30a_tft 0xc1
  171. #define pr30a_s32 0xc1
  172. #define pr30a_stn 0xc1
  173. #define pr30a_s16 0xe1
  174. #define pr30a_stnc 0xe1
  175. #define pr31_all 0x25 // <- 0x21
  176. #define pr32_all 0x00
  177. #define pr33a_all 0x82
  178. #define pr33a_stnc 0x82
  179. #define pr34a_all 0x00
  180. #define pr35a_all 0x00
  181. #define pr45_all 0x00
  182. #define pr45a_all 0x00
  183. #define pr45b_all 0x00
  184. #define pr57_all 0x31 // <- 0x33
  185. #define pr58_all 0x00
  186. #define pr58a_all 0x00
  187. #define pr59_all_sivA 0x35
  188. #define pr59_crt 0x15
  189. #define pr59_tft 0x15
  190. #define pr59_s32 0x15
  191. #define pr59_stn 0x35
  192. #define pr59_s16 0x35
  193. #define pr59_stnc 0x03
  194. #define pr59_stnc_a2 0x02
  195. #define pr59_tft800 0x10
  196. #define pr62_all 0x3c
  197. #define pr63_all 0x00
  198. #define pr64_all 0x03
  199. #define pr66_crt 0x40
  200. #define pr66_tft 0x40
  201. #define pr66_s32 0x40
  202. #define pr66_stn 0x40
  203. #define pr66_s16 0x40
  204. #define pr66_stnc 0x40
  205. #define pr68_crt 0x0d
  206. #define pr68_tft 0x0d
  207. #define pr68_s32 0x0d
  208. #define pr68_stn 0x1d
  209. #define pr68_s16 0x0d
  210. #define pr68_stnc 0x0d
  211. #define pr68_stnc_only 0x05
  212. #define pr68_stnc_only_a2 0x05
  213. #define pr69_all 0x00
  214. #define pr69_stnc_only 0x4c
  215. #define pr69_stnc_only_a2 0x45
  216. #define pr70_all 0x36 // <- 0x32
  217. #define pr71_all 0x00 // <- 0x27
  218. #define pr73_all 0x01
  219. /* */
  220. /* CRTC shadow registers */
  221. /* */
  222. #define crtc00_tft 0x5f // TFT color LCD only
  223. #define crtc02_tft 0x50
  224. #define crtc03_tft 0x82
  225. #define crtc04_tft 0x54
  226. #define crtc05_tft 0x80
  227. #define crtc06_tft 0x0b
  228. #define crtc07_tft 0x3e
  229. #define crtc10_tft 0xea
  230. #define crtc11_tft 0x2c // <- 0x8c
  231. #define crtc15_tft 0xe7
  232. #define crtc16_tft 0x04
  233. #define crtc00_s32 0x5f // TFT color simultaneous
  234. #define crtc02_s32 0x50
  235. #define crtc03_s32 0x82
  236. #define crtc04_s32 0x54
  237. #define crtc05_s32 0x80
  238. #define crtc06_s32 0x0b
  239. #define crtc07_s32 0x3e
  240. #define crtc10_s32 0xea
  241. #define crtc11_s32 0x2c // <- 0x8c
  242. #define crtc15_s32 0xe7
  243. #define crtc16_s32 0x04
  244. #define crtc00_stn 0x5f // STN mono LCD only
  245. #define crtc02_stn 0x50
  246. #define crtc03_stn 0x82
  247. #define crtc04_stn 0x54
  248. #define crtc05_stn 0x80
  249. #define crtc06_stn 0xf2
  250. #define crtc07_stn 0x12
  251. #define crtc10_stn 0xf0
  252. #define crtc11_stn 0x22 // <- 0x82
  253. #define crtc15_stn 0xf0
  254. #define crtc16_stn 0xf2
  255. #define crtc00_s16 0x5f // STN mono simultaneous
  256. #define crtc02_s16 0x50
  257. #define crtc03_s16 0x82
  258. #define crtc04_s16 0x54
  259. #define crtc05_s16 0x80
  260. #define crtc06_s16 0x12
  261. #define crtc07_s16 0x3e
  262. #define crtc10_s16 0xea
  263. #define crtc11_s16 0x2c // <- 0x8c
  264. #define crtc15_s16 0xe7
  265. #define crtc16_s16 0x04
  266. #define crtc00_stnc 0x60 // STN color simultaneous (WD90C24A.C)
  267. #define crtc02_stnc 0x50
  268. #define crtc03_stnc 0x83
  269. #define crtc04_stnc 0x55
  270. #define crtc05_stnc 0x81
  271. #define crtc06_stnc 0x0e
  272. #define crtc07_stnc 0x3e
  273. #define crtc10_stnc 0xea
  274. #define crtc11_stnc 0x2e // <- 0x8e
  275. #define crtc15_stnc 0xe7
  276. #define crtc16_stnc 0x04
  277. #define crtc00_stnc_iso 0x67 // STN color simultaneous (WD90C24A.C & 75Hz)
  278. #define crtc02_stnc_iso 0x50
  279. #define crtc03_stnc_iso 0x8a
  280. #define crtc04_stnc_iso 0x57
  281. #define crtc05_stnc_iso 0x88
  282. #define crtc00_stnc_a2 0x5f // STN color simultaneous (WD90C24A2.D)
  283. #define crtc02_stnc_a2 0x50
  284. #define crtc03_stnc_a2 0x82
  285. #define crtc04_stnc_a2 0x54
  286. #define crtc05_stnc_a2 0x80
  287. #define crtc00_stnc_iso_a2 0x5f // STN color simultaneous (WD90C24A2.D & 75Hz)
  288. #define crtc02_stnc_iso_a2 0x50
  289. #define crtc03_stnc_iso_a2 0x82
  290. #define crtc04_stnc_iso_a2 0x54
  291. #define crtc05_stnc_iso_a2 0x80
  292. #define crtc00_stnc_only 0x67 // STN color LCD only
  293. #define crtc02_stnc_only 0x50
  294. #define crtc03_stnc_only 0x82
  295. #define crtc04_stnc_only 0x55
  296. #define crtc05_stnc_only 0x81
  297. #define crtc06_stnc_only 0xe6
  298. #define crtc07_stnc_only 0x1f
  299. #define crtc10_stnc_only 0xe0
  300. #define crtc11_stnc_only 0x22 // <- 0x82
  301. #define crtc15_stnc_only 0xe0
  302. #define crtc16_stnc_only 0xe2
  303. #define crtc00_tft800 0x7f // TFT 800x600 color simultaneous
  304. #define crtc01_tft800 0x63
  305. #define crtc02_tft800 0x64
  306. #define crtc03_tft800 0x82
  307. #define crtc04_tft800 0x6b // <- 0x69
  308. #define crtc05_tft800 0x1b // <- 0x79
  309. #define crtc06_tft800 0x72 // <- 0x71
  310. #define crtc07_tft800 0xf0
  311. #define crtc09_tft800 0x6f
  312. #define crtc10_tft800 0x58
  313. #define crtc11_tft800 0x2c
  314. #define crtc12_tft800 0x57
  315. #define crtc13_tft800 0x32
  316. #define crtc15_tft800 0x58
  317. #define crtc16_tft800 0x71
  318. /* */
  319. /* Extended Paradise Registers ... BitBlt, H/W Cursor, and Line Drawing */
  320. /* */
  321. #define EPR_INDEX 0x23C0 // Index Control
  322. #define EPR_DATA 0x23C2 // Register Access Port
  323. #define EPR_BITBLT 0x23C4 // BitBlt I/O Port
  324. #define BLT_CTRL1 0x0000 // Index 0 - BITBLT Control 1
  325. #define BLT_CTRL2 0x1000 // Index 1 - BITBLT Control 1
  326. #define BLT_SRC_LO 0x2000 // Index 2 - BITBLT Source Low
  327. #define BLT_SRC_HI 0x3000 // Index 3 - BITBLT Source High
  328. #define BLT_DST_LO 0x4000 // Index 4 - BITBLT Destination Low
  329. #define BLT_DST_HI 0x5000 // Index 5 - BITBLT Destination High
  330. #define BLT_SIZE_X 0x6000 // Index 6 - BITBLT Dimension X
  331. #define BLT_SIZE_Y 0x7000 // Index 7 - BITBLT Dimension Y
  332. #define BLT_DELTA 0x8000 // Index 8 - BITBLT Row Pitch
  333. #define BLT_ROPS 0x9000 // Index 9 - BITBLT Raster Operation
  334. #define BLT_F_CLR 0xA000 // Index A - BITBLT Foreground Color
  335. #define BLT_B_CLR 0xB000 // Index B - BITBLT Background Color
  336. #define BLT_T_CLR 0xC000 // Index C - BITBLT Transparency Color
  337. #define BLT_T_MASK 0xD000 // Index D - BITBLT Transparency Mask
  338. #define BLT_PLANE 0xE000 // Index E - BITBLT Map and Plane Mask
  339. #define BLT_IN_PROG 0x0800 // BITBLT Activation Status
  340. #define CUR_CTRL 0x0000 // Index 0 - Cursor Control
  341. #define CUR_PAT_LO 0x1000 // Index 1 - Cursor Pattern Address Low
  342. #define CUR_PAT_HI 0x2000 // Index 2 - Cursor Pattern Address High
  343. #define CUR_PRI_CLR 0x3000 // Index 3 - Cursor Primary Color
  344. #define CUR_SEC_CLR 0x4000 // Index 4 - Cursor Secondary Color
  345. #define CUR_ORIGIN 0x5000 // Index 5 - Cursor Origin
  346. #define CUR_POS_X 0x6000 // Index 6 - Cursor Display Position X
  347. #define CUR_POS_Y 0x7000 // Index 7 - Cursor Display Position Y
  348. #define CUR_AUX_CLR 0x8000 // Index 8 - Cursor Auxiliary Color
  349. #define CUR_ENABLE 0x0800 // Cursor Enable (Index 0)
  350. /* */
  351. /* Local Bus Registers */
  352. /* */
  353. #define LBUS_REG_0 0x2DF0 // Local Bus Register 0
  354. #define LBUS_REG_1 0x2DF1 // Local Bus Register 1
  355. #define LBUS_REG_2 0x2DF2 // Local Bus Register 2
  356.