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.

1635 lines
50 KiB

  1. /*++
  2. Copyright (c) 1992 Cirrus Logic, Inc.
  3. Module Name:
  4. Mode6420.h
  5. Abstract:
  6. This module contains all the global data used by the Cirrus Logic
  7. CL-6420 driver.
  8. Environment:
  9. Kernel mode
  10. Revision History:
  11. --*/
  12. //---------------------------------------------------------------------------
  13. // The next set of tables are for the CL6420
  14. // Note: all resolutions supported
  15. //
  16. USHORT CL6420_640x480_panel[] = {
  17. // Unlock Key for color mode
  18. OW, // GR0A = 0xEC opens extension registers
  19. GRAPH_ADDRESS_PORT,
  20. 0xec0a,
  21. #ifndef INT10_MODE_SET
  22. OWM,
  23. SEQ_ADDRESS_PORT,
  24. 5,
  25. 0x0100, // start synch reset
  26. 0x0101,0x0f02,0x0003,0x0604, // program up sequencer
  27. OB,
  28. MISC_OUTPUT_REG_WRITE_PORT,
  29. 0xe3,
  30. OW, //{ SetGraphCmd,{ "\x05", 0x06, 1 } },
  31. GRAPH_ADDRESS_PORT,
  32. 0x0506,
  33. // EndSyncResetCmd
  34. OW,
  35. SEQ_ADDRESS_PORT,
  36. IND_SYNC_RESET + (END_SYNC_RESET_VALUE << 8),
  37. OW,
  38. CRTC_ADDRESS_PORT_COLOR,
  39. 0x0111,
  40. METAOUT+INDXOUT, // program crtc registers
  41. CRTC_ADDRESS_PORT_COLOR,
  42. VGA_NUM_CRTC_PORTS, // count
  43. 0, // start index
  44. 0x5F,0x4F,0x50,0x82,
  45. 0x54,0x80,0x0B,0x3E,
  46. 0x00,0x40,0x00,0x00,
  47. 0x00,0x00,0x00,0x00,
  48. 0xEA,0xAC,0xDF,0x28,
  49. 0x00,0xE7,0x04,0xE3,
  50. 0xFF,
  51. // extension registers
  52. OWM,
  53. GRAPH_ADDRESS_PORT,
  54. 16,
  55. 0x0262, // ER62 horz. display end extension
  56. 0x8064, // ER64 horz. retrace end extension
  57. 0x0079, // ER79 vertical overflow
  58. 0x007a, // ER7a coarse vert. retrace skew for interlaced odd fields
  59. 0x007b, // ER7b fine vert. retrace skew for interlaced odd fields
  60. 0x007c, // ER7c screen A start addr. extension
  61. 0x0181, // ER81 display mode
  62. 0x8982, // ER82 character clock selection
  63. 0x9a84, // ER84 clock select extension
  64. 0x0090, // ER90 display memory control
  65. 0x0091, // ER91 CRT-circular buffer policy select
  66. 0x0095, // ER95 CRT-circular buffer delta & burst
  67. 0x0096, // ER96 display memory control test
  68. 0x12a0, // ERa0 bus interface unit control
  69. 0x00a1, // ERa1 three-state and test control
  70. 0xa1c8, // ERc8 RAMDAC control
  71. IB, // prepare atc for writing
  72. INPUT_STATUS_1_COLOR,
  73. METAOUT+ATCOUT, //
  74. ATT_ADDRESS_PORT, // port
  75. VGA_NUM_ATTRIB_CONT_PORTS, // count
  76. 0, // start index
  77. 0x00,0x01,0x02,0x03,0x04,
  78. 0x05,0x14,0x07,0x38,0x39,
  79. 0x3A,0x3B,0x3C,0x3D,0x3E,
  80. 0x3F,0x01,0x00,0x0F,0x00,0x00,
  81. METAOUT+INDXOUT, //
  82. GRAPH_ADDRESS_PORT, // port
  83. VGA_NUM_GRAPH_CONT_PORTS, // count
  84. 0, // start index
  85. 0x00,0x0,0x0,0x0,0x0,0x0,0x05,0x0F,0x0FF,
  86. OB, // turn video on.
  87. ATT_ADDRESS_PORT,
  88. VIDEO_ENABLE,
  89. #endif
  90. // zero out the banking regs. for this mode
  91. OWM,
  92. GRAPH_ADDRESS_PORT,
  93. 3,
  94. 0x000d, // ER0D = Banking control: 1 64K bank,
  95. 0x000e, // ER0E bank A address = 0
  96. 0x000f, // ER0F bank B address = 0
  97. OB,
  98. DAC_PIXEL_MASK_PORT,
  99. 0xFF,
  100. EOD
  101. };
  102. USHORT CL6420_640x480_crt[] = {
  103. // Unlock Key for color mode
  104. OW, // GR0A = 0xEC opens extension registers
  105. GRAPH_ADDRESS_PORT,
  106. 0xec0a,
  107. #ifndef INT10_MODE_SET
  108. OWM,
  109. SEQ_ADDRESS_PORT,
  110. 5,
  111. 0x0100, // start synch reset
  112. 0x0101,0x0f02,0x0003,0x0604, // program up sequencer
  113. OB,
  114. MISC_OUTPUT_REG_WRITE_PORT,
  115. 0xe3,
  116. OW, //{ SetGraphCmd,{ "\x05", 0x06, 1 } },
  117. GRAPH_ADDRESS_PORT,
  118. 0x0506,
  119. // EndSyncResetCmd
  120. OW,
  121. SEQ_ADDRESS_PORT,
  122. IND_SYNC_RESET + (END_SYNC_RESET_VALUE << 8),
  123. OW,
  124. CRTC_ADDRESS_PORT_COLOR,
  125. 0x0111,
  126. METAOUT+INDXOUT, // program crtc registers
  127. CRTC_ADDRESS_PORT_COLOR,
  128. VGA_NUM_CRTC_PORTS, // count
  129. 0, // start index
  130. 0x5F,0x4F,0x50,0x82,
  131. 0x54,0x80,0x0B,0x3E,
  132. 0x00,0x40,0x00,0x00,
  133. 0x00,0x00,0x00,0x00,
  134. 0xEA,0xAC,0xDF,0x28,
  135. 0x00,0xE7,0x04,0xE3,
  136. 0xFF,
  137. // extension registers
  138. OWM,
  139. GRAPH_ADDRESS_PORT,
  140. 16,
  141. 0x0262, // ER62 horz. display end extension
  142. 0x8064, // ER64 horz. retrace end extension
  143. 0x0079, // ER79 vertical overflow
  144. 0x007a, // ER7a coarse vert. retrace skew for interlaced odd fields
  145. 0x007b, // ER7b fine vert. retrace skew for interlaced odd fields
  146. 0x007c, // ER7c screen A start addr. extension
  147. 0x0081, // ER81 display mode
  148. 0x0082, // ER82 character clock selection
  149. 0x1084, // ER84 clock select extension
  150. 0x0090, // ER90 display memory control
  151. 0x0091, // ER91 CRT-circular buffer policy select
  152. 0x0095, // ER95 CRT-circular buffer delta & burst
  153. 0x0096, // ER96 display memory control test
  154. 0x12a0, // ERa0 bus interface unit control
  155. 0x00a1, // ERa1 three-state and test control
  156. 0x00c8, // ERc8 RAMDAC control
  157. IB, // prepare atc for writing
  158. INPUT_STATUS_1_COLOR,
  159. METAOUT+ATCOUT, //
  160. ATT_ADDRESS_PORT, // port
  161. VGA_NUM_ATTRIB_CONT_PORTS, // count
  162. 0, // start index
  163. 0x00,0x01,0x02,0x03,0x04,
  164. 0x05,0x14,0x07,0x38,0x39,
  165. 0x3A,0x3B,0x3C,0x3D,0x3E,
  166. 0x3F,0x01,0x00,0x0F,0x00,0x00,
  167. METAOUT+INDXOUT, //
  168. GRAPH_ADDRESS_PORT, // port
  169. VGA_NUM_GRAPH_CONT_PORTS, // count
  170. 0, // start index
  171. 0x00,0x0,0x0,0x0,0x0,0x0,0x05,0x0F,0x0FF,
  172. OB, // turn video on.
  173. ATT_ADDRESS_PORT,
  174. VIDEO_ENABLE,
  175. #endif
  176. // zero out the banking regs. for this mode
  177. OWM,
  178. GRAPH_ADDRESS_PORT,
  179. 3,
  180. 0x000d, // ER0D = Banking control: 1 64K bank,
  181. 0x000e, // ER0E bank A address = 0
  182. 0x000f, // ER0F bank B address = 0
  183. OB,
  184. DAC_PIXEL_MASK_PORT,
  185. 0xFF,
  186. EOD
  187. };
  188. //
  189. // 800x600 16-color (60Hz refresh) mode set command string for CL 6420.
  190. //
  191. USHORT CL6420_800x600_crt[] = {
  192. // Unlock Key for color mode
  193. OW, // GR0A = 0xEC opens extension registers
  194. GRAPH_ADDRESS_PORT,
  195. 0xec0a,
  196. #ifndef INT10_MODE_SET
  197. OWM,
  198. SEQ_ADDRESS_PORT,
  199. 5,
  200. 0x0100, // start synch reset
  201. 0x0101,0x0f02,0x0003,0x0604, // program up sequencer
  202. OB,
  203. MISC_OUTPUT_REG_WRITE_PORT,
  204. 0xe3,
  205. OW,
  206. GRAPH_ADDRESS_PORT,
  207. 0x0506,
  208. // EndSyncResetCmd
  209. OW,
  210. SEQ_ADDRESS_PORT,
  211. IND_SYNC_RESET + (END_SYNC_RESET_VALUE << 8),
  212. OW,
  213. CRTC_ADDRESS_PORT_COLOR,
  214. 0x0E11,
  215. METAOUT+INDXOUT, // program crtc registers
  216. CRTC_ADDRESS_PORT_COLOR,
  217. VGA_NUM_CRTC_PORTS, // count
  218. 0, // start index
  219. 0x7F,0x63,0x64,0x82,
  220. 0x6b,0x1d,0x72,0xf0,
  221. 0x00,0x60,0x00,0x00,
  222. 0x00,0x00,0x00,0x00,
  223. 0x58,0xac,0x57,0x32,
  224. 0x00,0x58,0x72,0xe3,
  225. 0xFF,
  226. // extension registers
  227. OWM,
  228. GRAPH_ADDRESS_PORT,
  229. 16,
  230. 0x0262, // ER62 horz. display end extension
  231. 0x1b64, // ER64 horz. retrace end extension
  232. 0x0079, // ER79 vertical overflow
  233. 0x007a, // ER7a coarse vert. retrace skew for interlaced odd fields
  234. 0x007b, // ER7b fine vert. retrace skew for interlaced odd fields
  235. 0x007c, // ER7c screen A start addr. extension
  236. 0x0081, // ER81 display mode
  237. 0x0082, // ER82 character clock selection
  238. 0x9c84, // ER84 clock select extension
  239. 0x0090, // ER90 display memory control
  240. 0x0391, // ER91 CRT-circular buffer policy select
  241. 0x0395, // ER95 CRT-circular buffer delta & burst
  242. 0x0096, // ER96 display memory control test
  243. 0x12a0, // ERa0 bus interface unit control
  244. 0x00a1, // ERa1 three-state and test control
  245. 0x00c8, // ERc8 RAMDAC control
  246. IB, // prepare atc for writing
  247. INPUT_STATUS_1_COLOR,
  248. METAOUT+ATCOUT, //
  249. ATT_ADDRESS_PORT, // port
  250. VGA_NUM_ATTRIB_CONT_PORTS, // count
  251. 0, // start index
  252. 0x0,0x1,0x2,0x3,0x4,0x5,0x6,0x7,0x8,0x9,0xA,0xB,0xC,0xD,0xE,0xF,
  253. 0x01,0x0,0x0F,0x0,0x0,
  254. METAOUT+INDXOUT, //
  255. GRAPH_ADDRESS_PORT, // port
  256. VGA_NUM_GRAPH_CONT_PORTS, // count
  257. 0, // start index
  258. 0x00,0x0,0x0,0x0,0x0,0x0,0x05,0x0F,0x0FF,
  259. OB, // turn video on.
  260. ATT_ADDRESS_PORT,
  261. VIDEO_ENABLE,
  262. #endif
  263. // zero out the banking regs. for this mode
  264. OWM,
  265. GRAPH_ADDRESS_PORT,
  266. 3,
  267. 0x000d, // ER0D = Banking control: 1 64K bank,
  268. 0x000e, // ER0E bank A address = 0
  269. 0x000f, // ER0F bank B address = 0
  270. OB,
  271. DAC_PIXEL_MASK_PORT,
  272. 0xFF,
  273. EOD
  274. };
  275. //
  276. // 1024x768 16-color (60Hz refresh) mode set command string for CL 6420.
  277. // Requires 512K minimum.
  278. //
  279. USHORT CL6420_1024x768_crt[] = {
  280. // Unlock Key for color mode
  281. OW, // GR0A = 0xEC opens extension registers
  282. GRAPH_ADDRESS_PORT,
  283. 0xec0a,
  284. #ifndef INT10_MODE_SET
  285. OWM,
  286. SEQ_ADDRESS_PORT,
  287. 5,
  288. 0x0100, // start synch reset
  289. 0x0101,0x0f02,0x0003,0x0604, // program up sequencer
  290. OWM,
  291. SEQ_ADDRESS_PORT,
  292. 2,
  293. 0x0006,0x0bc07, // program up sequencer
  294. OB,
  295. MISC_OUTPUT_REG_WRITE_PORT,
  296. 0x2b,
  297. OW,
  298. GRAPH_ADDRESS_PORT,
  299. 0x0506,
  300. // EndSyncResetCmd
  301. OW,
  302. SEQ_ADDRESS_PORT,
  303. IND_SYNC_RESET + (END_SYNC_RESET_VALUE << 8),
  304. OW,
  305. CRTC_ADDRESS_PORT_COLOR,
  306. 0x0E11,
  307. METAOUT+INDXOUT, // program crtc registers
  308. CRTC_ADDRESS_PORT_COLOR,
  309. VGA_NUM_CRTC_PORTS, // count
  310. 0, // start index
  311. 0x99,0x7f,0x80,0x9c,
  312. 0x83,0x19,0x2f,0xfd,
  313. 0x00,0x60,0x00,0x00,
  314. 0x00,0x00,0x00,0x00,
  315. 0x00,0xa4,0xff,0x3f,
  316. 0x00,0x00,0x2f,0xe3,
  317. 0xFF,
  318. // extension registers
  319. OWM,
  320. GRAPH_ADDRESS_PORT,
  321. 16,
  322. 0x1c62, // ER62 horz. display end extension
  323. 0x1964, // ER64 horz. retrace end extension
  324. 0x0079, // ER79 vertical overflow
  325. 0x4c7a, // ER7a coarse vert. retrace skew for interlaced odd fields
  326. 0x007b, // ER7b fine vert. retrace skew for interlaced odd fields
  327. 0x007c, // ER7c screen A start addr. extension
  328. 0x0481, // ER81 display mode
  329. 0x0082, // ER82 character clock selection
  330. 0xa084, // ER84 clock select extension
  331. 0x0090, // ER90 display memory control
  332. 0x8391, // ER91 CRT-circular buffer policy select
  333. 0x0295, // ER95 CRT-circular buffer delta & burst
  334. 0x0096, // ER96 display memory control test
  335. 0x12a0, // ERa0 bus interface unit control
  336. 0x00a1, // ERa1 three-state and test control
  337. 0x00c8, // ERc8 RAMDAC control
  338. OB,
  339. DAC_PIXEL_MASK_PORT,
  340. 0xFF,
  341. IB, // prepare atc for writing
  342. INPUT_STATUS_1_COLOR,
  343. METAOUT+ATCOUT, //
  344. ATT_ADDRESS_PORT, // port
  345. VGA_NUM_ATTRIB_CONT_PORTS, // count
  346. 0, // start index
  347. 0x00,0x1,0x2,0x3,0x4,0x5,0x6,0x7,0x8,0x9,0xA,0xB,0xC,0xD,0xE,0xF,
  348. 0x01,0x00,0x0F,0x00,0x00,
  349. METAOUT+INDXOUT, //
  350. GRAPH_ADDRESS_PORT, // port
  351. VGA_NUM_GRAPH_CONT_PORTS, // count
  352. 0, // start index
  353. 0x00,0x00,0x00,0x00,0x00,0x00,0x05,0x0F,0x0FF,
  354. OB, // turn video on.
  355. ATT_ADDRESS_PORT,
  356. VIDEO_ENABLE,
  357. #endif
  358. // now do the banking registers
  359. OWM,
  360. GRAPH_ADDRESS_PORT,
  361. 3,
  362. #if ONE_64K_BANK
  363. 0x030d, // ER0D = Banking control: 1 64K bank,
  364. #endif
  365. #if TWO_32K_BANKS
  366. 0x050d,
  367. #endif
  368. 0x000e, // ER0E bank A address = 0
  369. 0x000f, // ER0F bank B address = 0
  370. OB,
  371. DAC_PIXEL_MASK_PORT,
  372. 0xFF,
  373. EOD
  374. };
  375. //-----------------------------
  376. // standard VGA text modes here
  377. // 80x25 at 640x350
  378. //
  379. //-----------------------------
  380. USHORT CL6420_80x25_14_Text_crt[] = {
  381. // Unlock Key for color mode
  382. OW, // GR0A = 0xEC opens extension registers
  383. GRAPH_ADDRESS_PORT,
  384. 0xec0a,
  385. #ifndef INT10_MODE_SET
  386. OWM,
  387. SEQ_ADDRESS_PORT,
  388. 5,
  389. 0x0100,0x0001,0x0302,0x0003,0x0204, // program up sequencer
  390. OB,
  391. MISC_OUTPUT_REG_WRITE_PORT,
  392. 0x67,
  393. OW,
  394. GRAPH_ADDRESS_PORT,
  395. 0x0e06,
  396. // EndSyncResetCmd
  397. OW,
  398. SEQ_ADDRESS_PORT,
  399. IND_SYNC_RESET + (END_SYNC_RESET_VALUE << 8),
  400. OW,
  401. CRTC_ADDRESS_PORT_COLOR,
  402. 0x0511,
  403. METAOUT+INDXOUT, // program crtc registers
  404. CRTC_ADDRESS_PORT_COLOR,
  405. VGA_NUM_CRTC_PORTS, // count
  406. 0, // start index
  407. 0x5F,0x4f,0x50,0x82,
  408. 0x55,0x81,0xbf,0x1f,
  409. 0x00,0x4f,0x0d,0x0e,
  410. 0x00,0x00,0x01,0xe0,
  411. 0x9c,0xae,0x8f,0x28,
  412. 0x1f,0x96,0xb9,0xa3,
  413. 0xFF,
  414. // extension registers
  415. OWM,
  416. GRAPH_ADDRESS_PORT,
  417. 16,
  418. 0x0262, // ER62 horz. display end extension
  419. 0x8164, // ER64 horz. retrace end extension
  420. 0x0079, // ER79 vertical overflow
  421. 0x007a, // ER7a coarse vert. retrace skew for interlaced odd fields
  422. 0x007b, // ER7b fine vert. retrace skew for interlaced odd fields
  423. 0x007c, // ER7c screen A start addr. extension
  424. 0x0081, // ER81 display mode
  425. 0x0082, // ER82 character clock selection
  426. 0x1084, // ER84 clock select extension
  427. 0x0090, // ER90 display memory control
  428. 0x0091, // ER91 CRT-circular buffer policy select
  429. 0x0095, // ER95 CRT-circular buffer delta & burst
  430. 0x0096, // ER96 display memory control test
  431. 0x12a0, // ERa0 bus interface unit control
  432. 0x00a1, // ERa1 three-state and test control
  433. 0x00c8, // ERc8 RAMDAC control
  434. IB, // prepare atc for writing
  435. INPUT_STATUS_1_COLOR,
  436. METAOUT+ATCOUT, //
  437. ATT_ADDRESS_PORT, // port
  438. VGA_NUM_ATTRIB_CONT_PORTS, // count
  439. 0, // start index
  440. 0x00,0x1,0x2,0x3,0x4,0x5,0x14,0x7,0x38,0x39,0x3a,0x3b,0x3c,0x3d,0x3e,0x3f,
  441. 0x00,0x00,0x0F,0x00,0x00,
  442. METAOUT+INDXOUT, //
  443. GRAPH_ADDRESS_PORT, // port
  444. VGA_NUM_GRAPH_CONT_PORTS, // count
  445. 0, // start index
  446. 0x00,0x00,0x00,0x00,0x00,0x10,0x0e,0x00,0x0FF,
  447. OB, // turn video on.
  448. ATT_ADDRESS_PORT,
  449. VIDEO_ENABLE,
  450. #endif
  451. // zero out the banking regs. for this mode
  452. OWM,
  453. GRAPH_ADDRESS_PORT,
  454. 3,
  455. 0x000d, // ER0D = Banking control: 1 64K bank,
  456. 0x000e, // ER0E bank A address = 0
  457. 0x000f, // ER0F bank B address = 0
  458. OB,
  459. DAC_PIXEL_MASK_PORT,
  460. 0xFF,
  461. EOD
  462. };
  463. //
  464. USHORT CL6420_80x25_14_Text_panel[] = {
  465. // Unlock Key for color mode
  466. OW, // GR0A = 0xEC opens extension registers
  467. GRAPH_ADDRESS_PORT,
  468. 0xec0a,
  469. #ifndef INT10_MODE_SET
  470. OWM,
  471. SEQ_ADDRESS_PORT,
  472. 5,
  473. 0x0100,0x0001,0x0302,0x0003,0x0204, // program up sequencer
  474. OB,
  475. MISC_OUTPUT_REG_WRITE_PORT,
  476. 0x67,
  477. OW,
  478. GRAPH_ADDRESS_PORT,
  479. 0x0e06,
  480. // EndSyncResetCmd
  481. OW,
  482. SEQ_ADDRESS_PORT,
  483. IND_SYNC_RESET + (END_SYNC_RESET_VALUE << 8),
  484. OW,
  485. CRTC_ADDRESS_PORT_COLOR,
  486. 0x0511,
  487. METAOUT+INDXOUT, // program crtc registers
  488. CRTC_ADDRESS_PORT_COLOR,
  489. VGA_NUM_CRTC_PORTS, // count
  490. 0, // start index
  491. 0x5F,0x4f,0x50,0x82,
  492. 0x55,0x81,0xbf,0x1f,
  493. 0x00,0x4f,0x0d,0x0e,
  494. 0x00,0x00,0x01,0xe0,
  495. 0x9c,0xae,0x8f,0x28,
  496. 0x1f,0x96,0xb9,0xa3,
  497. 0xFF,
  498. // extension registers
  499. OWM,
  500. GRAPH_ADDRESS_PORT,
  501. 16,
  502. 0x0262, // ER62 horz. display end extension
  503. 0x8164, // ER64 horz. retrace end extension
  504. 0x0079, // ER79 vertical overflow
  505. 0x007a, // ER7a coarse vert. retrace skew for interlaced odd fields
  506. 0x007b, // ER7b fine vert. retrace skew for interlaced odd fields
  507. 0x007c, // ER7c screen A start addr. extension
  508. 0x0181, // ER81 display mode
  509. 0x8982, // ER82 character clock selection
  510. 0x9a84, // ER84 clock select extension
  511. 0x0090, // ER90 display memory control
  512. 0x0091, // ER91 CRT-circular buffer policy select
  513. 0x0095, // ER95 CRT-circular buffer delta & burst
  514. 0x0096, // ER96 display memory control test
  515. 0x12a0, // ERa0 bus interface unit control
  516. 0x00a1, // ERa1 three-state and test control
  517. 0xa1c8, // ERc8 RAMDAC control
  518. IB, // prepare atc for writing
  519. INPUT_STATUS_1_COLOR,
  520. METAOUT+ATCOUT, //
  521. ATT_ADDRESS_PORT, // port
  522. VGA_NUM_ATTRIB_CONT_PORTS, // count
  523. 0, // start index
  524. 0x00,0x1,0x2,0x3,0x4,0x5,0x14,0x7,0x38,0x39,0x3a,0x3b,0x3c,0x3d,0x3e,0x3f,
  525. 0x00,0x00,0x0F,0x00,0x00,
  526. METAOUT+INDXOUT, //
  527. GRAPH_ADDRESS_PORT, // port
  528. VGA_NUM_GRAPH_CONT_PORTS, // count
  529. 0, // start index
  530. 0x00,0x00,0x00,0x00,0x00,0x10,0x0e,0x00,0x0FF,
  531. OB, // turn video on.
  532. ATT_ADDRESS_PORT,
  533. VIDEO_ENABLE,
  534. #endif
  535. // zero out the banking regs. for this mode
  536. OWM,
  537. GRAPH_ADDRESS_PORT,
  538. 3,
  539. 0x000d, // ER0D = Banking control: 1 64K bank,
  540. 0x000e, // ER0E bank A address = 0
  541. 0x000f, // ER0F bank B address = 0
  542. OB,
  543. DAC_PIXEL_MASK_PORT,
  544. 0xFF,
  545. EOD
  546. };
  547. //
  548. USHORT CL6420_80x25Text_crt[] = {
  549. // Unlock Key for color mode
  550. OW, // GR0A = 0xEC opens extension registers
  551. GRAPH_ADDRESS_PORT,
  552. 0xec0a,
  553. #ifndef INT10_MODE_SET
  554. OWM,
  555. SEQ_ADDRESS_PORT,
  556. 5,
  557. 0x0100,0x0001,0x0302,0x0003,0x0204, // program up sequencer
  558. OWM,
  559. SEQ_ADDRESS_PORT,
  560. 2,
  561. 0x0006,0x0fc07, // program up sequencer
  562. OB,
  563. MISC_OUTPUT_REG_WRITE_PORT,
  564. 0x67,
  565. OW,
  566. GRAPH_ADDRESS_PORT,
  567. 0x0e06,
  568. // EndSyncResetCmd
  569. OW,
  570. SEQ_ADDRESS_PORT,
  571. IND_SYNC_RESET + (END_SYNC_RESET_VALUE << 8),
  572. OW,
  573. CRTC_ADDRESS_PORT_COLOR,
  574. 0x0E11,
  575. METAOUT+INDXOUT, // program crtc registers
  576. CRTC_ADDRESS_PORT_COLOR,
  577. VGA_NUM_CRTC_PORTS, // count
  578. 0, // start index
  579. 0x5F,0x4f,0x50,0x82,
  580. 0x55,0x81,0xbf,0x1f,
  581. 0x00,0x4f,0x0d,0x0e,
  582. 0x00,0x00,0x00,0x00,
  583. 0x9c,0x8e,0x8f,0x28,
  584. 0x1f,0x96,0xb9,0xa3,
  585. 0xFF,
  586. // extension registers
  587. OWM,
  588. GRAPH_ADDRESS_PORT,
  589. 16,
  590. 0x0262, // ER62 horz. display end extension
  591. 0x8164, // ER64 horz. retrace end extension
  592. 0x0079, // ER79 vertical overflow
  593. 0x007a, // ER7a coarse vert. retrace skew for interlaced odd fields
  594. 0x007b, // ER7b fine vert. retrace skew for interlaced odd fields
  595. 0x007c, // ER7c screen A start addr. extension
  596. 0x0081, // ER81 display mode
  597. 0x8082, // ER82 character clock selection
  598. 0x1084, // ER84 clock select extension
  599. 0x0090, // ER90 display memory control
  600. 0x0091, // ER91 CRT-circular buffer policy select
  601. 0x0095, // ER95 CRT-circular buffer delta & burst
  602. 0x0096, // ER96 display memory control test
  603. 0x12a0, // ERa0 bus interface unit control
  604. 0x00a1, // ERa1 three-state and test control
  605. 0x00c8, // ERc8 RAMDAC control
  606. IB, // prepare atc for writing
  607. INPUT_STATUS_1_COLOR,
  608. METAOUT+ATCOUT, //
  609. ATT_ADDRESS_PORT, // port
  610. VGA_NUM_ATTRIB_CONT_PORTS, // count
  611. 0, // start index
  612. 0x00,0x1,0x2,0x3,0x4,0x5,0x14,0x7,0x38,0x39,0x3a,0x3b,0x3c,0x3d,0x3e,0x3f,
  613. 0x04,0x00,0x0F,0x8,0x00,
  614. METAOUT+INDXOUT, //
  615. GRAPH_ADDRESS_PORT, // port
  616. VGA_NUM_GRAPH_CONT_PORTS, // count
  617. 0, // start index
  618. 0x00,0x00,0x00,0x00,0x00,0x10,0x0e,0x00,0x0FF,
  619. OB, // turn video on.
  620. ATT_ADDRESS_PORT,
  621. VIDEO_ENABLE,
  622. #endif
  623. // zero out the banking regs. for this mode
  624. OWM,
  625. GRAPH_ADDRESS_PORT,
  626. 3,
  627. 0x000d, // ER0D = Banking control: 1 64K bank,
  628. 0x000e, // ER0E bank A address = 0
  629. 0x000f, // ER0F bank B address = 0
  630. OB,
  631. DAC_PIXEL_MASK_PORT,
  632. 0xFF,
  633. EOD
  634. };
  635. USHORT CL6420_80x25Text_panel[] = {
  636. // Unlock Key for color mode
  637. OW, // GR0A = 0xEC opens extension registers
  638. GRAPH_ADDRESS_PORT,
  639. 0xec0a,
  640. #ifndef INT10_MODE_SET
  641. OWM,
  642. SEQ_ADDRESS_PORT,
  643. 5,
  644. 0x0100,0x0001,0x0302,0x0003,0x0204, // program up sequencer
  645. OWM,
  646. SEQ_ADDRESS_PORT,
  647. 2,
  648. 0x0006,0x0fc07, // program up sequencer
  649. OB,
  650. MISC_OUTPUT_REG_WRITE_PORT,
  651. 0x67,
  652. OW,
  653. GRAPH_ADDRESS_PORT,
  654. 0x0e06,
  655. // EndSyncResetCmd
  656. OW,
  657. SEQ_ADDRESS_PORT,
  658. IND_SYNC_RESET + (END_SYNC_RESET_VALUE << 8),
  659. OW,
  660. CRTC_ADDRESS_PORT_COLOR,
  661. 0x0E11,
  662. METAOUT+INDXOUT, // program crtc registers
  663. CRTC_ADDRESS_PORT_COLOR,
  664. VGA_NUM_CRTC_PORTS, // count
  665. 0, // start index
  666. 0x5F,0x4f,0x50,0x82,
  667. 0x55,0x81,0xbf,0x1f,
  668. 0x00,0x4f,0x0d,0x0e,
  669. 0x00,0x00,0x00,0x00,
  670. 0x9c,0xae,0x8f,0x28,
  671. 0x1f,0x96,0xb9,0xa3,
  672. 0xFF,
  673. // extension registers
  674. OWM,
  675. GRAPH_ADDRESS_PORT,
  676. 16,
  677. 0x0262, // ER62 horz. display end extension
  678. 0x8164, // ER64 horz. retrace end extension
  679. 0x0079, // ER79 vertical overflow
  680. 0x007a, // ER7a coarse vert. retrace skew for interlaced odd fields
  681. 0x007b, // ER7b fine vert. retrace skew for interlaced odd fields
  682. 0x007c, // ER7c screen A start addr. extension
  683. 0x0181, // ER81 display mode
  684. 0x8982, // ER82 character clock selection
  685. 0x9a84, // ER84 clock select extension
  686. 0x0090, // ER90 display memory control
  687. 0x0091, // ER91 CRT-circular buffer policy select
  688. 0x0095, // ER95 CRT-circular buffer delta & burst
  689. 0x0096, // ER96 display memory control test
  690. 0x12a0, // ERa0 bus interface unit control
  691. 0x00a1, // ERa1 three-state and test control
  692. 0xa1c8, // ERc8 RAMDAC control
  693. IB, // prepare atc for writing
  694. INPUT_STATUS_1_COLOR,
  695. METAOUT+ATCOUT, //
  696. ATT_ADDRESS_PORT, // port
  697. VGA_NUM_ATTRIB_CONT_PORTS, // count
  698. 0, // start index
  699. 0x00,0x1,0x2,0x3,0x4,0x5,0x14,0x7,0x38,0x39,0x3a,0x3b,0x3c,0x3d,0x3e,0x3f,
  700. 0x04,0x00,0x0F,0x8,0x00,
  701. METAOUT+INDXOUT, //
  702. GRAPH_ADDRESS_PORT, // port
  703. VGA_NUM_GRAPH_CONT_PORTS, // count
  704. 0, // start index
  705. 0x00,0x00,0x00,0x00,0x00,0x10,0x0e,0x00,0x0FF,
  706. OB, // turn video on.
  707. ATT_ADDRESS_PORT,
  708. VIDEO_ENABLE,
  709. #endif
  710. // zero out the banking regs. for this mode
  711. OWM,
  712. GRAPH_ADDRESS_PORT,
  713. 3,
  714. 0x000d, // ER0D = Banking control: 1 64K bank,
  715. 0x000e, // ER0E bank A address = 0
  716. 0x000f, // ER0F bank B address = 0
  717. OB,
  718. DAC_PIXEL_MASK_PORT,
  719. 0xFF,
  720. EOD
  721. };
  722. //
  723. //---------------------------------------------------------------------------
  724. // 256 color tables
  725. //---------------------------------------------------------------------------
  726. //
  727. // 800x600 256-color (60Hz refresh) mode set command string for CL 6420.
  728. // requires 512k minimum
  729. //
  730. USHORT CL6420_640x480_256color_crt[] = {
  731. // Unlock Key for color mode
  732. OW, // GR0A = 0xEC opens extension registers
  733. GRAPH_ADDRESS_PORT,
  734. 0xec0a,
  735. #ifndef INT10_MODE_SET
  736. OWM,
  737. SEQ_ADDRESS_PORT,
  738. 5,
  739. 0x0100, // start synch reset
  740. 0x0101,0x0f02,0x0003,0x0e04, // program up sequencer
  741. OB,
  742. MISC_OUTPUT_REG_WRITE_PORT,
  743. 0xe3,
  744. OW, //{ SetGraphCmd,{ "\x05", 0x06, 1 } },
  745. GRAPH_ADDRESS_PORT,
  746. 0x0506,
  747. // EndSyncResetCmd
  748. OW,
  749. SEQ_ADDRESS_PORT,
  750. IND_SYNC_RESET + (END_SYNC_RESET_VALUE << 8),
  751. OW,
  752. CRTC_ADDRESS_PORT_COLOR,
  753. 0x0111,
  754. METAOUT+INDXOUT, // program crtc registers
  755. CRTC_ADDRESS_PORT_COLOR,
  756. VGA_NUM_CRTC_PORTS, // count
  757. 0, // start index
  758. 0xc3,0x9F,0xa0,0x86,
  759. 0xa4,0x10,0x0B,0x3E,
  760. 0x00,0x40,0x00,0x00,
  761. 0x00,0x00,0x00,0x00,
  762. 0xEA,0xAC,0xDF,0x50,
  763. 0x00,0xE7,0x04,0xE3,
  764. 0xFF,
  765. // extension registers
  766. OWM,
  767. GRAPH_ADDRESS_PORT,
  768. 16,
  769. 0x2662, // ER62 horz. display end extension
  770. 0x1064, // ER64 horz. retrace end extension
  771. 0x0079, // ER79 vertical overflow
  772. 0x007a, // ER7a coarse vert. retrace skew for interlaced odd fields
  773. 0x007b, // ER7b fine vert. retrace skew for interlaced odd fields
  774. 0x007c, // ER7c screen A start addr. extension
  775. 0x0081, // ER81 display mode
  776. 0x0a82, // ER82 character clock selection
  777. 0x1084, // ER84 clock select extension
  778. 0x0090, // ER90 display memory control
  779. 0x0391, // ER91 CRT-circular buffer policy select
  780. 0x0895, // ER95 CRT-circular buffer delta & burst
  781. 0x0096, // ER96 display memory control test
  782. 0x12a0, // ERa0 bus interface unit control
  783. 0x20a1, // ERa1 three-state and test control
  784. 0x05c8, // ERc8 RAMDAC control
  785. IB, // prepare atc for writing
  786. INPUT_STATUS_1_COLOR,
  787. METAOUT+ATCOUT, //
  788. ATT_ADDRESS_PORT, // port
  789. VGA_NUM_ATTRIB_CONT_PORTS, // count
  790. 0, // start index
  791. 0x00,0x01,0x02,0x03,0x04,
  792. 0x05,0x06,0x07,0x08,0x09,
  793. 0x0A,0x0B,0x0C,0x0D,0x0E,
  794. 0x0F,0x01,0x00,0x0F,0x00,0x00,
  795. METAOUT+INDXOUT, //
  796. GRAPH_ADDRESS_PORT, // port
  797. VGA_NUM_GRAPH_CONT_PORTS, // count
  798. 0, // start index
  799. 0x00,0x0,0x0,0x0,0x0,0x40,0x05,0x0F,0x0FF,
  800. OB, // turn video on.
  801. ATT_ADDRESS_PORT,
  802. VIDEO_ENABLE,
  803. #endif
  804. // now do the banking registers
  805. OWM,
  806. GRAPH_ADDRESS_PORT,
  807. 3,
  808. #if ONE_64K_BANK
  809. 0x030d, // ER0D = Banking control: 1 64K bank,
  810. #endif
  811. #if TWO_32K_BANKS
  812. 0x050d,
  813. #endif
  814. 0x000e, // ER0E bank A address = 0
  815. 0x000f, // ER0F bank B address = 0
  816. OB,
  817. DAC_PIXEL_MASK_PORT,
  818. 0xFF,
  819. EOD
  820. };
  821. USHORT CL6420_640x480_256color_panel[] = {
  822. // Unlock Key for color mode
  823. OW, // GR0A = 0xEC opens extension registers
  824. GRAPH_ADDRESS_PORT,
  825. 0xec0a,
  826. #ifndef INT10_MODE_SET
  827. OWM,
  828. SEQ_ADDRESS_PORT,
  829. 5,
  830. 0x0100, // start synch reset
  831. 0x0101,0x0f02,0x0003,0x0e04, // program up sequencer
  832. OB,
  833. MISC_OUTPUT_REG_WRITE_PORT,
  834. 0xe3,
  835. OW, //{ SetGraphCmd,{ "\x05", 0x06, 1 } },
  836. GRAPH_ADDRESS_PORT,
  837. 0x0506,
  838. // EndSyncResetCmd
  839. OW,
  840. SEQ_ADDRESS_PORT,
  841. IND_SYNC_RESET + (END_SYNC_RESET_VALUE << 8),
  842. OW,
  843. CRTC_ADDRESS_PORT_COLOR,
  844. 0x0111,
  845. METAOUT+INDXOUT, // program crtc registers
  846. CRTC_ADDRESS_PORT_COLOR,
  847. VGA_NUM_CRTC_PORTS, // count
  848. 0, // start index
  849. 0xc3,0x9F,0xa0,0x86,
  850. 0xa4,0x10,0x0B,0x3E,
  851. 0x00,0x40,0x00,0x00,
  852. 0x00,0x00,0x00,0x00,
  853. 0xEA,0xAC,0xDF,0x50,
  854. 0x00,0xE7,0x04,0xE3,
  855. 0xFF,
  856. // extension registers
  857. OWM,
  858. GRAPH_ADDRESS_PORT,
  859. 16,
  860. 0x2662, // ER62 horz. display end extension
  861. 0x1064, // ER64 horz. retrace end extension
  862. 0x0079, // ER79 vertical overflow
  863. 0x007a, // ER7a coarse vert. retrace skew for interlaced odd fields
  864. 0x007b, // ER7b fine vert. retrace skew for interlaced odd fields
  865. 0x007c, // ER7c screen A start addr. extension
  866. 0x0181, // ER81 display mode
  867. 0x8a82, // ER82 character clock selection
  868. 0x9a84, // ER84 clock select extension
  869. 0x0090, // ER90 display memory control
  870. 0x0391, // ER91 CRT-circular buffer policy select
  871. 0x0895, // ER95 CRT-circular buffer delta & burst
  872. 0x0096, // ER96 display memory control test
  873. 0x12a0, // ERa0 bus interface unit control
  874. 0x20a1, // ERa1 three-state and test control
  875. 0xa5c8, // ERc8 RAMDAC control
  876. IB, // prepare atc for writing
  877. INPUT_STATUS_1_COLOR,
  878. METAOUT+ATCOUT, //
  879. ATT_ADDRESS_PORT, // port
  880. VGA_NUM_ATTRIB_CONT_PORTS, // count
  881. 0, // start index
  882. 0x00,0x01,0x02,0x03,0x04,
  883. 0x05,0x06,0x07,0x08,0x09,
  884. 0x0A,0x0B,0x0C,0x0D,0x0E,
  885. 0x0F,0x01,0x00,0x0F,0x00,0x00,
  886. METAOUT+INDXOUT, //
  887. GRAPH_ADDRESS_PORT, // port
  888. VGA_NUM_GRAPH_CONT_PORTS, // count
  889. 0, // start index
  890. 0x00,0x0,0x0,0x0,0x0,0x40,0x05,0x0F,0x0FF,
  891. OB, // turn video on.
  892. ATT_ADDRESS_PORT,
  893. VIDEO_ENABLE,
  894. #endif
  895. // now do the banking registers
  896. OWM,
  897. GRAPH_ADDRESS_PORT,
  898. 3,
  899. #if ONE_64K_BANK
  900. 0x030d, // ER0D = Banking control: 1 64K bank,
  901. #endif
  902. #if TWO_32K_BANKS
  903. 0x050d,
  904. #endif
  905. 0x000e, // ER0E bank A address = 0
  906. 0x000f, // ER0F bank B address = 0
  907. OB,
  908. DAC_PIXEL_MASK_PORT,
  909. 0xFF,
  910. EOD
  911. };
  912. //
  913. // 800x600 256-color (60Hz refresh) mode set command string for CL 6420.
  914. // requires 512k minimum
  915. //
  916. USHORT CL6420_800x600_256color_crt[] = {
  917. // Unlock Key for color mode
  918. OW, // GR0A = 0xEC opens extension registers
  919. GRAPH_ADDRESS_PORT,
  920. 0xec0a,
  921. #ifndef INT10_MODE_SET
  922. OWM,
  923. SEQ_ADDRESS_PORT,
  924. 5,
  925. 0x0100, // start synch reset
  926. 0x0101,0x0f02,0x0003,0x0e04, // program up sequencer
  927. OB,
  928. MISC_OUTPUT_REG_WRITE_PORT,
  929. 0x2f,
  930. OW,
  931. GRAPH_ADDRESS_PORT,
  932. 0x0506,
  933. // EndSyncResetCmd
  934. OW,
  935. SEQ_ADDRESS_PORT,
  936. IND_SYNC_RESET + (END_SYNC_RESET_VALUE << 8),
  937. OW,
  938. CRTC_ADDRESS_PORT_COLOR,
  939. 0x0E11,
  940. METAOUT+INDXOUT, // program crtc registers
  941. CRTC_ADDRESS_PORT_COLOR,
  942. VGA_NUM_CRTC_PORTS, // count
  943. 0, // start index
  944. 0x03,0xc7,0xc8,0x86,
  945. 0xdc,0x0c,0x72,0xf0,
  946. 0x00,0x60,0x00,0x00,
  947. 0x00,0x00,0x00,0x00,
  948. 0x5a,0xac,0x57,0x64,
  949. 0x00,0x58,0x72,0xe3,
  950. 0xFF,
  951. // extension registers
  952. OWM,
  953. GRAPH_ADDRESS_PORT,
  954. 16,
  955. 0x2662, // ER62 horz. display end extension
  956. 0x2c64, // ER64 horz. retrace end extension
  957. 0x0079, // ER79 vertical overflow
  958. 0x007a, // ER7a coarse vert. retrace skew for interlaced odd fields
  959. 0x007b, // ER7b fine vert. retrace skew for interlaced odd fields
  960. 0x007c, // ER7c screen A start addr. extension
  961. 0x0081, // ER81 display mode
  962. 0x0a82, // ER82 character clock selection
  963. 0x9c84, // ER84 clock select extension
  964. 0x0090, // ER90 display memory control
  965. 0x0391, // ER91 CRT-circular buffer policy select
  966. 0x0895, // ER95 CRT-circular buffer delta & burst
  967. 0x0096, // ER96 display memory control test
  968. 0x12a0, // ERa0 bus interface unit control
  969. 0x20a1, // ERa1 three-state and test control
  970. 0x05c8, // ERc8 RAMDAC control
  971. IB, // prepare atc for writing
  972. INPUT_STATUS_1_COLOR,
  973. METAOUT+ATCOUT, //
  974. ATT_ADDRESS_PORT, // port
  975. VGA_NUM_ATTRIB_CONT_PORTS, // count
  976. 0, // start index
  977. 0x0,0x1,0x2,0x3,0x4,0x5,0x6,0x7,0x8,0x9,0xA,0xB,0xC,0xD,0xE,0xF,
  978. 0x01,0x0,0x0F,0x0,0x0,
  979. METAOUT+INDXOUT, //
  980. GRAPH_ADDRESS_PORT, // port
  981. VGA_NUM_GRAPH_CONT_PORTS, // count
  982. 0, // start index
  983. 0x00,0x0,0x0,0x0,0x0,0x40,0x05,0x0F,0x0FF,
  984. OB, // turn video on.
  985. ATT_ADDRESS_PORT,
  986. VIDEO_ENABLE,
  987. #endif
  988. // now do the banking registers
  989. OWM,
  990. GRAPH_ADDRESS_PORT,
  991. 3,
  992. #if ONE_64K_BANK
  993. 0x030d, // ER0D = Banking control: 1 64K bank,
  994. #endif
  995. #if TWO_32K_BANKS
  996. 0x050d,
  997. #endif
  998. 0x000e, // ER0E bank A address = 0
  999. 0x000f, // ER0F bank B address = 0
  1000. OB,
  1001. DAC_PIXEL_MASK_PORT,
  1002. 0xFF,
  1003. EOD
  1004. };
  1005. //
  1006. // 1024x768 256-color (60Hz refresh) mode set command string for CL 6420.
  1007. // Requires 1Meg minimum.
  1008. //
  1009. USHORT CL6420_1024x768_256color_crt[] = {
  1010. // Unlock Key for color mode
  1011. OW, // GR0A = 0xEC opens extension registers
  1012. GRAPH_ADDRESS_PORT,
  1013. 0xec0a,
  1014. #ifndef INT10_MODE_SET
  1015. OWM,
  1016. SEQ_ADDRESS_PORT,
  1017. 5,
  1018. 0x0100, // start synch reset
  1019. 0x0101,0x0f02,0x0003,0x0e04, // program up sequencer
  1020. OB,
  1021. MISC_OUTPUT_REG_WRITE_PORT,
  1022. 0x23,
  1023. OW,
  1024. GRAPH_ADDRESS_PORT,
  1025. 0x0506,
  1026. // EndSyncResetCmd
  1027. OW,
  1028. SEQ_ADDRESS_PORT,
  1029. IND_SYNC_RESET + (END_SYNC_RESET_VALUE << 8),
  1030. OW,
  1031. CRTC_ADDRESS_PORT_COLOR,
  1032. 0x0E11,
  1033. METAOUT+INDXOUT, // program crtc registers
  1034. CRTC_ADDRESS_PORT_COLOR,
  1035. VGA_NUM_CRTC_PORTS, // count
  1036. 0, // start index
  1037. 0x39,0xff,0x00,0x9c,
  1038. 0x06,0x91,0x26,0xfd,
  1039. 0x00,0x60,0x00,0x00,
  1040. 0x00,0x00,0x00,0x00,
  1041. 0x04,0xa6,0xff,0x7f,
  1042. 0x00,0x00,0x26,0xe3,
  1043. 0xFF,
  1044. // extension registers
  1045. OWM,
  1046. GRAPH_ADDRESS_PORT,
  1047. 16,
  1048. 0xbc62, // ER62 horz. display end extension
  1049. 0xf164, // ER64 horz. retrace end extension
  1050. 0x0079, // ER79 vertical overflow
  1051. 0x997a, // ER7a coarse vert. retrace skew for interlaced odd fields
  1052. 0x007b, // ER7b fine vert. retrace skew for interlaced odd fields
  1053. 0x007c, // ER7c screen A start addr. extension
  1054. 0x0481, // ER81 display mode
  1055. 0x0a82, // ER82 character clock selection
  1056. 0xa084, // ER84 clock select extension
  1057. 0x0090, // ER90 display memory control
  1058. 0x0391, // ER91 CRT-circular buffer policy select
  1059. 0x0895, // ER95 CRT-circular buffer delta & burst
  1060. 0x0096, // ER96 display memory control test
  1061. 0x12a0, // ERa0 bus interface unit control
  1062. 0x20a1, // ERa1 three-state and test control
  1063. 0x05c8, // ERc8 RAMDAC control
  1064. IB, // prepare atc for writing
  1065. INPUT_STATUS_1_COLOR,
  1066. OB,
  1067. DAC_PIXEL_MASK_PORT,
  1068. 0xFF,
  1069. METAOUT+ATCOUT, //
  1070. ATT_ADDRESS_PORT, // port
  1071. VGA_NUM_ATTRIB_CONT_PORTS, // count
  1072. 0, // start index
  1073. 0x00,0x1,0x2,0x3,0x4,0x5,0x6,0x7,0x8,0x9,0xA,0xB,0xC,0xD,0xE,0xF,
  1074. 0x01,0x00,0x0F,0x00,0x00,
  1075. METAOUT+INDXOUT, //
  1076. GRAPH_ADDRESS_PORT, // port
  1077. VGA_NUM_GRAPH_CONT_PORTS, // count
  1078. 0, // start index
  1079. 0x00,0x00,0x00,0x00,0x00,0x40,0x05,0x0F,0x0FF,
  1080. OB, // turn video on.
  1081. ATT_ADDRESS_PORT,
  1082. VIDEO_ENABLE,
  1083. #endif
  1084. // now do the banking registers
  1085. OWM,
  1086. GRAPH_ADDRESS_PORT,
  1087. 3,
  1088. #if ONE_64K_BANK
  1089. 0x030d, // ER0D = Banking control: 1 64K bank,
  1090. #endif
  1091. #if TWO_32K_BANKS
  1092. 0x050d,
  1093. #endif
  1094. 0x000e, // ER0E bank A address = 0
  1095. 0x000f, // ER0F bank B address = 0
  1096. OB,
  1097. DAC_PIXEL_MASK_PORT,
  1098. 0xFF,
  1099. EOD
  1100. };
  1101. #if MULTIPLE_REFRESH_TABLES
  1102. //
  1103. // 800x600 16-color (56Hz refresh) mode set command string for CL 6420.
  1104. //
  1105. USHORT CL6420_800x600_56Hz_crt[] = {
  1106. #ifndef INT10_MODE_SET
  1107. // Unlock Key for color mode
  1108. OW, // GR0A = 0xEC opens extension registers
  1109. GRAPH_ADDRESS_PORT,
  1110. 0xec0a,
  1111. OWM,
  1112. SEQ_ADDRESS_PORT,
  1113. 5,
  1114. 0x0100, // start synch reset
  1115. 0x0101,0x0f02,0x0003,0x0604, // program up sequencer
  1116. OB,
  1117. MISC_OUTPUT_REG_WRITE_PORT,
  1118. 0xe3,
  1119. OW,
  1120. GRAPH_ADDRESS_PORT,
  1121. 0x0506,
  1122. // EndSyncResetCmd
  1123. OW,
  1124. SEQ_ADDRESS_PORT,
  1125. IND_SYNC_RESET + (END_SYNC_RESET_VALUE << 8),
  1126. OW,
  1127. CRTC_ADDRESS_PORT_COLOR,
  1128. 0x0E11,
  1129. METAOUT+INDXOUT, // program crtc registers
  1130. CRTC_ADDRESS_PORT_COLOR,
  1131. VGA_NUM_CRTC_PORTS, // count
  1132. 0, // start index
  1133. 0x7b,0x63,0x64,0x9e,
  1134. 0x69,0x92,0x6f,0xf0,
  1135. 0x00,0x60,0x00,0x00,
  1136. 0x00,0x00,0x00,0x00,
  1137. 0x58,0xaa,0x57,0x32,
  1138. 0x00,0x58,0x6f,0xe3,
  1139. 0xFF,
  1140. // extension registers
  1141. OWM,
  1142. GRAPH_ADDRESS_PORT,
  1143. 16,
  1144. 0x1e62, // ER62 horz. display end extension
  1145. 0x9264, // ER64 horz. retrace end extension
  1146. 0x0079, // ER79 vertical overflow
  1147. 0x007a, // ER7a coarse vert. retrace skew for interlaced odd fields
  1148. 0x007b, // ER7b fine vert. retrace skew for interlaced odd fields
  1149. 0x007c, // ER7c screen A start addr. extension
  1150. 0x0081, // ER81 display mode
  1151. 0x0082, // ER82 character clock selection
  1152. 0x8c84, // ER84 clock select extension
  1153. 0x0090, // ER90 display memory control
  1154. 0x8391, // ER91 CRT-circular buffer policy select
  1155. 0x0395, // ER95 CRT-circular buffer delta & burst
  1156. 0x0096, // ER96 display memory control test
  1157. 0x12a0, // ERa0 bus interface unit control
  1158. 0x00a1, // ERa1 three-state and test control
  1159. 0x00c8, // ERc8 RAMDAC control
  1160. // zero out the banking regs. for this mode
  1161. OWM,
  1162. GRAPH_ADDRESS_PORT,
  1163. 3,
  1164. 0x000d, // ER0D = Banking control: 1 64K bank,
  1165. 0x000e, // ER0E bank A address = 0
  1166. 0x000f, // ER0F bank B address = 0
  1167. IB, // prepare atc for writing
  1168. INPUT_STATUS_1_COLOR,
  1169. METAOUT+ATCOUT, //
  1170. ATT_ADDRESS_PORT, // port
  1171. VGA_NUM_ATTRIB_CONT_PORTS, // count
  1172. 0, // start index
  1173. 0x0,0x1,0x2,0x3,0x4,0x5,0x6,0x7,0x8,0x9,0xA,0xB,0xC,0xD,0xE,0xF,
  1174. 0x01,0x0,0x0F,0x0,0x0,
  1175. METAOUT+INDXOUT, //
  1176. GRAPH_ADDRESS_PORT, // port
  1177. VGA_NUM_GRAPH_CONT_PORTS, // count
  1178. 0, // start index
  1179. 0x00,0x0,0x0,0x0,0x0,0x0,0x05,0x0F,0x0FF,
  1180. OB,
  1181. DAC_PIXEL_MASK_PORT,
  1182. 0xFF,
  1183. OB, // turn video on.
  1184. ATT_ADDRESS_PORT,
  1185. VIDEO_ENABLE,
  1186. #endif
  1187. EOD
  1188. };
  1189. //
  1190. // 800x600 16-color (72Hz refresh) mode set command string for CL 6420.
  1191. //
  1192. USHORT CL6420_800x600_72Hz_crt[] = {
  1193. #ifndef INT10_MODE_SET
  1194. // Unlock Key for color mode
  1195. OW, // GR0A = 0xEC opens extension registers
  1196. GRAPH_ADDRESS_PORT,
  1197. 0xec0a,
  1198. OWM,
  1199. SEQ_ADDRESS_PORT,
  1200. 5,
  1201. 0x0100, // start synch reset
  1202. 0x0101,0x0f02,0x0003,0x0604, // program up sequencer
  1203. OB,
  1204. MISC_OUTPUT_REG_WRITE_PORT,
  1205. 0xe3,
  1206. OW,
  1207. GRAPH_ADDRESS_PORT,
  1208. 0x0506,
  1209. // EndSyncResetCmd
  1210. OW,
  1211. SEQ_ADDRESS_PORT,
  1212. IND_SYNC_RESET + (END_SYNC_RESET_VALUE << 8),
  1213. OW,
  1214. CRTC_ADDRESS_PORT_COLOR,
  1215. 0x0E11,
  1216. METAOUT+INDXOUT, // program crtc registers
  1217. CRTC_ADDRESS_PORT_COLOR,
  1218. VGA_NUM_CRTC_PORTS, // count
  1219. 0, // start index
  1220. 0x7f,0x63,0x64,0x82,
  1221. 0x6b,0x1b,0x72,0xf0,
  1222. 0x00,0x60,0x00,0x00,
  1223. 0x00,0x00,0x00,0x00,
  1224. 0x58,0xac,0x57,0x32,
  1225. 0x00,0x58,0x72,0xe3,
  1226. 0xFF,
  1227. // extension registers
  1228. OWM,
  1229. GRAPH_ADDRESS_PORT,
  1230. 16,
  1231. 0x0262, // ER62 horz. display end extension
  1232. 0x1b64, // ER64 horz. retrace end extension
  1233. 0x0079, // ER79 vertical overflow
  1234. 0x007a, // ER7a coarse vert. retrace skew for interlaced odd fields
  1235. 0x007b, // ER7b fine vert. retrace skew for interlaced odd fields
  1236. 0x007c, // ER7c screen A start addr. extension
  1237. 0x0081, // ER81 display mode
  1238. 0x0082, // ER82 character clock selection
  1239. 0x9c84, // ER84 clock select extension
  1240. 0x0090, // ER90 display memory control
  1241. 0x8391, // ER91 CRT-circular buffer policy select
  1242. 0x0395, // ER95 CRT-circular buffer delta & burst
  1243. 0x0096, // ER96 display memory control test
  1244. 0x12a0, // ERa0 bus interface unit control
  1245. 0x00a1, // ERa1 three-state and test control
  1246. 0x00c8, // ERc8 RAMDAC control
  1247. // zero out the banking regs. for this mode
  1248. OWM,
  1249. GRAPH_ADDRESS_PORT,
  1250. 3,
  1251. 0x000d, // ER0D = Banking control: 1 64K bank,
  1252. 0x000e, // ER0E bank A address = 0
  1253. 0x000f, // ER0F bank B address = 0
  1254. IB, // prepare atc for writing
  1255. INPUT_STATUS_1_COLOR,
  1256. METAOUT+ATCOUT, //
  1257. ATT_ADDRESS_PORT, // port
  1258. VGA_NUM_ATTRIB_CONT_PORTS, // count
  1259. 0, // start index
  1260. 0x0,0x1,0x2,0x3,0x4,0x5,0x6,0x7,0x8,0x9,0xA,0xB,0xC,0xD,0xE,0xF,
  1261. 0x01,0x0,0x0F,0x0,0x0,
  1262. METAOUT+INDXOUT, //
  1263. GRAPH_ADDRESS_PORT, // port
  1264. VGA_NUM_GRAPH_CONT_PORTS, // count
  1265. 0, // start index
  1266. 0x00,0x0,0x0,0x0,0x0,0x0,0x05,0x0F,0x0FF,
  1267. OB,
  1268. DAC_PIXEL_MASK_PORT,
  1269. 0xFF,
  1270. OB, // turn video on.
  1271. ATT_ADDRESS_PORT,
  1272. VIDEO_ENABLE,
  1273. #endif
  1274. EOD
  1275. };
  1276. //
  1277. // 1024x768 16-color (43.5Hz refresh interlaced) mode set command string
  1278. // for CL 6420.
  1279. // Requires 512K minimum.
  1280. //
  1281. USHORT CL6420_1024x768_I43Hz_crt[] = {
  1282. #ifndef INT10_MODE_SET
  1283. // Unlock Key for color mode
  1284. OW, // GR0A = 0xEC opens extension registers
  1285. GRAPH_ADDRESS_PORT,
  1286. 0xec0a,
  1287. OWM,
  1288. SEQ_ADDRESS_PORT,
  1289. 5,
  1290. 0x0100, // start synch reset
  1291. 0x0101,0x0f02,0x0003,0x0604, // program up sequencer
  1292. OWM,
  1293. SEQ_ADDRESS_PORT,
  1294. 2,
  1295. 0x0006,0x0bc07, // program up sequencer
  1296. OB,
  1297. MISC_OUTPUT_REG_WRITE_PORT,
  1298. 0x2b,
  1299. OW,
  1300. GRAPH_ADDRESS_PORT,
  1301. 0x0506,
  1302. // EndSyncResetCmd
  1303. OW,
  1304. SEQ_ADDRESS_PORT,
  1305. IND_SYNC_RESET + (END_SYNC_RESET_VALUE << 8),
  1306. OW,
  1307. CRTC_ADDRESS_PORT_COLOR,
  1308. 0x0E11,
  1309. METAOUT+INDXOUT, // program crtc registers
  1310. CRTC_ADDRESS_PORT_COLOR,
  1311. VGA_NUM_CRTC_PORTS, // count
  1312. 0, // start index
  1313. 0x99,0x7f,0x80,0x9c,
  1314. 0x83,0x19,0x2f,0xfd,
  1315. 0x00,0x60,0x00,0x00,
  1316. 0x00,0x00,0x00,0x00,
  1317. 0x00,0xa4,0xff,0x3f,
  1318. 0x00,0x00,0x2f,0xe3,
  1319. 0xff,
  1320. // extension registers
  1321. OWM,
  1322. GRAPH_ADDRESS_PORT,
  1323. 16,
  1324. 0x1c62, // ER62 horz. display end extension
  1325. 0x1964, // ER64 horz. retrace end extension
  1326. 0x0079, // ER79 vertical overflow
  1327. 0x4c7a, // ER7a coarse vert. retrace skew for interlaced odd fields
  1328. 0x007b, // ER7b fine vert. retrace skew for interlaced odd fields
  1329. 0x007c, // ER7c screen A start addr. extension
  1330. 0x0481, // ER81 display mode
  1331. 0x0082, // ER82 character clock selection
  1332. 0xa084, // ER84 clock select extension
  1333. 0x0090, // ER90 display memory control
  1334. 0x0391, // ER91 CRT-circular buffer policy select
  1335. 0x0295, // ER95 CRT-circular buffer delta & burst
  1336. 0x0096, // ER96 display memory control test
  1337. 0x12a0, // ERa0 bus interface unit control
  1338. 0x00a1, // ERa1 three-state and test control
  1339. 0x00c8, // ERc8 RAMDAC control
  1340. // now do the banking registers
  1341. OWM,
  1342. GRAPH_ADDRESS_PORT,
  1343. 3,
  1344. #if ONE_64K_BANK
  1345. 0x030d, // ER0D = Banking control: 1 64K bank,
  1346. #endif
  1347. #if TWO_32K_BANKS
  1348. 0x050d,
  1349. #endif
  1350. 0x000e, // ER0E bank A address = 0
  1351. 0x000f, // ER0F bank B address = 0
  1352. OB,
  1353. DAC_PIXEL_MASK_PORT,
  1354. 0xFF,
  1355. IB, // prepare atc for writing
  1356. INPUT_STATUS_1_COLOR,
  1357. METAOUT+ATCOUT, //
  1358. ATT_ADDRESS_PORT, // port
  1359. VGA_NUM_ATTRIB_CONT_PORTS, // count
  1360. 0, // start index
  1361. 0x00,0x1,0x2,0x3,0x4,0x5,0x6,0x7,0x8,0x9,0xA,0xB,0xC,0xD,0xE,0xF,
  1362. 0x01,0x00,0x0F,0x00,0x00,
  1363. METAOUT+INDXOUT, //
  1364. GRAPH_ADDRESS_PORT, // port
  1365. VGA_NUM_GRAPH_CONT_PORTS, // count
  1366. 0, // start index
  1367. 0x00,0x00,0x00,0x00,0x00,0x00,0x05,0x0F,0x0FF,
  1368. OB,
  1369. DAC_PIXEL_MASK_PORT,
  1370. 0xFF,
  1371. OB, // turn video on.
  1372. ATT_ADDRESS_PORT,
  1373. VIDEO_ENABLE,
  1374. #endif
  1375. EOD
  1376. };
  1377. #endif