Windows NT 4.0 source code leak
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.

1302 lines
30 KiB

4 years ago
  1. // #pragma comment(exestr, "@(#) mode542x.h 1.1 95/09/28 15:43:49 nec")
  2. /*++
  3. Copyright (c) 1992 Microsoft Corporation
  4. Module Name:
  5. Mode542x.h
  6. Abstract:
  7. This module contains all the global data used by the Cirrus Logic
  8. CL-542x driver.
  9. Environment:
  10. Kernel mode
  11. Revision History:
  12. --*/
  13. //
  14. // The next set of tables are for the CL542x
  15. // Note: all resolutions supported
  16. //
  17. //
  18. // 640x480 16-color mode (BIOS mode 12) set command string for CL 542x.
  19. //
  20. USHORT CL542x_640x480[] = {
  21. OWM, // begin setmode
  22. SEQ_ADDRESS_PORT,
  23. 2, // count
  24. 0x1206, // enable extensions
  25. 0x0012,
  26. OWM,
  27. GRAPH_ADDRESS_PORT,
  28. 3,
  29. 0x0009, 0x000a, 0x000b, // no banking in 640x480 mode
  30. EOD
  31. };
  32. //
  33. // 800x600 16-color (60Hz refresh) mode set command string for CL 542x.
  34. //
  35. USHORT CL542x_800x600[] = {
  36. OWM, // begin setmode
  37. SEQ_ADDRESS_PORT,
  38. 2, // count
  39. 0x1206, // enable extensions
  40. 0x0012,
  41. OWM,
  42. GRAPH_ADDRESS_PORT,
  43. 3,
  44. 0x0009, 0x000a, 0x000b, // no banking in 800x600 mode
  45. EOD
  46. };
  47. //
  48. // 1024x768 16-color (60Hz refresh) mode set command string for CL 542x.
  49. //
  50. USHORT CL542x_1024x768[] = {
  51. OWM, // begin setmode
  52. SEQ_ADDRESS_PORT,
  53. 2, // count
  54. 0x1206, // enable extensions
  55. 0x0012,
  56. OWM,
  57. GRAPH_ADDRESS_PORT,
  58. 3,
  59. #if ONE_64K_BANK
  60. 0x0009, 0x000a, 0x000b,
  61. #endif
  62. #if TWO_32K_BANKS
  63. 0x0009, 0x000a, 0x010b,
  64. #endif
  65. OB,
  66. DAC_PIXEL_MASK_PORT,
  67. 0xFF,
  68. EOD
  69. };
  70. //-----------------------------
  71. // standard VGA text modes here
  72. // 80x25 at 640x350
  73. //
  74. //-----------------------------
  75. //
  76. // 80x25 text mode set command string for CL 542x.
  77. // (720x400 pixel resolution; 9x16 character cell.)
  78. //
  79. USHORT CL542x_80x25Text[] = {
  80. OWM, // begin setmode
  81. SEQ_ADDRESS_PORT,
  82. 2, // count
  83. 0x1206, // enable extensions
  84. 0x0012,
  85. OWM,
  86. GRAPH_ADDRESS_PORT,
  87. 3,
  88. 0x0009, 0x000a, 0x000b, // no banking in text mode
  89. EOD
  90. };
  91. //
  92. // 80x25 text mode set command string for CL 542x.
  93. // (640x350 pixel resolution; 8x14 character cell.)
  94. //
  95. USHORT CL542x_80x25_14_Text[] = {
  96. OWM, // begin setmode
  97. SEQ_ADDRESS_PORT,
  98. 2, // count
  99. 0x1206, // enable extensions
  100. 0x0012,
  101. OWM,
  102. GRAPH_ADDRESS_PORT,
  103. 3,
  104. 0x0009, 0x000a, 0x000b, // no banking in text mode
  105. EOD
  106. };
  107. //
  108. // 1280x1024 16-color mode (BIOS mode 0x6C) set command string for CL 542x.
  109. //
  110. USHORT CL542x_1280x1024[] = {
  111. OWM, // begin setmode
  112. SEQ_ADDRESS_PORT,
  113. 2, // count
  114. 0x1206, // enable extensions
  115. 0x0012,
  116. OWM,
  117. GRAPH_ADDRESS_PORT,
  118. 3,
  119. #if ONE_64K_BANK
  120. 0x0009, 0x000a, 0x000b,
  121. #endif
  122. #if TWO_32K_BANKS
  123. 0x0009, 0x000a, 0x010b,
  124. #endif
  125. EOD
  126. };
  127. //
  128. // 640x480 64k-color mode (BIOS mode 0x64) set command string for CL 542x.
  129. //
  130. USHORT CL542x_640x480_64k[] = {
  131. OWM, // begin setmode
  132. SEQ_ADDRESS_PORT,
  133. 2, // count
  134. 0x1206, // enable extensions
  135. 0x0012,
  136. OWM,
  137. GRAPH_ADDRESS_PORT,
  138. 4,
  139. 0x0506, // Some BIOS's set Chain Odd maps bit
  140. #if ONE_64K_BANK
  141. 0x0009, 0x000a, 0x000b,
  142. #endif
  143. #if TWO_32K_BANKS
  144. 0x0009, 0x000a, 0x010b,
  145. #endif
  146. EOD
  147. };
  148. #ifdef _X86_
  149. //
  150. // 640x480 256-color mode (BIOS mode 0x5F) set command string for CL 542x.
  151. //
  152. USHORT CL542x_640x480_256[] = {
  153. OWM, // begin setmode
  154. SEQ_ADDRESS_PORT,
  155. 2, // count
  156. 0x1206, // enable extensions
  157. 0x0012,
  158. OWM,
  159. GRAPH_ADDRESS_PORT,
  160. 3,
  161. #if ONE_64K_BANK
  162. 0x0009, 0x000a, 0x000b,
  163. #endif
  164. #if TWO_32K_BANKS
  165. 0x0009, 0x000a, 0x010b,
  166. #endif
  167. EOD
  168. };
  169. //
  170. // 800x600 256-color mode (BIOS mode 0x5C) set command string for CL 542x.
  171. //
  172. USHORT CL542x_800x600_256[] = {
  173. OWM, // begin setmode
  174. SEQ_ADDRESS_PORT,
  175. 2, // count
  176. 0x1206, // enable extensions
  177. 0x0012,
  178. OWM,
  179. GRAPH_ADDRESS_PORT,
  180. 3,
  181. #if ONE_64K_BANK
  182. 0x0009, 0x000a, 0x000b,
  183. #endif
  184. #if TWO_32K_BANKS
  185. 0x0009, 0x000a, 0x010b,
  186. #endif
  187. EOD
  188. };
  189. #else
  190. //
  191. // NOTE(DBCS) : Update 94/09/12 - NEC Corporation
  192. //
  193. // - Add mode set command string for NEC MIPS machine.
  194. //
  195. // - 640x480 256 color 72Hz
  196. // - 800x600 256 color 56 / 60Hz
  197. // - 1024x768 256 color 70 / 45Hz
  198. //
  199. #if defined(DBCS) && defined(_MIPS_)
  200. //
  201. // For MIPS NEC machine only
  202. //
  203. //
  204. // 640x480 256-color 60Hz mode (BIOS mode 0x5F) set command string for
  205. // CL 542x.
  206. //
  207. USHORT CL542x_640x480_256_60[] = {
  208. OWM, // begin setmode
  209. SEQ_ADDRESS_PORT,
  210. 2, // count
  211. 0x1206, // enable extensions
  212. 0x0012,
  213. OWM, // begin setmode
  214. SEQ_ADDRESS_PORT,
  215. 15, // count
  216. 0x100, // start sync reset
  217. 0x0101,0x0F02,0x0003,0x0E04, // program up sequencer
  218. //
  219. // the Miniport Driver for R96 machine is Liner addressing mode.
  220. // This set command was changed Liner addressing.
  221. //
  222. (LA_MASK << 12 | 0x0107),
  223. 0x0008,
  224. 0x4A0B,0x5B0C,0x450D,0x7E0E,
  225. 0x2B1B,0x2F1C,0x301D,0x331E,
  226. OB, // point sequencer index to ff
  227. SEQ_ADDRESS_PORT,
  228. 0x0F,
  229. METAOUT+MASKOUT, // masked out.
  230. SEQ_DATA_PORT,
  231. 0xDF,0x20, // and mask, xor mask
  232. OB, // misc. register
  233. MISC_OUTPUT_REG_WRITE_PORT,
  234. 0xE3,
  235. OW, // text/graphics bit
  236. GRAPH_ADDRESS_PORT,
  237. 0x506,
  238. OW, // end sync reset
  239. SEQ_ADDRESS_PORT,
  240. 0x300,
  241. OW, // unprotect crtc 0-7
  242. CRTC_ADDRESS_PORT_COLOR,
  243. 0x2011,
  244. METAOUT+INDXOUT, // program crtc registers
  245. CRTC_ADDRESS_PORT_COLOR,
  246. 28,0, // count, startindex
  247. //
  248. // NOTE(DBCS) : Update 94/10/26 - NEC Corporation
  249. //
  250. // - Set Mode Type is VESA compatible.
  251. //
  252. #if defined(DBCS) && defined(_MIPS_)
  253. 0x5D, 0x4F, 0x50, 0x82, 0x53, 0x9F,
  254. 0x00, 0x3E, 0x00, 0x40, 0x00, 0x00,
  255. 0x00, 0x00, 0x00, 0x00, 0xE1, 0x83,
  256. 0xDF, 0x50, 0x00, 0xE7, 0x04, 0xE3,
  257. 0xFF, 0x00, 0x00, 0x22,
  258. #else
  259. 0x5f, 0x4f, 0x50, 0x82, 0x54, 0x80,
  260. 0x0b, 0x3e, 0x00, 0x40, 0x00, 0x00,
  261. 0x00, 0x00, 0x00, 0x00, 0xea, 0x8c,
  262. 0xdf, 0x50, 0x00, 0xe7, 0x04, 0xe3,
  263. 0xff, 0x00, 0x00, 0x22,
  264. #endif // defined(DBCS) && defined(_MIPS_)
  265. METAOUT+INDXOUT, // program gdc registers
  266. GRAPH_ADDRESS_PORT,
  267. 9,0, // count, startindex
  268. 0x00, 0x00, 0x00, 0x00, 0x00, 0x40,
  269. 0x05, 0x0F, 0xFF,
  270. IB, // prepare atc for writing
  271. INPUT_STATUS_1_COLOR,
  272. METAOUT+ATCOUT, // program atc registers
  273. ATT_ADDRESS_PORT,
  274. 21,0, // count, startindex
  275. 0x00, 0x01, 0x02, 0x03, 0x04, 0x05,
  276. 0x06, 0x07, 0x08, 0x09, 0x0A, 0x0B,
  277. 0x0C, 0x0D, 0x0E, 0x0F, 0x41, 0x00,
  278. 0x0F, 0x00, 0x00,
  279. OB, // turn video on.
  280. ATT_ADDRESS_PORT,
  281. 0x20,
  282. OB,
  283. DAC_PIXEL_MASK_PORT,
  284. 0xFF,
  285. OWM,
  286. GRAPH_ADDRESS_PORT,
  287. 3,
  288. //
  289. // The Miniport Driver for R96 machine is Liner addressing mode.
  290. // This set command was changed it for Liner addressing.
  291. //
  292. 0x0009, 0x000a, 0x000b,
  293. EOD
  294. };
  295. //
  296. // 640x480 256-color 72Hz mode (BIOS mode 0x5F) set command string for
  297. // CL 542x.
  298. //
  299. USHORT CL542x_640x480_256_72[] = {
  300. OWM, // begin setmode
  301. SEQ_ADDRESS_PORT,
  302. 2, // count
  303. 0x1206, // enable extensions
  304. 0x0012,
  305. OWM, // begin setmode
  306. SEQ_ADDRESS_PORT,
  307. 15, // count
  308. 0x100, // start sync reset
  309. 0x0101,0x0F02,0x0003,0x0E04, // program up sequencer
  310. //
  311. // the Miniport Driver for R96 machine is Liner addressing mode.
  312. // This set command was changed Liner addressing.
  313. //
  314. (LA_MASK << 12 | 0x0107),
  315. 0x0008,
  316. 0x4A0B,0x5B0C,0x450D,0x420E,
  317. 0x2B1B,0x2F1C,0x301D,0x1F1E,
  318. OB, // point sequencer index to ff
  319. SEQ_ADDRESS_PORT,
  320. 0x0F,
  321. METAOUT+MASKOUT, // masked out.
  322. SEQ_DATA_PORT,
  323. 0xDF,0x20, // and mask, xor mask
  324. OB, // misc. register
  325. MISC_OUTPUT_REG_WRITE_PORT,
  326. 0xEF,
  327. OW, // text/graphics bit
  328. GRAPH_ADDRESS_PORT,
  329. 0x506,
  330. OW, // end sync reset
  331. SEQ_ADDRESS_PORT,
  332. 0x300,
  333. OW, // unprotect crtc 0-7
  334. CRTC_ADDRESS_PORT_COLOR,
  335. 0x2011,
  336. METAOUT+INDXOUT, // program crtc registers
  337. CRTC_ADDRESS_PORT_COLOR,
  338. 28,0, // count, startindex
  339. //
  340. // NOTE(DBCS) : Update 95/06/30 - NEC Corporation (same as cirrus\mode542x.h)
  341. //
  342. // - Set Mode Type is VESA compatible. (Old Miss match)
  343. //
  344. #if defined(DBCS) && defined(_MIPS_)
  345. 0x61, 0x4F, 0x50, 0x82, 0x54, 0x99,
  346. 0xF6, 0x1F, 0x00, 0x40, 0x00, 0x00,
  347. 0x00, 0x00, 0x00, 0x00, 0xE0, 0x03,
  348. 0xDF, 0x50, 0x00, 0xE7, 0x04, 0xE3,
  349. 0xFF, 0x00, 0x00, 0x22,
  350. //
  351. // NOTE(DBCS) : Update 94/10/26 - NEC Corporation
  352. //
  353. // - Set Mode Type is VESA compatible.
  354. //
  355. // 0x63, 0x4F, 0x50, 0x82, 0x55, 0x9A, thase parameter not match
  356. // 0x06, 0x3E, 0x00, 0x40, 0x00, 0x00, VESA Mode.
  357. // 0x00, 0x00, 0x00, 0x00, 0xE8, 0x8B,
  358. // 0xDF, 0x50, 0x00, 0xE7, 0x04, 0xE3,
  359. // 0xFF, 0x00, 0x00, 0x22,
  360. #else
  361. 0x5f, 0x4f, 0x50, 0x82, 0x54, 0x80,
  362. 0x0b, 0x3e, 0x00, 0x40, 0x00, 0x00,
  363. 0x00, 0x00, 0x00, 0x00, 0xea, 0x8c,
  364. 0xdf, 0x50, 0x00, 0xe7, 0x04, 0xe3,
  365. 0xff, 0x00, 0x00, 0x22,
  366. #endif // defined(DBCS) && defined(_MIPS_)
  367. METAOUT+INDXOUT, // program gdc registers
  368. GRAPH_ADDRESS_PORT,
  369. 9,0, // count, startindex
  370. 0x00, 0x00, 0x00, 0x00, 0x00, 0x40,
  371. 0x05, 0x0F, 0xFF,
  372. IB, // prepare atc for writing
  373. INPUT_STATUS_1_COLOR,
  374. METAOUT+ATCOUT, // program atc registers
  375. ATT_ADDRESS_PORT,
  376. 21,0, // count, startindex
  377. 0x00, 0x01, 0x02, 0x03, 0x04, 0x05,
  378. 0x06, 0x07, 0x08, 0x09, 0x0A, 0x0B,
  379. 0x0C, 0x0D, 0x0E, 0x0F, 0x41, 0x00,
  380. 0x0F, 0x00, 0x00,
  381. OB, // turn video on.
  382. ATT_ADDRESS_PORT,
  383. 0x20,
  384. OB,
  385. DAC_PIXEL_MASK_PORT,
  386. 0xFF,
  387. OWM,
  388. GRAPH_ADDRESS_PORT,
  389. 3,
  390. //
  391. // The Miniport Driver for R96 machine is Liner addressing mode.
  392. // This set command was changed it for Liner addressing.
  393. //
  394. 0x0009, 0x000a, 0x000b,
  395. EOD
  396. };
  397. //
  398. // 800x600 256-color 56Hz mode (BIOS mode 0x5C) set command string for
  399. // CL 542x.
  400. //
  401. USHORT CL542x_800x600_256_56[] = {
  402. OWM, // begin setmode
  403. SEQ_ADDRESS_PORT,
  404. 2, // count
  405. 0x1206, // enable extensions
  406. 0x0012,
  407. OWM, // begin setmode
  408. SEQ_ADDRESS_PORT,
  409. 15, // count
  410. 0x100, // start sync reset
  411. 0x0101,0x0F02,0x0003,0x0E04, // program up sequencer
  412. //
  413. // The Miniport Driver for R96 machine is Liner addressing mode.
  414. // This set command was changed Liner addressing.
  415. //
  416. (LA_MASK << 12 | 0x0107),
  417. 0x0008,
  418. 0x4A0B,0x5B0C,0x450D,0x7E0E,
  419. 0x2B1B,0x2F1C,0x301D,0x331E,
  420. OB, // point sequencer index to ff
  421. SEQ_ADDRESS_PORT,
  422. 0x0F,
  423. METAOUT+MASKOUT, // masked out.
  424. SEQ_DATA_PORT,
  425. 0xDF,0x20, // and mask, xor mask
  426. OB, // misc. register
  427. MISC_OUTPUT_REG_WRITE_PORT,
  428. 0xEF,
  429. OW, // text/graphics bit
  430. GRAPH_ADDRESS_PORT,
  431. 0x506,
  432. OW, // end sync reset
  433. SEQ_ADDRESS_PORT,
  434. 0x300,
  435. OW, // unprotect crtc 0-7
  436. CRTC_ADDRESS_PORT_COLOR,
  437. 0x2011,
  438. METAOUT+INDXOUT, // program crtc registers
  439. CRTC_ADDRESS_PORT_COLOR,
  440. 28,0, // count, startindex
  441. //
  442. // NOTE(DBCS) : Update 94/10/26 - NEC Corporation
  443. //
  444. // - Set Mode Type is VESA compatible.
  445. //
  446. #if defined(DBCS) && defined(_MIPS_)
  447. 0x7B, 0x63, 0x64, 0x80, 0x69, 0x12,
  448. 0x6F, 0xF0, 0x00, 0x60, 0x00, 0x00,
  449. 0x00, 0x00, 0x00, 0x00, 0x58, 0x8A,
  450. 0x57, 0x64, 0x00, 0x5F, 0x91, 0xE3,
  451. 0xFF, 0x00, 0x00, 0x22,
  452. #else
  453. 0x7D, 0x63, 0x64, 0x80, 0x6D, 0x1C,
  454. 0x98, 0xF0, 0x00, 0x60, 0x00, 0x00,
  455. 0x00, 0x00, 0x00, 0x00, 0x7B, 0x80,
  456. 0x57, 0x64, 0x00, 0x5F, 0x91, 0xe3,
  457. 0xff, 0x00, 0x00, 0x22,
  458. #endif // defined(DBCS) && defined(_MIPS_)
  459. METAOUT+INDXOUT, // program gdc registers
  460. GRAPH_ADDRESS_PORT,
  461. 9,0, // count, startindex
  462. 0x00, 0x00, 0x00, 0x00, 0x00, 0x40,
  463. 0x05, 0x0F, 0xFF,
  464. IB, // prepare atc for writing
  465. INPUT_STATUS_1_COLOR,
  466. METAOUT+ATCOUT, // program atc registers
  467. ATT_ADDRESS_PORT,
  468. 21,0, // count, startindex
  469. 0x00, 0x01, 0x02, 0x03, 0x04, 0x05,
  470. 0x06, 0x07, 0x08, 0x09, 0x0A, 0x0B,
  471. 0x0C, 0x0D, 0x0E, 0x0F, 0x41, 0x00,
  472. 0x0F, 0x00, 0x00,
  473. OB, // turn video on.
  474. ATT_ADDRESS_PORT,
  475. 0x20,
  476. OB,
  477. DAC_PIXEL_MASK_PORT,
  478. 0xFF,
  479. OWM,
  480. GRAPH_ADDRESS_PORT,
  481. 3,
  482. //
  483. // The Miniport Driver for R96 machine is Liner addressing mode.
  484. // This set command was changed it for Liner addressing.
  485. //
  486. 0x0009, 0x000a, 0x000b,
  487. EOD
  488. };
  489. //
  490. // 800x600 256-color 60Hz mode (BIOS mode 0x5C) set command string for
  491. // CL 542x.
  492. //
  493. USHORT CL542x_800x600_256_60[] = {
  494. OWM, // begin setmode
  495. SEQ_ADDRESS_PORT,
  496. 2, // count
  497. 0x1206, // enable extensions
  498. 0x0012,
  499. OWM, // begin setmode
  500. SEQ_ADDRESS_PORT,
  501. 15, // count
  502. 0x100, // start sync reset
  503. 0x0101,0x0F02,0x0003,0x0E04, // program up sequencer
  504. //
  505. // The Miniport Driver for R96 machine is Liner addressing mode.
  506. // This set command was changed Liner addressing.
  507. //
  508. (LA_MASK << 12 | 0x0107),
  509. 0x0008,
  510. 0x4A0B,0x5B0C,0x450D,0x510E,
  511. 0x2B1B,0x2F1C,0x301D,0x3A1E,
  512. OB, // point sequencer index to ff
  513. SEQ_ADDRESS_PORT,
  514. 0x0F,
  515. METAOUT+MASKOUT, // masked out.
  516. SEQ_DATA_PORT,
  517. 0xDF,0x20, // and mask, xor mask
  518. OB, // misc. register
  519. MISC_OUTPUT_REG_WRITE_PORT,
  520. //
  521. // NOTE(DBCS) : Update 94/10/26 - NEC Corporation
  522. //
  523. // - Set Mode Type is VESA compatible.
  524. //
  525. #if defined(DBCS) && defined(_MIPS_)
  526. 0xEF,
  527. #else
  528. 0x2F,
  529. #endif // defined(DBCS) && defined(_MIPS_)
  530. OW, // text/graphics bit
  531. GRAPH_ADDRESS_PORT,
  532. 0x506,
  533. OW, // end sync reset
  534. SEQ_ADDRESS_PORT,
  535. 0x300,
  536. OW, // unprotect crtc 0-7
  537. CRTC_ADDRESS_PORT_COLOR,
  538. 0x2011,
  539. METAOUT+INDXOUT, // program crtc registers
  540. CRTC_ADDRESS_PORT_COLOR,
  541. 28,0, // count, startindex
  542. //
  543. // NOTE(DBCS) : Update 94/10/26 - NEC Corporation
  544. //
  545. // - Set Mode Type is VESA compatible.
  546. //
  547. #if defined(DBCS) && defined(_MIPS_)
  548. 0x7F, 0x63, 0x64, 0x80, 0x6B, 0x1B,
  549. 0x72, 0xF0, 0x00, 0x60, 0x00, 0x00,
  550. 0x00, 0x00, 0x00, 0x00, 0x58, 0x8C,
  551. 0x57, 0x64, 0x00, 0x5F, 0x91, 0xE3,
  552. 0xFF, 0x00, 0x00, 0x22,
  553. #else
  554. 0x7D, 0x63, 0x64, 0x80, 0x6D, 0x1C,
  555. 0x98, 0xF0, 0x00, 0x60, 0x00, 0x00,
  556. 0x00, 0x00, 0x00, 0x00, 0x7B, 0x80,
  557. 0x57, 0x64, 0x00, 0x5F, 0x91, 0xe3,
  558. 0xff, 0x00, 0x00, 0x22,
  559. #endif // defined(DBCS) && defined(_MIPS_)
  560. METAOUT+INDXOUT, // program gdc registers
  561. GRAPH_ADDRESS_PORT,
  562. 9,0, // count, startindex
  563. 0x00, 0x00, 0x00, 0x00, 0x00, 0x40,
  564. 0x05, 0x0F, 0xFF,
  565. IB, // prepare atc for writing
  566. INPUT_STATUS_1_COLOR,
  567. METAOUT+ATCOUT, // program atc registers
  568. ATT_ADDRESS_PORT,
  569. 21,0, // count, startindex
  570. 0x00, 0x01, 0x02, 0x03, 0x04, 0x05,
  571. 0x06, 0x07, 0x08, 0x09, 0x0A, 0x0B,
  572. 0x0C, 0x0D, 0x0E, 0x0F, 0x41, 0x00,
  573. 0x0F, 0x00, 0x00,
  574. OB, // turn video on.
  575. ATT_ADDRESS_PORT,
  576. 0x20,
  577. OB,
  578. DAC_PIXEL_MASK_PORT,
  579. 0xFF,
  580. OWM,
  581. GRAPH_ADDRESS_PORT,
  582. 3,
  583. //
  584. // The Miniport Driver for R96 machine is Liner addressing mode.
  585. // This set command was changed it for Liner addressing.
  586. //
  587. 0x0009, 0x000a, 0x000b,
  588. EOD
  589. };
  590. //
  591. // 800x600 256-color 72Hz mode (BIOS mode 0x5C) set command string for
  592. // CL 542x.
  593. //
  594. USHORT CL542x_800x600_256_72[] = {
  595. OWM, // begin setmode
  596. SEQ_ADDRESS_PORT,
  597. 2, // count
  598. 0x1206, // enable extensions
  599. 0x0012,
  600. OWM, // begin setmode
  601. SEQ_ADDRESS_PORT,
  602. 15, // count
  603. 0x100, // start sync reset
  604. 0x0101,0x0F02,0x0003,0x0E04, // program up sequencer
  605. //
  606. // The Miniport Driver for R96 machine is Liner addressing mode.
  607. // This set command was changed Liner addressing.
  608. //
  609. (LA_MASK << 12 | 0x0107),
  610. 0x0008,
  611. //
  612. // NOTE(DBCS) : Update 94/10/26 - NEC Corporation
  613. //
  614. // - Set Mode Type is VESA compatible.
  615. //
  616. #if defined(DBCS) && defined(_MIPS_)
  617. 0x4A0B,0x5B0C,0x450D,0x650E,
  618. #else
  619. 0x4A0B,0x5B0C,0x450D,0x640E,
  620. #endif // defined(DBCS) && defined(_MIPS_)
  621. 0x2B1B,0x2F1C,0x301D,0x3A1E,
  622. OB, // point sequencer index to ff
  623. SEQ_ADDRESS_PORT,
  624. 0x0F,
  625. METAOUT+MASKOUT, // masked out.
  626. SEQ_DATA_PORT,
  627. 0xDF,0x20, // and mask, xor mask
  628. OB, // misc. register
  629. MISC_OUTPUT_REG_WRITE_PORT,
  630. //
  631. // NOTE(DBCS) : Update 94/10/26 - NEC Corporation
  632. //
  633. // - Set Mode Type is VESA compatible.
  634. //
  635. #if defined(DBCS) && defined(_MIPS_)
  636. 0xEF,
  637. #else
  638. 0x2F,
  639. #endif // defined(DBCS) && defined(_MIPS_)
  640. OW, // text/graphics bit
  641. GRAPH_ADDRESS_PORT,
  642. 0x506,
  643. OW, // end sync reset
  644. SEQ_ADDRESS_PORT,
  645. 0x300,
  646. OW, // unprotect crtc 0-7
  647. CRTC_ADDRESS_PORT_COLOR,
  648. 0x2011,
  649. METAOUT+INDXOUT, // program crtc registers
  650. CRTC_ADDRESS_PORT_COLOR,
  651. 28,0, // count, startindex
  652. //
  653. // NOTE(DBCS) : Update 94/10/26 - NEC Corporation
  654. //
  655. // - Set Mode Type is VESA compatible.
  656. //
  657. #if defined(DBCS) && defined(_MIPS_)
  658. 0x7D, 0x63, 0x64, 0x80, 0x6D, 0x1C,
  659. 0x96, 0xF0, 0x00, 0x60, 0x00, 0x00,
  660. 0x00, 0x00, 0x00, 0x00, 0x7B, 0x81,
  661. 0x57, 0x64, 0x00, 0x5F, 0x91, 0xE3,
  662. 0xFF, 0x00, 0x00, 0x22,
  663. #else
  664. 0x7D, 0x63, 0x64, 0x80, 0x6D, 0x1C,
  665. 0x98, 0xF0, 0x00, 0x60, 0x00, 0x00,
  666. 0x00, 0x00, 0x00, 0x00, 0x7B, 0x80,
  667. 0x57, 0x64, 0x00, 0x5F, 0x91, 0xe3,
  668. 0xff, 0x00, 0x00, 0x22,
  669. #endif // defined(DBCS) && defined(_MIPS_)
  670. METAOUT+INDXOUT, // program gdc registers
  671. GRAPH_ADDRESS_PORT,
  672. 9,0, // count, startindex
  673. 0x00, 0x00, 0x00, 0x00, 0x00, 0x40,
  674. 0x05, 0x0F, 0xFF,
  675. IB, // prepare atc for writing
  676. INPUT_STATUS_1_COLOR,
  677. METAOUT+ATCOUT, // program atc registers
  678. ATT_ADDRESS_PORT,
  679. 21,0, // count, startindex
  680. 0x00, 0x01, 0x02, 0x03, 0x04, 0x05,
  681. 0x06, 0x07, 0x08, 0x09, 0x0A, 0x0B,
  682. 0x0C, 0x0D, 0x0E, 0x0F, 0x41, 0x00,
  683. 0x0F, 0x00, 0x00,
  684. OB, // turn video on.
  685. ATT_ADDRESS_PORT,
  686. 0x20,
  687. OB,
  688. DAC_PIXEL_MASK_PORT,
  689. 0xFF,
  690. OWM,
  691. GRAPH_ADDRESS_PORT,
  692. 3,
  693. //
  694. // The Miniport Driver for R96 machine is Liner addressing mode.
  695. // This set command was changed it for Liner addressing.
  696. //
  697. 0x0009, 0x000a, 0x000b,
  698. EOD
  699. };
  700. //
  701. // 1024x768 256-color 60Hz mode (BIOS mode 0x60) set command string for
  702. // CL 542x.
  703. //
  704. USHORT CL542x_1024x768_256_60[] = {
  705. OWM, // begin setmode
  706. SEQ_ADDRESS_PORT,
  707. 2, // count
  708. 0x1206, // enable extensions
  709. 0x0012,
  710. OWM, // begin setmode
  711. SEQ_ADDRESS_PORT,
  712. 15, // count
  713. 0x100, // start sync reset
  714. 0x0101,0x0F02,0x0003,0x0E04, // program up sequencer
  715. //
  716. // The Miniport Driver for R96 machine is Liner addressing mode.
  717. // This set command was changed Liner addressing.
  718. //
  719. (LA_MASK << 12 | 0x0107),
  720. 0x0008,
  721. //
  722. // NOTE(DBCS) : Update 94/10/26 - NEC Corporation
  723. //
  724. // - Set Mode Type is VESA compatible.
  725. //
  726. #if defined(DBCS) && defined(_MIPS_)
  727. 0x4A0B, 0x5B0C, 0x450D, 0x760E,
  728. 0x2B1B, 0x2F1C, 0x301D, 0x341E,
  729. #else
  730. 0x4A0B, 0x5B0C, 0x450D, 0x3B0E,
  731. 0x2B1B, 0x2F1C, 0x301D, 0x1A1E,
  732. #endif // defined(DBCS) && defined(_MIPS_)
  733. OB, // point sequencer index to ff
  734. SEQ_ADDRESS_PORT,
  735. 0x0F,
  736. METAOUT+MASKOUT, // masked out.
  737. SEQ_DATA_PORT,
  738. 0xDF,0x20, // and mask, xor mask
  739. OB, // misc. register
  740. MISC_OUTPUT_REG_WRITE_PORT,
  741. 0xEF,
  742. OW, // text/graphics bit
  743. GRAPH_ADDRESS_PORT,
  744. 0x506,
  745. OW, // end sync reset
  746. SEQ_ADDRESS_PORT,
  747. 0x300,
  748. OW, // unprotect crtc 0-7
  749. CRTC_ADDRESS_PORT_COLOR,
  750. 0x2011,
  751. METAOUT+INDXOUT, // program crtc registers
  752. CRTC_ADDRESS_PORT_COLOR,
  753. 28,0, // count, startindex
  754. //
  755. // NOTE(DBCS) : Update 94/10/26 - NEC Corporation
  756. //
  757. // - Set Mode Type is VESA compatible.
  758. //
  759. #if defined(DBCS) && defined(_MIPS_)
  760. 0xA3, 0x7F, 0x80, 0x86, 0x85, 0x96,
  761. 0x24, 0xFD, 0x00, 0x60, 0x00, 0x00,
  762. 0x00, 0x00, 0x00, 0x00, 0x02, 0x88,
  763. 0xFF, 0x80, 0x00, 0x00, 0x24, 0xE3,
  764. 0xFF, 0x4A, 0x00, 0x22,
  765. #else
  766. 0xA3, 0x7F, 0x80, 0x86, 0x85, 0x96,
  767. 0x24, 0xFD, 0x00, 0x60, 0x00, 0x00,
  768. 0x00, 0x00, 0x00, 0x00, 0x02, 0x88,
  769. 0xFF, 0x80, 0x00, 0x00, 0x24, 0xe3,
  770. 0xff, 0x4A, 0x00, 0x22,
  771. #endif // defined(DBCS) && defined(_MIPS_)
  772. METAOUT+INDXOUT, // program gdc registers
  773. GRAPH_ADDRESS_PORT,
  774. 9,0, // count, startindex
  775. 0x00, 0x00, 0x00, 0x00, 0x00, 0x40,
  776. 0x05, 0x0F, 0xFF,
  777. IB, // prepare atc for writing
  778. INPUT_STATUS_1_COLOR,
  779. METAOUT+ATCOUT, // program atc registers
  780. ATT_ADDRESS_PORT,
  781. 21,0, // count, startindex
  782. 0x00, 0x01, 0x02, 0x03, 0x04, 0x05,
  783. 0x06, 0x07, 0x08, 0x09, 0x0A, 0x0B,
  784. 0x0C, 0x0D, 0x0E, 0x0F, 0x41, 0x00,
  785. 0x0F, 0x00, 0x00,
  786. OB, // turn video on.
  787. ATT_ADDRESS_PORT,
  788. 0x20,
  789. OB,
  790. DAC_PIXEL_MASK_PORT,
  791. 0xFF,
  792. OWM,
  793. GRAPH_ADDRESS_PORT,
  794. 3,
  795. //
  796. // The Miniport Driver for R96 machine is Liner addressing mode.
  797. // This set command was changed it for Liner addressing.
  798. //
  799. 0x0009, 0x000a, 0x000b,
  800. EOD
  801. };
  802. //
  803. // 1024x768 256-color 70Hz mode (BIOS mode 0x60) set command string for
  804. // CL 542x.
  805. //
  806. USHORT CL542x_1024x768_256_70[] = {
  807. OWM, // begin setmode
  808. SEQ_ADDRESS_PORT,
  809. 2, // count
  810. 0x1206, // enable extensions
  811. 0x0012,
  812. OWM, // begin setmode
  813. SEQ_ADDRESS_PORT,
  814. 15, // count
  815. 0x100, // start sync reset
  816. 0x0101,0x0F02,0x0003,0x0E04, // program up sequencer
  817. //
  818. // The Miniport Driver for R96 machine is Liner addressing mode.
  819. // This set command was changed Liner addressing.
  820. //
  821. (LA_MASK << 12 | 0x0107),
  822. 0x0008,
  823. 0x4A0B, 0x5B0C, 0x450D, 0x6E0E,
  824. 0x2B1B, 0x2F1C, 0x301D, 0x2A1E,
  825. OB, // point sequencer index to ff
  826. SEQ_ADDRESS_PORT,
  827. 0x0F,
  828. METAOUT+MASKOUT, // masked out.
  829. SEQ_DATA_PORT,
  830. 0xDF,0x20, // and mask, xor mask
  831. OB, // misc. register
  832. MISC_OUTPUT_REG_WRITE_PORT,
  833. 0xEF,
  834. OW, // text/graphics bit
  835. GRAPH_ADDRESS_PORT,
  836. 0x506,
  837. OW, // end sync reset
  838. SEQ_ADDRESS_PORT,
  839. 0x300,
  840. OW, // unprotect crtc 0-7
  841. CRTC_ADDRESS_PORT_COLOR,
  842. 0x2011,
  843. METAOUT+INDXOUT, // program crtc registers
  844. CRTC_ADDRESS_PORT_COLOR,
  845. 28,0, // count, startindex
  846. //
  847. // NOTE(DBCS) : Update 94/10/26 - NEC Corporation
  848. //
  849. // - Set Mode Type is VESA compatible.
  850. //
  851. #if defined(DBCS) && defined(_MIPS_)
  852. 0xA1, 0x7F, 0x80, 0x86, 0x85, 0x96,
  853. 0x24, 0xFD, 0x00, 0x60, 0x00, 0x00,
  854. 0x00, 0x00, 0x00, 0x00, 0x02, 0x88,
  855. 0xFF, 0x80, 0x00, 0x00, 0x24, 0xE3,
  856. 0xFF, 0x4A, 0x00, 0x22,
  857. #else
  858. 0xA3, 0x7F, 0x80, 0x86, 0x85, 0x96,
  859. 0x24, 0xFD, 0x00, 0x60, 0x00, 0x00,
  860. 0x00, 0x00, 0x00, 0x00, 0x02, 0x88,
  861. 0xFF, 0x80, 0x00, 0x00, 0x24, 0xe3,
  862. 0xff, 0x4A, 0x00, 0x22,
  863. #endif // defined(DBCS) && defined(_MIPS_)
  864. METAOUT+INDXOUT, // program gdc registers
  865. GRAPH_ADDRESS_PORT,
  866. 9,0, // count, startindex
  867. 0x00, 0x00, 0x00, 0x00, 0x00, 0x40,
  868. 0x05, 0x0F, 0xFF,
  869. IB, // prepare atc for writing
  870. INPUT_STATUS_1_COLOR,
  871. METAOUT+ATCOUT, // program atc registers
  872. ATT_ADDRESS_PORT,
  873. 21,0, // count, startindex
  874. 0x00, 0x01, 0x02, 0x03, 0x04, 0x05,
  875. 0x06, 0x07, 0x08, 0x09, 0x0A, 0x0B,
  876. 0x0C, 0x0D, 0x0E, 0x0F, 0x41, 0x00,
  877. 0x0F, 0x00, 0x00,
  878. OB, // turn video on.
  879. ATT_ADDRESS_PORT,
  880. 0x20,
  881. OB,
  882. DAC_PIXEL_MASK_PORT,
  883. 0xFF,
  884. OWM,
  885. GRAPH_ADDRESS_PORT,
  886. 3,
  887. //
  888. // The Miniport Driver for R96 machine is Liner addressing mode.
  889. // This set command was changed it for Liner addressing.
  890. //
  891. 0x0009, 0x000a, 0x000b,
  892. EOD
  893. };
  894. //
  895. // 1024x768 256-color 87Hz mode (BIOS mode 0x60) set command string for
  896. // CL 542x. (Interlaced)
  897. //
  898. USHORT CL542x_1024x768_256_87[] = {
  899. OWM, // begin setmode
  900. SEQ_ADDRESS_PORT,
  901. 2, // count
  902. 0x1206, // enable extensions
  903. 0x0012,
  904. OWM, // begin setmode
  905. SEQ_ADDRESS_PORT,
  906. 15, // count
  907. 0x100, // start sync reset
  908. 0x0101,0x0F02,0x0003,0x0E04, // program up sequencer
  909. //
  910. // The Miniport Driver for R96 machine is Liner addressing mode.
  911. // This set command was changed Liner addressing.
  912. //
  913. (LA_MASK << 12 | 0x0107),
  914. 0x0008,
  915. 0x4A0B, 0x5B0C, 0x450D, 0x550E,
  916. 0x2B1B, 0x2F1C, 0x301D, 0x361E,
  917. OB, // point sequencer index to ff
  918. SEQ_ADDRESS_PORT,
  919. 0x0F,
  920. METAOUT+MASKOUT, // masked out.
  921. SEQ_DATA_PORT,
  922. 0xDF,0x20, // and mask, xor mask
  923. OB, // misc. register
  924. MISC_OUTPUT_REG_WRITE_PORT,
  925. //
  926. // NOTE(DBCS) : Update 94/10/26 - NEC Corporation
  927. //
  928. // - Set Mode Type is VESA compatible.
  929. //
  930. #if defined(DBCS) && defined(_MIPS_)
  931. 0xEF,
  932. #else
  933. 0x2F,
  934. #endif // defined(DBCS) && defined(_MIPS_)
  935. OW, // text/graphics bit
  936. GRAPH_ADDRESS_PORT,
  937. 0x506,
  938. OW, // end sync reset
  939. SEQ_ADDRESS_PORT,
  940. 0x300,
  941. OW, // unprotect crtc 0-7
  942. CRTC_ADDRESS_PORT_COLOR,
  943. 0x2011,
  944. METAOUT+INDXOUT, // program crtc registers
  945. CRTC_ADDRESS_PORT_COLOR,
  946. 28,0, // count, startindex
  947. //
  948. // NOTE(DBCS) : Update 94/10/26 - NEC Corporation
  949. //
  950. // - Set Mode Type is VESA compatible.
  951. //
  952. #if defined(DBCS) && defined(_MIPS_)
  953. 0x99, 0x7F, 0x80, 0x86, 0x83, 0x99,
  954. 0x96, 0x1F, 0x00, 0x40, 0x00, 0x00,
  955. 0x00, 0x00, 0x00, 0x00, 0x7F, 0x83,
  956. 0x7F, 0x80, 0x00, 0x7F, 0x12, 0xE3,
  957. 0xff, 0x4A, 0x01, 0x22,
  958. #else
  959. 0xA3, 0x7F, 0x80, 0x86, 0x85, 0x96,
  960. 0xBE, 0x1F, 0x00, 0x40, 0x00, 0x00,
  961. 0x00, 0x00, 0x00, 0x00, 0x81, 0x84,
  962. 0x7F, 0x80, 0x00, 0x80, 0x12, 0xE3,
  963. 0xff, 0x4A, 0x01, 0x22,
  964. #endif // defined(DBCS) && defined(_MIPS_)
  965. METAOUT+INDXOUT, // program gdc registers
  966. GRAPH_ADDRESS_PORT,
  967. 9,0, // count, startindex
  968. 0x00, 0x00, 0x00, 0x00, 0x00, 0x40,
  969. 0x05, 0x0F, 0xFF,
  970. IB, // prepare atc for writing
  971. INPUT_STATUS_1_COLOR,
  972. METAOUT+ATCOUT, // program atc registers
  973. ATT_ADDRESS_PORT,
  974. 21,0, // count, startindex
  975. 0x00, 0x01, 0x02, 0x03, 0x04, 0x05,
  976. 0x06, 0x07, 0x08, 0x09, 0x0A, 0x0B,
  977. 0x0C, 0x0D, 0x0E, 0x0F, 0x41, 0x00,
  978. 0x0F, 0x00, 0x00,
  979. OB, // turn video on.
  980. ATT_ADDRESS_PORT,
  981. 0x20,
  982. OB,
  983. DAC_PIXEL_MASK_PORT,
  984. 0xFF,
  985. OWM,
  986. GRAPH_ADDRESS_PORT,
  987. 3,
  988. //
  989. // The Miniport Driver for R96 machine is Liner addressing mode.
  990. // This set command was changed it for Liner addressing.
  991. //
  992. 0x0009, 0x000a, 0x000b,
  993. EOD
  994. };
  995. #endif // defined(DBCS) && defined(_MIPS_)
  996. #endif