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.

5151 lines
153 KiB

  1. /*++
  2. Copyright (c) 1992-1995 Microsoft Corporation
  3. Module Name:
  4. s3data.c
  5. Abstract:
  6. This module contains all the global data used by the S3 driver.
  7. Environment:
  8. Kernel mode
  9. Revision History:
  10. --*/
  11. #include "s3.h"
  12. #include "cmdcnst.h"
  13. /*****************************************************************************
  14. *
  15. * NON-PAGED DATA
  16. *
  17. *
  18. * The following data is accessed during system shutdown while paging
  19. * is disabled. Because of this, the data must be available in memory
  20. * at shutdown. The data is needed because it is used by S3ResetHw
  21. * to reset the S3 card immediately prior to rebooting.
  22. *
  23. ****************************************************************************/
  24. /*****************************************************************************
  25. * Command table to get ready for VGA mode
  26. * this is only used for the 911/924 chips
  27. ****************************************************************************/
  28. USHORT s3_set_vga_mode[] = {
  29. SELECTACCESSRANGE + SYSTEMCONTROL,
  30. OW, // Unlock the S3 regs
  31. 0x3d4, 0x4838,
  32. OW, // Unlock the SC regs
  33. 0x3d4, 0xa539,
  34. OB, // Enable the S3 graphics engine
  35. 0x3d4, 0x40,
  36. METAOUT+MASKOUT,
  37. 0x3d5, 0xfe, 0x01,
  38. SELECTACCESSRANGE + ADVANCEDFUNCTIONCONTROL,
  39. OB, // reset to normal VGA operation
  40. 0x4ae8, 0x02,
  41. SELECTACCESSRANGE + SYSTEMCONTROL,
  42. OB, // Disable the S3 graphics engine
  43. 0x3d4, 0x40,
  44. METAOUT+MASKOUT,
  45. 0x3d5, 0xfe, 0x00,
  46. OB, // Memory Control
  47. 0x3d4, 0x31,
  48. METAOUT+MASKOUT,
  49. 0x3d5, 0x75, 0x85,
  50. OB, // Backward Compat 1
  51. 0x3d4, 0x32,
  52. METAOUT+MASKOUT,
  53. 0x3d5, 0x40, 0x00,
  54. OW, // Backward Compat 2
  55. 0x3d4, 0x0033,
  56. OW, // Backward Compat 3
  57. 0x3d4, 0x0034,
  58. OW, // CRTC Lock
  59. 0x3d4, 0x0035,
  60. OB, // S3 Misc 1
  61. 0x3d4, 0x3a,
  62. METAOUT+MASKOUT,
  63. 0x3d5, 0x88, 0x05,
  64. OW, // Data Transfer Exec Pos
  65. 0x3d4, 0x5a3b,
  66. OW, // Interlace Retrace start
  67. 0x3d4, 0x103c,
  68. OW, // Extended Mode
  69. 0x3d4, 0x0043,
  70. OW, // HW graphics Cursor Mode
  71. 0x3d4, 0x0045,
  72. OW, // HW graphics Cursor Orig x
  73. 0x3d4, 0x0046,
  74. OW, // HW graphics Cursor Orig x
  75. 0x3d4, 0xff47,
  76. OW, // HW graphics Cursor Orig y
  77. 0x3d4, 0xfc48,
  78. OW, // HW graphics Cursor Orig y
  79. 0x3d4, 0xff49,
  80. OW, // HW graphics Cursor Orig y
  81. 0x3d4, 0xff4a,
  82. OW, // HW graphics Cursor Orig y
  83. 0x3d4, 0xff4b,
  84. OW, // HW graphics Cursor Orig y
  85. 0x3d4, 0xff4c,
  86. OW, // HW graphics Cursor Orig y
  87. 0x3d4, 0xff4d,
  88. OW, // Dsp Start x pixel pos
  89. 0x3d4, 0xff4e,
  90. OW, // Dsp Start y pixel pos
  91. 0x3d4, 0xdf4d,
  92. OB, // MODE-CNTL
  93. 0x3d4, 0x42,
  94. METAOUT+MASKOUT,
  95. 0x3d5, 0xdf, 0x00,
  96. EOD
  97. };
  98. USHORT s3_set_vga_mode_no_bios[] = {
  99. SELECTACCESSRANGE + VARIOUSVGA,
  100. OB,
  101. 0x3c4, 0x01,
  102. METAOUT+MASKOUT,
  103. 0x3c5, 0xdf, 0x20,
  104. SELECTACCESSRANGE + SYSTEMCONTROL,
  105. OW, // Unlock the S3 regs
  106. 0x3d4, 0x4838,
  107. OW, // Unlock the SC regs
  108. 0x3d4, 0xa039,
  109. OB, // Enable the S3 graphics engine
  110. 0x3d4, 0x40,
  111. METAOUT+MASKOUT,
  112. 0x3d5, 0xfe, 0x01,
  113. SELECTACCESSRANGE + ADVANCEDFUNCTIONCONTROL,
  114. OB, // reset to normal VGA operation
  115. 0x4ae8, 0x02,
  116. SELECTACCESSRANGE + SYSTEMCONTROL,
  117. OB, // Disable the S3 graphics engine
  118. 0x3d4, 0x40,
  119. METAOUT+MASKOUT,
  120. 0x3d5, 0xfe, 0x00,
  121. OB, // Memory Control
  122. 0x3d4, 0x31,
  123. METAOUT+MASKOUT,
  124. 0x3d5, 0x30, 0x85,
  125. OWM,
  126. 0x3d4,
  127. 5,
  128. 0x0050, 0x0051, 0x0053, 0x3854,
  129. 0x0055,
  130. OB,
  131. 0x3d4, 0x58,
  132. METAOUT+MASKOUT,
  133. 0x3d5, 0x0c, 0xc0,
  134. RESET_CR5C,
  135. OWM,
  136. 0x3d4,
  137. 8,
  138. 0x005d, 0x005e, 0x0760, 0x8061,
  139. 0xa162, 0x0063, 0x0064, 0x0865,
  140. OB, // Backward Compat 1
  141. 0x3d4, 0x32,
  142. METAOUT+MASKOUT,
  143. 0x3d5, 0x40, 0x00,
  144. OW, // Backward Compat 2
  145. 0x3d4, 0x0033,
  146. OW, // Backward Compat 3
  147. 0x3d4, 0x0034,
  148. OW, // CRTC Lock
  149. 0x3d4, 0x0035,
  150. OB, // S3 Misc 1
  151. 0x3d4, 0x3a,
  152. METAOUT+MASKOUT,
  153. 0x3d5, 0x88, 0x05,
  154. OWM,
  155. 0x3d4,
  156. 14,
  157. 0x5a3b, 0x103c, 0x0043, 0x0045,
  158. 0x0046, 0xff47, 0xfc48, 0xff49,
  159. 0xff4a, 0xff4b, 0xff4c, 0xff4d,
  160. 0xff4e, 0xdf4f,
  161. OB,
  162. 0x3d4, 0x40,
  163. METAOUT+MASKOUT,
  164. 0x3d5, 0xf6, 0x08,
  165. OB, // MODE-CNTL
  166. 0x3d4, 0x42,
  167. METAOUT+MASKOUT,
  168. 0x3d5, 0xdf, 0x00,
  169. EOD
  170. };
  171. /*****************************************************************************
  172. *
  173. * START OF PAGED DATA
  174. *
  175. * All of the data listed below is pageable. Therefore the system can
  176. * swap the data out to disk when it needs to free some physical memory.
  177. *
  178. * Any data accessed while paging is unavailable should be placed above.
  179. *
  180. ****************************************************************************/
  181. #if defined(ALLOC_PRAGMA)
  182. #pragma data_seg("PAGE_DATA")
  183. #endif
  184. //
  185. // RangeStart RangeLength
  186. // | | RangeInIoSpace
  187. // | | | RangeVisible
  188. // +-----+-----+ | | | RangeShareable
  189. // | | | | | | RangePassive
  190. // v v v v v v v
  191. VIDEO_ACCESS_RANGE S3AccessRanges[] = {
  192. {0x000C0000, 0x00000000, 0x00008000, 0, 0, 0, 0}, // 0 ROM location
  193. {0x000A0000, 0x00000000, 0x00010000, 0, 0, 1, 0}, // 1 Frame buf
  194. {0x000003C0, 0x00000000, 0x00000010, 1, 1, 1, 0}, // 2 Various VGA regs
  195. {0x000003D4, 0x00000000, 0x00000008, 1, 1, 1, 0}, // 3 System Control Registers
  196. {0x000042E8, 0x00000000, 0x00000002, 1, 1, 0, 0}, // 4 SubSys-Stat/Cntl
  197. {0x00004AE8, 0x00000000, 0x00000002, 1, 1, 0, 0}, // 5 AdvFunc-Cntl
  198. {0x000082E8, 0x00000000, 0x00000004, 1, 1, 0, 0}, // 6 Cur-Y
  199. {0x000086E8, 0x00000000, 0x00000004, 1, 1, 0, 0}, // 7 Cur-X
  200. {0x00008AE8, 0x00000000, 0x00000004, 1, 1, 0, 0}, // 8 DestY-AxStp
  201. {0x00008EE8, 0x00000000, 0x00000004, 1, 1, 0, 0}, // 9 DestX-SiaStp
  202. {0x000092E8, 0x00000000, 0x00000004, 1, 1, 0, 0}, // 10 Err-Term
  203. {0x000096E8, 0x00000000, 0x00000004, 1, 1, 0, 0}, // 11 Maj-Axis-Pcnt(Rec-Width)
  204. {0x00009AE8, 0x00000000, 0x00000004, 1, 1, 0, 0}, // 12 Gp-Stat/Cmd
  205. {0x00009EE8, 0x00000000, 0x00000004, 1, 1, 0, 0}, // 13 Short-Stroke
  206. {0x0000A2E8, 0x00000000, 0x00000004, 1, 1, 0, 0}, // 14 Bkgd-Color
  207. {0x0000A6E8, 0x00000000, 0x00000004, 1, 1, 0, 0}, // 15 Frgd-Color
  208. {0x0000AAE8, 0x00000000, 0x00000004, 1, 1, 0, 0}, // 16 Wrt_Mask
  209. {0x0000AEE8, 0x00000000, 0x00000004, 1, 1, 0, 0}, // 17 Rd-Mask
  210. {0x0000B6E8, 0x00000000, 0x00000004, 1, 1, 0, 0}, // 18 Bkgd-Mix
  211. {0x0000BAE8, 0x00000000, 0x00000004, 1, 1, 0, 0}, // 19 Frgd-Mix
  212. {0x0000BEE8, 0x00000000, 0x00000004, 1, 1, 0, 0}, // 20 Mulitfucn_Cntl
  213. {0x0000E2E8, 0x00000000, 0x00000004, 1, 1, 0, 0}, // 21 Pix-Trans
  214. //
  215. // All S3 boards decode more ports than are documented. If we
  216. // don't reserve these extra ports, the PCI arbitrator may grant
  217. // one to a PCI device, and thus clobber the S3.
  218. //
  219. // The aliased ports seem to be any ports where bit 15 is set;
  220. // for these, the state of bit 14 is effectively ignored.
  221. //
  222. {0x0000C2E8, 0x00000000, 0x00000004, 1, 1, 0, 1}, // 22 Alt Cur-Y
  223. {0x0000C6E8, 0x00000000, 0x00000004, 1, 1, 0, 1}, // 23 Alt Cur-X
  224. {0x0000CAE8, 0x00000000, 0x00000004, 1, 1, 0, 1}, // 24 Alt DestY-AxStp
  225. {0x0000CEE8, 0x00000000, 0x00000004, 1, 1, 0, 1}, // 25 Alt DestX-SiaStp
  226. {0x0000D2E8, 0x00000000, 0x00000004, 1, 1, 0, 1}, // 26 Alt Err-Term
  227. {0x0000D6E8, 0x00000000, 0x00000004, 1, 1, 0, 1}, // 27 Alt Maj-Axis-Pcnt(Rec-Width)
  228. {0x0000DAE8, 0x00000000, 0x00000004, 1, 1, 0, 1}, // 28 Alt Gp-Stat/Cmd
  229. {0x0000DEE8, 0x00000000, 0x00000004, 1, 1, 0, 1}, // 29 Alt Short-Stroke
  230. {0x0000E6E8, 0x00000000, 0x00000004, 1, 1, 0, 1}, // 30 Alt Frgd-Color
  231. {0x0000EAE8, 0x00000000, 0x00000004, 1, 1, 0, 1}, // 31 Alt Wrt_Mask
  232. {0x0000EEE8, 0x00000000, 0x00000004, 1, 1, 0, 1}, // 32 Alt Rd-Mask
  233. {0x0000F6E8, 0x00000000, 0x00000004, 1, 1, 0, 1}, // 33 Alt Bkgd-Mix
  234. {0x0000FAE8, 0x00000000, 0x00000004, 1, 1, 0, 1}, // 34 Alt Frgd-Mix
  235. {0x0000FEE8, 0x00000000, 0x00000004, 1, 1, 0, 1}, // 35 Alt Mulitfucn_Cntl
  236. //
  237. // This is an extra entry to store the location of the linear
  238. // frame buffer and IO ports.
  239. //
  240. {0x00000000, 0x00000000, 0x00000000, 0, 0, 0, 0}, // 36 Linear range
  241. {0x00000000, 0x00000000, 0x00000000, 0, 0, 0, 0} // 37 ROM
  242. };
  243. /*****************************************************************************
  244. * Memory Size Table
  245. ****************************************************************************/
  246. //
  247. // Table for computing the display's amount of memory.
  248. //
  249. ULONG gacjMemorySize[] = { 0x400000, // 0 = 4mb
  250. 0x100000, // 1 = default
  251. 0x300000, // 2 = 3mb
  252. 0x800000, // 3 = 8mb
  253. 0x200000, // 4 = 2mb
  254. 0x600000, // 5 = 6mb
  255. 0x100000, // 6 = 1mb
  256. 0x080000 }; // 7 = 0.5mb
  257. /*****************************************************************************
  258. * 864 Memory Timing Table(s)
  259. ****************************************************************************/
  260. //
  261. // M parameter values, used in Set864MemoryTiming()
  262. //
  263. // access to this table is controlled by constants in Set864MemoryTiming()
  264. // if you change the table make sure you change the constants
  265. //
  266. UCHAR MParameterTable[] = {
  267. // 8 bit color 16 bit color
  268. // 60Hz 72Hz 60Hz 72Hz
  269. 0xd8, 0xa8, 0x58, 0x38, // 640 x 480, 1 Mb frame buffer
  270. 0x78, 0x58, 0x20, 0x08, // 800 x 600, 1 Mb frame buffer
  271. 0x38, 0x28, 0x00, 0x00, // 1024 x 768, 1 Mb frame buffer
  272. 0xf8, 0xf8, 0xf8, 0xe0, // 640 x 480, 2 Mb or greater frame buffer
  273. 0xf8, 0xf8, 0xa8, 0x68, // 800 x 600, 2 Mb or greater frame buffer
  274. 0xd8, 0xa0, 0x40, 0x20 // 1024 x 768, 2 Mb or greater frame buffer
  275. };
  276. /*****************************************************************************
  277. * SDAC data
  278. ****************************************************************************/
  279. SDAC_PLL_PARMS SdacTable[SDAC_TABLE_SIZE] = {
  280. { 0x00, 0x00 }, // 00 VGA 0 ( !programmable )
  281. { 0x00, 0x00 }, // 01 VGA 1 ( !programmable )
  282. { 0x41, 0x61 }, // 02
  283. { 0x00, 0x00 }, // 03
  284. { 0x44, 0x43 }, // 04
  285. { 0x7f, 0x44 }, // 05
  286. { 0x00, 0x00 }, // 06
  287. { 0x00, 0x00 }, // 07
  288. { 0x00, 0x00 }, // 08
  289. { 0x00, 0x00 }, // 09
  290. { 0x00, 0x00 }, // 0a
  291. { 0x56, 0x63 }, // 0b
  292. { 0x00, 0x00 }, // 0c
  293. { 0x6b, 0x44 }, // 0d
  294. { 0x41, 0x41 }, // 0e
  295. { 0x00, 0x00 }, // 0f
  296. };
  297. //
  298. // With nnlck.c code
  299. //
  300. // Index register frequency ranges for ICD2061A chip
  301. //
  302. long vclk_range[16] = {
  303. 0, // should be MIN_VCO_FREQUENCY, but that causes problems.
  304. 51000000,
  305. 53200000,
  306. 58500000,
  307. 60700000,
  308. 64400000,
  309. 66800000,
  310. 73500000,
  311. 75600000,
  312. 80900000,
  313. 83200000,
  314. 91500000,
  315. 100000000,
  316. 120000000,
  317. 285000000,
  318. 0,
  319. };
  320. //
  321. // Mode tables for architectures where int10 may fail
  322. //
  323. /*****************************************************************************
  324. * S3 - 911 Enhanced mode init.
  325. ****************************************************************************/
  326. USHORT S3_911_Enhanced_Mode[] = {
  327. SELECTACCESSRANGE + VARIOUSVGA,
  328. OB, // Make the screen dark
  329. 0x3c6, 0x00,
  330. OW, // Turn off the screen
  331. 0x3c4, 0x2101,
  332. METAOUT+VBLANK, // Wait for the 911 to settle down.
  333. METAOUT+VBLANK,
  334. OW, // Async Reset
  335. 0x3c4, 0x0100,
  336. OWM, // Sequencer Registers
  337. 0x3c4,
  338. 4,
  339. 0x2101, 0x0F02, 0x0003, 0x0e04,
  340. METAOUT+SETCRTC, // Program the CRTC regs
  341. SELECTACCESSRANGE + SYSTEMCONTROL,
  342. IB, // Prepare to prgram the ACT
  343. 0x3da,
  344. SELECTACCESSRANGE + VARIOUSVGA,
  345. METAOUT+ATCOUT, // Program the ATC
  346. 0x3c0,
  347. 21, 0,
  348. 0x00, 0x01, 0x02, 0x03, 0x04,
  349. 0x05, 0x06, 0x07, 0x08, 0x09,
  350. 0x0a, 0x0b, 0x0c, 0x0d, 0x0e,
  351. 0x0f, 0x41, 0x00, 0x0f, 0x00,
  352. 0x00,
  353. OW, // Start the sequencer
  354. 0x3c4, 0x300,
  355. OWM, // Program the GDC
  356. 0x3ce,
  357. 9,
  358. 0x0000, 0x0001, 0x0002, 0x0003, 0x0004,
  359. 0x0005, 0x0506, 0x0f07, 0xff08,
  360. SELECTACCESSRANGE + SYSTEMCONTROL,
  361. IB, // Set ATC FF to index
  362. 0x3da,
  363. SELECTACCESSRANGE + VARIOUSVGA,
  364. OB, // Enable the palette
  365. 0x3c0, 0x20,
  366. SELECTACCESSRANGE + SYSTEMCONTROL,
  367. OW, // Unlock S3 SC regs
  368. 0x3d4, 0xa039,
  369. OB, // Enable 8514/a reg access
  370. 0x3d4, 0x40,
  371. METAOUT+MASKOUT,
  372. 0x3d5, 0xfe, 0x01,
  373. OB, // Turn off H/W Graphics Cursor
  374. 0x3d4, 0x45,
  375. METAOUT+MASKOUT,
  376. 0x3d5, 0xfe, 0x0,
  377. OW, // Set the graphic cursor fg color
  378. 0x3d4, 0xff0e,
  379. OW, // Set the graphic cursor bg color
  380. 0x3d4, 0x000f,
  381. OW, // Unlock the S3 specific regs
  382. 0x3d4, 0x4838,
  383. OB, // Set the Misc 1 reg
  384. 0x3d4, 0x3a,
  385. METAOUT+MASKOUT,
  386. 0x3d5, 0xe2, 0x15,
  387. OB, // Disable 2K X 1K X 4 plane
  388. 0x3d4, 0x31,
  389. METAOUT+MASKOUT,
  390. 0x3d5, 0xe4, 0x08,
  391. OB, // Disable multiple pages
  392. 0x3d4, 0x32,
  393. METAOUT+MASKOUT,
  394. 0x3d5, 0xbf, 0x0,
  395. OW, // Lock S3 specific regs
  396. 0x3d4, 0x0038,
  397. SELECTACCESSRANGE + ADVANCEDFUNCTIONCONTROL,
  398. OW, // Set either 800X600 or 1024X768
  399. 0x4ae8, 0x07, // hi-res mode.
  400. SELECTACCESSRANGE + VARIOUSVGA,
  401. OB, // Set Misc out reg for external clock
  402. 0x3c2, 0x2f,
  403. SELECTACCESSRANGE + SYSTEMCONTROL,
  404. OW, // Unlock the SC regs
  405. 0x3d4, 0xa039,
  406. METAOUT+SETCLK, // Set the clock for 65 Mhz
  407. METAOUT+VBLANK, // Wait for the clock to settle down
  408. METAOUT+VBLANK, // S3 product alert Synchronization &
  409. METAOUT+VBLANK, // Clock Skew.
  410. METAOUT+VBLANK,
  411. METAOUT+VBLANK,
  412. METAOUT+VBLANK,
  413. OW, // Lock the SC regs
  414. 0x3d4, 0x0039,
  415. SELECTACCESSRANGE + VARIOUSVGA,
  416. OB, // Turn on the screen - in the sequencer
  417. 0x3c4, 0x01,
  418. METAOUT+MASKOUT,
  419. 0x3c5, 0xdf, 0x0,
  420. METAOUT+VBLANK, // Wait the monitor to settle down
  421. METAOUT+VBLANK,
  422. OW, // Enable all the planes through the DAC
  423. 0x3c6, 0xff,
  424. EOD
  425. };
  426. /*****************************************************************************
  427. * S3 - 801 Enhanced mode init.
  428. ****************************************************************************/
  429. USHORT S3_801_Enhanced_Mode[] = {
  430. SELECTACCESSRANGE + VARIOUSVGA,
  431. OB, // Make the screen dark
  432. 0x3c6, 0x00,
  433. OW, // Turn off the screen
  434. 0x3c4, 0x2101,
  435. METAOUT+VBLANK, // Wait for the 911 to settle down.
  436. METAOUT+VBLANK,
  437. OW, // Async Reset
  438. 0x3c4, 0x0100,
  439. OWM, // Sequencer Registers
  440. 0x3c4,
  441. 4,
  442. 0x2101, 0x0F02, 0x0003, 0x0e04,
  443. METAOUT+SETCRTC, // Program the CRTC regs
  444. SELECTACCESSRANGE + SYSTEMCONTROL,
  445. OWM,
  446. 0x3d4,
  447. 17,
  448. 0xA039, 0x0e42, 0x403c, 0x8931, 0x153a,
  449. 0x0050, 0x4854, 0x2f60, 0x8161, 0x0062,
  450. 0x0058, 0x0033, 0x0043, 0x8013, 0x0051,
  451. 0x005c, 0x1034,
  452. OW,
  453. 0x3d4, 0x0a5a, // Set the low byte of the LAW
  454. OW,
  455. 0x3d4, 0x0059, // Set the high byte of the LAW
  456. OW, // Lock S3 specific regs
  457. 0x3d4, 0x0038,
  458. OW, // Lock more S3 specific regs
  459. 0x3d4, 0x0039,
  460. IB, // Prepare to prgram the ACT
  461. 0x3da,
  462. SELECTACCESSRANGE + VARIOUSVGA,
  463. METAOUT+ATCOUT, // Program the ATC
  464. 0x3c0,
  465. 21, 0,
  466. 0x00, 0x01, 0x02, 0x03, 0x04,
  467. 0x05, 0x06, 0x07, 0x08, 0x09,
  468. 0x0a, 0x0b, 0x0c, 0x0d, 0x0e,
  469. 0x0f, 0x41, 0x00, 0x0f, 0x00,
  470. 0x00,
  471. OW, // Start the sequencer
  472. 0x3c4, 0x300,
  473. OWM, // Program the GDC
  474. 0x3ce,
  475. 9,
  476. 0x0000, 0x0001, 0x0002, 0x0003, 0x0004,
  477. 0x0005, 0x0506, 0x0f07, 0xff08,
  478. SELECTACCESSRANGE + SYSTEMCONTROL,
  479. IB, // Set ATC FF to index
  480. 0x3da,
  481. SELECTACCESSRANGE + VARIOUSVGA,
  482. OB, // Enable the palette
  483. 0x3c0, 0x20,
  484. SELECTACCESSRANGE + SYSTEMCONTROL,
  485. OW, // Unlock S3 SC regs
  486. 0x3d4, 0xa039,
  487. OB, // Enable 8514/a reg access
  488. 0x3d4, 0x40,
  489. METAOUT+MASKOUT,
  490. 0x3d5, 0xfe, 0x01,
  491. OB, // Turn off H/W Graphics Cursor
  492. 0x3d4, 0x45,
  493. METAOUT+MASKOUT,
  494. 0x3d5, 0xfe, 0x0,
  495. OW, // Set the graphic cursor fg color
  496. 0x3d4, 0xff0e,
  497. OW, // Set the graphic cursor bg color
  498. 0x3d4, 0x000f,
  499. OW, // Unlock the S3 specific regs
  500. 0x3d4, 0x4838,
  501. OB, // Set the Misc 1 reg
  502. 0x3d4, 0x3a,
  503. METAOUT+MASKOUT,
  504. 0x3d5, 0xe2, 0x15,
  505. OB, // Disable 2K X 1K X 4 plane
  506. 0x3d4, 0x31,
  507. METAOUT+MASKOUT,
  508. 0x3d5, 0xe4, 0x08,
  509. OB, // Disable multiple pages
  510. 0x3d4, 0x32,
  511. METAOUT+MASKOUT,
  512. 0x3d5, 0xbf, 0x0,
  513. OW, // Lock S3 specific regs
  514. 0x3d4, 0x0038,
  515. SELECTACCESSRANGE + ADVANCEDFUNCTIONCONTROL,
  516. OW, // Set either 800X600 or 1024X768
  517. 0x4ae8, 0x07, // hi-res mode.
  518. SELECTACCESSRANGE + VARIOUSVGA,
  519. OB, // Set Misc out reg for external clock
  520. 0x3c2, 0xef,
  521. SELECTACCESSRANGE + SYSTEMCONTROL,
  522. OW, // Unlock the SC regs
  523. 0x3d4, 0xa039,
  524. METAOUT+SETCLK, // Set the clock for 65 Mhz
  525. METAOUT+VBLANK, // Wait for the clock to settle down
  526. METAOUT+VBLANK, // S3 product alert Synchronization &
  527. METAOUT+VBLANK, // Clock Skew.
  528. METAOUT+VBLANK,
  529. METAOUT+VBLANK,
  530. METAOUT+VBLANK,
  531. OW, // Lock the SC regs
  532. 0x3d4, 0x0039,
  533. SELECTACCESSRANGE + VARIOUSVGA,
  534. OB, // Turn on the screen - in the sequencer
  535. 0x3c4, 0x01,
  536. METAOUT+MASKOUT,
  537. 0x3c5, 0xdf, 0x0,
  538. METAOUT+VBLANK, // Wait the monitor to settle down
  539. METAOUT+VBLANK,
  540. OW, // Enable all the planes through the DAC
  541. 0x3c6, 0xff,
  542. EOD
  543. };
  544. /*****************************************************************************
  545. * S3 - 928 1024 X 768, 800 X 600, & 640 X 480 Enhanced mode init.
  546. ****************************************************************************/
  547. USHORT S3_928_Enhanced_Mode[] = {
  548. SELECTACCESSRANGE + VARIOUSVGA,
  549. OB, // Make the screen dark
  550. 0x3c6, 0x00,
  551. OW, // Async Reset
  552. 0x3c4, 0x0100,
  553. //
  554. // Wait for vertical sync to make sure that bit 3 of SR1
  555. // is not changed to a different value during an active video
  556. // period as suggested by S3 errata sheet.
  557. //
  558. METAOUT+VBLANK,
  559. OWM, // Sequencer Registers
  560. 0x3c4, 5,
  561. 0x0300, 0x0101, 0x0F02, 0x0003, 0x0e04,
  562. METAOUT+INDXOUT, // Program the GDC
  563. 0x3ce,
  564. 9, 0,
  565. 0x00, 0x00, 0x00, 0x00, 0x00,
  566. 0x00, 0x05, 0x0f, 0xff,
  567. SELECTACCESSRANGE + SYSTEMCONTROL,
  568. OW, // Unlock the S3 specific regs
  569. 0x3d4, 0x4838,
  570. OW, // Unlock the more S3 specific regs
  571. 0x3d4, 0xA039,
  572. METAOUT+SETCRTC, // Program the CRTC regs
  573. //
  574. // The Homestake errata sheet says that CR42 should be 0x00 when
  575. // it is enabled as a clock select source by writing 11 to bits
  576. // 3:2 of the Miscellaneous Output Register at 0x3c2; this has
  577. // been changed to set CR42 to 0x00, the write to 0x3c2 is near
  578. // the end of the command stream after which CR42 gets its final
  579. // value with a METAOUT+SETCLK operation.
  580. //
  581. OW, // make sure that CR42 is 0 before it
  582. 0X3D4, 0x0042, // is enabled as a clock select source
  583. OW, // memory configuration reg
  584. 0X3D4, 0x8D31,
  585. OW, // extended system control reg
  586. 0X3D4, 0x0050,
  587. OW, // backward compatibility 2 reg
  588. 0X3D4, 0x2033,
  589. OB, // extended mode reg
  590. 0x3D4, 0x43,
  591. METAOUT+MASKOUT,
  592. 0x3D5, 0x10, 0x00,
  593. OW, // extended system control reg 2
  594. 0X3D4, 0x4051,
  595. OW, // general output port
  596. 0X3D4, 0x025c,
  597. OW,
  598. 0x3d4, 0x0a5a, // Set the low byte of the LAW
  599. OW,
  600. 0x3d4, 0x0059, // Set the high byte of the LAW
  601. IB, // Prepare to prgram the ACT
  602. 0x3da,
  603. SELECTACCESSRANGE + VARIOUSVGA,
  604. METAOUT+ATCOUT, // Program the ATC
  605. 0x3c0,
  606. 21, 0,
  607. 0x00, 0x01, 0x02, 0x03, 0x04,
  608. 0x05, 0x06, 0x07, 0x08, 0x09,
  609. 0x0a, 0x0b, 0x0c, 0x0d, 0x0e,
  610. 0x0f, 0x41, 0x00, 0x0f, 0x00,
  611. 0x00,
  612. SELECTACCESSRANGE + SYSTEMCONTROL,
  613. IB, // Set ATC FF to index
  614. 0x3da,
  615. SELECTACCESSRANGE + VARIOUSVGA,
  616. //
  617. // Wait for vertical sync to make sure that the display
  618. // is not reactivated in the middle of a line/frame as suggested
  619. // by the S3 errata sheet; not doing this causes the screen to
  620. // flash momentarily.
  621. //
  622. METAOUT+VBLANK,
  623. OB, // Enable the palette
  624. 0x3c0, 0x20,
  625. SELECTACCESSRANGE + SYSTEMCONTROL,
  626. OW, // Enable 8514/a reg access
  627. 0x3d4, 0x0140,
  628. OB, // Turn off H/W Graphics Cursor
  629. 0x3d4, 0x45,
  630. METAOUT+MASKOUT,
  631. 0x3d5, 0xfe, 0x0,
  632. OW, // Set the graphic cursor fg color
  633. 0x3d4, 0xff0e,
  634. OW, // Set the graphic cursor bg color
  635. 0x3d4, 0x000f,
  636. OB, // Set the Misc 1 reg
  637. 0x3d4, 0x3a,
  638. METAOUT+MASKOUT,
  639. 0x3d5, 0x62, 0x15,
  640. OB, // Disable 2K X 1K X 4 plane
  641. 0x3d4, 0x31,
  642. METAOUT+MASKOUT,
  643. 0x3d5, 0xe4, 0x08,
  644. OB, // Disable multiple pages
  645. 0x3d4, 0x32,
  646. METAOUT+MASKOUT,
  647. 0x3d5, 0xbf, 0x0,
  648. SELECTACCESSRANGE + ADVANCEDFUNCTIONCONTROL,
  649. OW, // Set either 800X600 or 1024X768
  650. 0x4ae8, 0x07, // hi-res mode.
  651. SELECTACCESSRANGE + VARIOUSVGA,
  652. OB, // Set Misc out reg for external clock
  653. 0x3c2, 0xef,
  654. METAOUT+SETCLK, // Set the clock
  655. METAOUT+DELAY, // Wait for the clock to settle down
  656. 0x400, // S3 product alert Synchronization &
  657. // Clock Skew.
  658. METAOUT+VBLANK,
  659. METAOUT+VBLANK,
  660. METAOUT+MASKOUT,
  661. 0x3c5, 0xdf, 0x0,
  662. METAOUT+DELAY, // Wait for about 1 millisecond
  663. 0x400, // for the monitor to settle down
  664. OW, // Enable all the planes through the DAC
  665. 0x3c6, 0xff,
  666. SELECTACCESSRANGE + SYSTEMCONTROL,
  667. OW, // Lock S3 specific regs
  668. 0x3d4, 0x0038,
  669. OW, // Lock more S3 specific regs
  670. 0x3d4, 0x0039,
  671. EOD
  672. };
  673. /*****************************************************************************
  674. * S3 - 928 1280 X 1024 Enhanced mode init.
  675. ****************************************************************************/
  676. USHORT S3_928_1280_Enhanced_Mode[] = {
  677. SELECTACCESSRANGE + VARIOUSVGA,
  678. OB, // Make the screen dark
  679. 0x3c6, 0x00,
  680. OW, // Async Reset
  681. 0x3c4, 0x0100,
  682. OWM, // Sequencer Registers
  683. 0x3c4,
  684. 5,
  685. 0x0300, 0x0101, 0x0F02, 0x0003, 0x0e04,
  686. METAOUT+INDXOUT, // Program the GDC
  687. 0x3ce,
  688. 9, 0,
  689. 0x00, 0x00, 0x00, 0x00, 0x00,
  690. 0x00, 0x05, 0x0f, 0xff,
  691. SELECTACCESSRANGE + SYSTEMCONTROL,
  692. OW, // Unlock the S3 specific regs
  693. 0x3d4, 0x4838,
  694. OW, // Unlock the more S3 specific regs
  695. 0x3d4, 0xA039,
  696. METAOUT+SETCRTC, // Program the CRTC regs
  697. // Set the Bt 485 DAC.
  698. OW, // hardware graphics cursor mode reg
  699. 0X3D4, 0x2045,
  700. OW, // Enable access to Bt 485 CmdReg3
  701. 0x3D4, 0x2955, // disable the DAC
  702. SELECTACCESSRANGE + VARIOUSVGA,
  703. OB,
  704. 0x3C6, 0x80, // Bt 485 - CR0
  705. METAOUT+DELAY,
  706. 0x400,
  707. SELECTACCESSRANGE + SYSTEMCONTROL,
  708. OW, // S3 extended video DAC control reg
  709. 0x3D4, 0x2A55,
  710. SELECTACCESSRANGE + VARIOUSVGA,
  711. OB,
  712. 0x3C8, 0x40, // Bt 485 - CR1
  713. METAOUT+DELAY,
  714. 0x400,
  715. OB,
  716. 0x3C9, 0x30, // Bt 485 - CR2
  717. METAOUT+DELAY,
  718. 0x400,
  719. SELECTACCESSRANGE + SYSTEMCONTROL,
  720. OW, // S3 extened video DAC control reg
  721. 0x3D4, 0x2855,
  722. SELECTACCESSRANGE + VARIOUSVGA,
  723. OB, // Bt 485
  724. 0x3c8, 0x01,
  725. METAOUT+DELAY,
  726. 0x400,
  727. SELECTACCESSRANGE + SYSTEMCONTROL,
  728. OW, // S3 extened video DAC control reg
  729. 0x3D4, 0x2A55,
  730. SELECTACCESSRANGE + VARIOUSVGA,
  731. OB, // Bt 485 - CR3
  732. 0x3c6, 0x08,
  733. METAOUT+DELAY,
  734. 0x400,
  735. SELECTACCESSRANGE + SYSTEMCONTROL,
  736. OW, // Reset the palette index
  737. 0x3d4, 0x2855,
  738. OW, // Set mode control
  739. 0X3D4, 0x0242, // dot clock select
  740. METAOUT+DELAY,
  741. 0x400,
  742. OW, // memory configuration
  743. 0X3D4, 0x8f31,
  744. OW,
  745. 0X3D4, 0x153a,
  746. OW, // extended system control reg
  747. 0X3D4, 0x0050,
  748. OW, // backward compatibility reg
  749. 0X3D4, 0x2033,
  750. OB, // extended mode reg
  751. 0x3D4, 0x43,
  752. METAOUT+MASKOUT,
  753. 0x3D5, 0x10, 0x00,
  754. OW, // extended system control reg 2
  755. 0X3D4, 0x5051,
  756. OW,
  757. 0X3D4, 0x025c, // flash bits, 20 packed mode.
  758. OW,
  759. 0x3d4, 0x0a5a, // Set the low byte of the LAW
  760. OW,
  761. 0x3d4, 0x0059, // Set the high byte of the LAW
  762. IB, // Prepare to prgram the ATC
  763. 0x3da,
  764. SELECTACCESSRANGE + VARIOUSVGA,
  765. METAOUT+ATCOUT, // Program the ATC
  766. 0x3c0,
  767. 21, 0,
  768. 0x00, 0x01, 0x02, 0x03, 0x04,
  769. 0x05, 0x06, 0x07, 0x08, 0x09,
  770. 0x0a, 0x0b, 0x0c, 0x0d, 0x0e,
  771. 0x0f, 0x41, 0x00, 0x0f, 0x00,
  772. 0x00,
  773. SELECTACCESSRANGE + SYSTEMCONTROL,
  774. IB, // Set ATC FF to index
  775. 0x3da,
  776. SELECTACCESSRANGE + VARIOUSVGA,
  777. OB, // Enable the palette
  778. 0x3c0, 0x20,
  779. SELECTACCESSRANGE + SYSTEMCONTROL,
  780. OW, // Enable 8514/a reg access
  781. 0x3d4, 0x0140,
  782. SELECTACCESSRANGE + ADVANCEDFUNCTIONCONTROL,
  783. OW, // Galen said set to 0
  784. 0x4ae8, 0x03, //
  785. SELECTACCESSRANGE + VARIOUSVGA,
  786. OB, // Set Misc out reg for external clock
  787. 0x3c2, 0xef,
  788. METAOUT+SETCLK, // Set the clock
  789. METAOUT+DELAY, // Wait for the clock to settle down
  790. 0x400, // S3 product alert Synchronization &
  791. // Clock Skew.
  792. METAOUT+VBLANK,
  793. METAOUT+VBLANK,
  794. METAOUT+MASKOUT,
  795. 0x3c5, 0xdf, 0x0,
  796. METAOUT+DELAY, // Wait for about 1 millisecond
  797. 0x400, // for the monitor to settle down
  798. OW, // Enable all the planes through the DAC
  799. 0x3c6, 0xff,
  800. SELECTACCESSRANGE + SYSTEMCONTROL,
  801. OW, // Lock S3 specific regs
  802. 0x3d4, 0x0038,
  803. OW, // Lock more S3 specific regs
  804. 0x3d4, 0x0039,
  805. EOD
  806. };
  807. /*****************************************************************************
  808. * S3 - 864 1024 X 768, 800 X 600, & 640 X 480 Enhanced mode init.
  809. ****************************************************************************/
  810. USHORT S3_864_Enhanced_Mode[] = {
  811. SELECTACCESSRANGE + VARIOUSVGA,
  812. OB, // Make the screen dark
  813. 0x3c6, 0x00,
  814. OW, // Async Reset
  815. 0x3c4, 0x0100,
  816. //
  817. // Wait for vertical sync to make sure that bit 3 of SR1
  818. // is not changed to a different value during an active video
  819. // period as suggested by S3 errata sheet.
  820. //
  821. METAOUT+VBLANK,
  822. OWM, // Sequencer Registers
  823. 0x3c4, 5,
  824. 0x0300, 0x0101, 0x0F02, 0x0003, 0x0e04,
  825. METAOUT+INDXOUT, // Program the GDC
  826. 0x3ce,
  827. 9, 0,
  828. 0x00, 0x00, 0x00, 0x00, 0x00,
  829. 0x00, 0x05, 0x0f, 0xff,
  830. SELECTACCESSRANGE + SYSTEMCONTROL,
  831. OW, // Unlock the S3 specific regs
  832. 0x3d4, 0x4838,
  833. OW, // Unlock the more S3 specific regs
  834. 0x3d4, 0xA039,
  835. // do this before SETCRTC because CRTC streams have to write to 0x4ae8
  836. OW, // Enable 8514/a reg access
  837. 0x3d4, 0x0140,
  838. METAOUT+SETCRTC, // Program the CRTC regs
  839. //
  840. // The Homestake errata sheet says that CR42 should be 0x00 when
  841. // it is enabled as a clock select source by writing 11 to bits
  842. // 3:2 of the Miscellaneous Output Register at 0x3c2; this has
  843. // been changed to set CR42 to 0x00, the write to 0x3c2 is near
  844. // the end of the command stream after which CR42 gets its final
  845. // value with a METAOUT+SETCLK operation.
  846. //
  847. OW, // make sure that CR42 is 0 before it
  848. 0X3D4, 0x0042, // is enabled as a clock select source
  849. OW, // memory configuration reg
  850. 0X3D4, 0x8D31,
  851. OW, // backward compatibility 2 reg
  852. 0X3D4, 0x2033,
  853. OB, // extended mode reg
  854. 0x3D4, 0x43,
  855. METAOUT+MASKOUT,
  856. 0x3D5, 0x10, 0x00,
  857. OB, // extended system control reg 2
  858. 0x3D4, 0x51, // use MASKOUT operation to prevent
  859. // wiping out the extension bits of
  860. METAOUT+MASKOUT, // CR13 (logical line width) in 16
  861. 0x3D5, 0x30, 0x00, // bit per pixel color mode
  862. OW, // general output port
  863. 0X3D4, 0x025c,
  864. OW,
  865. 0x3d4, 0x0a5a, // Set the low byte of the LAW
  866. OW,
  867. 0x3d4, 0x0059, // Set the high byte of the LAW
  868. IB, // Prepare to prgram the ACT
  869. 0x3da,
  870. SELECTACCESSRANGE + VARIOUSVGA,
  871. METAOUT+ATCOUT, // Program the ATC
  872. 0x3c0,
  873. 21, 0,
  874. 0x00, 0x01, 0x02, 0x03, 0x04,
  875. 0x05, 0x06, 0x07, 0x08, 0x09,
  876. 0x0a, 0x0b, 0x0c, 0x0d, 0x0e,
  877. 0x0f, 0x41, 0x00, 0x0f, 0x00,
  878. 0x00,
  879. SELECTACCESSRANGE + SYSTEMCONTROL,
  880. IB, // Set ATC FF to index
  881. 0x3da,
  882. SELECTACCESSRANGE + VARIOUSVGA,
  883. //
  884. // Wait for vertical sync to make sure that the display
  885. // is not reactivated in the middle of a line/frame as suggested
  886. // by the S3 errata sheet; not doing this causes the screen to
  887. // flash momentarily.
  888. //
  889. METAOUT+VBLANK,
  890. OB, // Enable the palette
  891. 0x3c0, 0x20,
  892. SELECTACCESSRANGE + SYSTEMCONTROL,
  893. OB, // Turn off H/W Graphics Cursor
  894. 0x3d4, 0x45,
  895. METAOUT+MASKOUT,
  896. 0x3d5, 0xfe, 0x0,
  897. OW, // Set the graphic cursor fg color
  898. 0x3d4, 0xff0e,
  899. OW, // Set the graphic cursor bg color
  900. 0x3d4, 0x000f,
  901. OB, // Set the Misc 1 reg
  902. 0x3d4, 0x3a,
  903. METAOUT+MASKOUT,
  904. 0x3d5, 0x62, 0x15,
  905. OB, // Disable 2K X 1K X 4 plane
  906. 0x3d4, 0x31,
  907. METAOUT+MASKOUT,
  908. 0x3d5, 0xe4, 0x08,
  909. OB, // Disable multiple pages
  910. 0x3d4, 0x32,
  911. METAOUT+MASKOUT,
  912. 0x3d5, 0xbf, 0x0,
  913. SELECTACCESSRANGE + VARIOUSVGA,
  914. OB, // Set Misc out reg for external clock
  915. 0x3c2, 0xef,
  916. METAOUT+SETCLK, // Set the clock
  917. METAOUT+DELAY, // Wait for the clock to settle down
  918. 0x400, // S3 product alert Synchronization &
  919. // Clock Skew.
  920. METAOUT+VBLANK,
  921. METAOUT+VBLANK,
  922. METAOUT+MASKOUT,
  923. 0x3c5, 0xdf, 0x0,
  924. METAOUT+DELAY, // Wait for about 1 millisecond
  925. 0x400, // for the monitor to settle down
  926. OW, // Enable all the planes through the DAC
  927. 0x3c6, 0xff,
  928. SELECTACCESSRANGE + SYSTEMCONTROL,
  929. OW, // Lock S3 specific regs
  930. 0x3d4, 0x0038,
  931. OW, // Lock more S3 specific regs
  932. 0x3d4, 0x0039,
  933. EOD
  934. };
  935. /*****************************************************************************
  936. * S3 - 864 1280 X 1024 Enhanced mode init.
  937. ****************************************************************************/
  938. USHORT S3_864_1280_Enhanced_Mode[] = {
  939. SELECTACCESSRANGE + VARIOUSVGA,
  940. OB, // Make the screen dark
  941. 0x3c6, 0x00,
  942. OW, // Async Reset
  943. 0x3c4, 0x0100,
  944. OWM, // Sequencer Registers
  945. 0x3c4,
  946. 5,
  947. 0x0300, 0x0101, 0x0F02, 0x0003, 0x0e04,
  948. METAOUT+INDXOUT, // Program the GDC
  949. 0x3ce,
  950. 9, 0,
  951. 0x00, 0x00, 0x00, 0x00, 0x00,
  952. 0x00, 0x05, 0x0f, 0xff,
  953. SELECTACCESSRANGE + SYSTEMCONTROL,
  954. OW, // Unlock the S3 specific regs
  955. 0x3d4, 0x4838,
  956. OW, // Unlock the more S3 specific regs
  957. 0x3d4, 0xA039,
  958. METAOUT+SETCRTC, // Program the CRTC regs
  959. // Set the Bt 485 DAC.
  960. OW, // hardware graphics cursor mode reg
  961. 0X3D4, 0x2045,
  962. OW, // Enable access to Bt 485 CmdReg3
  963. 0x3D4, 0x2955, // disable the DAC
  964. SELECTACCESSRANGE + VARIOUSVGA,
  965. OB,
  966. 0x3C6, 0x80, // Bt 485 - CR0
  967. METAOUT+DELAY,
  968. 0x400,
  969. SELECTACCESSRANGE + SYSTEMCONTROL,
  970. OW, // S3 extended video DAC control reg
  971. 0x3D4, 0x2A55,
  972. SELECTACCESSRANGE + VARIOUSVGA,
  973. OB,
  974. 0x3C8, 0x40, // Bt 485 - CR1
  975. METAOUT+DELAY,
  976. 0x400,
  977. OB,
  978. 0x3C9, 0x30, // Bt 485 - CR2
  979. METAOUT+DELAY,
  980. 0x400,
  981. SELECTACCESSRANGE + SYSTEMCONTROL,
  982. OW, // S3 extened video DAC control reg
  983. 0x3D4, 0x2855,
  984. SELECTACCESSRANGE + VARIOUSVGA,
  985. OB, // Bt 485
  986. 0x3c8, 0x01,
  987. METAOUT+DELAY,
  988. 0x400,
  989. SELECTACCESSRANGE + SYSTEMCONTROL,
  990. OW, // S3 extened video DAC control reg
  991. 0x3D4, 0x2A55,
  992. SELECTACCESSRANGE + VARIOUSVGA,
  993. OB, // Bt 485 - CR3
  994. 0x3c6, 0x08,
  995. METAOUT+DELAY,
  996. 0x400,
  997. SELECTACCESSRANGE + SYSTEMCONTROL,
  998. OW, // Reset the palette index
  999. 0x3d4, 0x2855,
  1000. OW, // Set mode control
  1001. 0X3D4, 0x0242, // dot clock select
  1002. METAOUT+DELAY,
  1003. 0x400,
  1004. OW, // memory configuration
  1005. 0X3D4, 0x8f31,
  1006. OW,
  1007. 0X3D4, 0x153a,
  1008. OW, // extended system control reg
  1009. 0X3D4, 0x0050,
  1010. OW, // backward compatibility reg
  1011. 0X3D4, 0x2033,
  1012. OB, // extended mode reg
  1013. 0x3D4, 0x43,
  1014. METAOUT+MASKOUT,
  1015. 0x3D5, 0x10, 0x00,
  1016. OW, // extended system control reg 2
  1017. 0X3D4, 0x5051,
  1018. OW,
  1019. 0X3D4, 0x025c, // flash bits, 20 packed mode.
  1020. OW,
  1021. 0x3d4, 0x0a5a, // Set the low byte of the LAW
  1022. OW,
  1023. 0x3d4, 0x0059, // Set the high byte of the LAW
  1024. IB, // Prepare to prgram the ATC
  1025. 0x3da,
  1026. SELECTACCESSRANGE + VARIOUSVGA,
  1027. METAOUT+ATCOUT, // Program the ATC
  1028. 0x3c0,
  1029. 21, 0,
  1030. 0x00, 0x01, 0x02, 0x03, 0x04,
  1031. 0x05, 0x06, 0x07, 0x08, 0x09,
  1032. 0x0a, 0x0b, 0x0c, 0x0d, 0x0e,
  1033. 0x0f, 0x41, 0x00, 0x0f, 0x00,
  1034. 0x00,
  1035. SELECTACCESSRANGE + SYSTEMCONTROL,
  1036. IB, // Set ATC FF to index
  1037. 0x3da,
  1038. SELECTACCESSRANGE + VARIOUSVGA,
  1039. OB, // Enable the palette
  1040. 0x3c0, 0x20,
  1041. SELECTACCESSRANGE + SYSTEMCONTROL,
  1042. OW, // Enable 8514/a reg access
  1043. 0x3d4, 0x0140,
  1044. SELECTACCESSRANGE + ADVANCEDFUNCTIONCONTROL,
  1045. OW, // Galen said set to 0
  1046. 0x4ae8, 0x03, //
  1047. SELECTACCESSRANGE + VARIOUSVGA,
  1048. OB, // Set Misc out reg for external clock
  1049. 0x3c2, 0xef,
  1050. METAOUT+SETCLK, // Set the clock
  1051. METAOUT+DELAY, // Wait for the clock to settle down
  1052. 0x400, // S3 product alert Synchronization &
  1053. // Clock Skew.
  1054. METAOUT+VBLANK,
  1055. METAOUT+VBLANK,
  1056. METAOUT+MASKOUT,
  1057. 0x3c5, 0xdf, 0x0,
  1058. METAOUT+DELAY, // Wait for about 1 millisecond
  1059. 0x400, // for the monitor to settle down
  1060. OW, // Enable all the planes through the DAC
  1061. 0x3c6, 0xff,
  1062. SELECTACCESSRANGE + SYSTEMCONTROL,
  1063. OW, // Lock S3 specific regs
  1064. 0x3d4, 0x0038,
  1065. OW, // Lock more S3 specific regs
  1066. 0x3d4, 0x0039,
  1067. EOD
  1068. };
  1069. /******************************************************************************
  1070. * 911/924 CRTC Values
  1071. *****************************************************************************/
  1072. USHORT crtc911_640x60Hz[] = {
  1073. SELECTACCESSRANGE + SYSTEMCONTROL,
  1074. OW, // Unlock the S3 specific regs
  1075. 0x3d4, 0x4838,
  1076. OW, // Data Xfer Execution Position reg
  1077. 0x3d4, 0x5a3b,
  1078. OW, // S3R4 - Backwards Compatibility 3
  1079. 0x3d4, 0x1034,
  1080. OW, // Lock S3 specific regs
  1081. 0x3d4, 0x0038,
  1082. OW, // Unprotect CRTC regs
  1083. 0x3d4, 0x0011,
  1084. METAOUT+INDXOUT, // Program the CRTC regs
  1085. 0x3d4,
  1086. 25, 0,
  1087. 0x5f, 0x4f, 0x50, 0x82, 0x54,
  1088. 0x80, 0x0b, 0x3e, 0x00, 0x40,
  1089. 0x00, 0x00, 0x00, 0x00, 0x00,
  1090. 0x00, 0xea, 0x8c, 0xdf, 0x80,
  1091. 0x60, 0xe7, 0x04, 0xab, 0xff,
  1092. EOD
  1093. };
  1094. USHORT crtc911_800x60Hz[] = {
  1095. SELECTACCESSRANGE + SYSTEMCONTROL,
  1096. OW, // Unlock the S3 specific regs
  1097. 0x3d4, 0x4838,
  1098. OW, // Data Xfer Execution Position reg
  1099. 0x3d4, 0x7a3b,
  1100. OW, // S3R4 - Backwards Compatibility 3
  1101. 0x3d4, 0x1034,
  1102. OW, // Lock S3 specific regs
  1103. 0x3d4, 0x0038,
  1104. OW, // Unprotect CRTC regs
  1105. 0x3d4, 0x0011,
  1106. METAOUT+INDXOUT, // Program the CRTC regs
  1107. 0x3d4,
  1108. 25, 0,
  1109. 0x7f, 0x63, 0x64, 0x82, 0x6a,
  1110. 0x1a, 0x74, 0xf0, 0x00, 0x60,
  1111. 0x00, 0x00, 0x00, 0x00, 0x00,
  1112. 0x00, 0x58, 0x8c, 0x57, 0x80,
  1113. 0x00, 0x57, 0x73, 0xe3, 0xff,
  1114. EOD
  1115. };
  1116. USHORT crtc911_1024x60Hz[] = {
  1117. SELECTACCESSRANGE + SYSTEMCONTROL,
  1118. OW, // Unlock the S3 specific regs
  1119. 0x3d4, 0x4838,
  1120. OW, // Data Xfer Execution Position reg
  1121. 0x3d4, 0x9f3b,
  1122. OW, // S3R4 - Backwards Compatibility 3
  1123. 0x3d4, 0x1034,
  1124. OW, // Lock S3 specific regs
  1125. 0x3d4, 0x0038,
  1126. OW, // Unprotect CRTC regs
  1127. 0x3d4, 0x0011,
  1128. METAOUT+INDXOUT, // Program the CRTC
  1129. 0x3d4,
  1130. 25, 0,
  1131. 0xa4, 0x7f, 0x80, 0x87, 0x84,
  1132. 0x95, 0x25, 0xf5, 0x00, 0x60,
  1133. 0x00, 0x00, 0x00, 0x00, 0x00,
  1134. 0x00, 0x02, 0x87, 0xff, 0x80,
  1135. 0x60, 0xff, 0x21, 0xab, 0xff,
  1136. EOD
  1137. };
  1138. USHORT crtc911_640x70Hz[] = {
  1139. SELECTACCESSRANGE + SYSTEMCONTROL,
  1140. OW, // Unlock the S3 specific regs
  1141. 0x3d4, 0x4838,
  1142. OW, // Data Xfer Execution Position reg
  1143. 0x3d4, 0x5e3b,
  1144. OW, // S3R4 - Backwards Compatibility 3
  1145. 0x3d4, 0x1034,
  1146. OW, // Lock S3 specific regs
  1147. 0x3d4, 0x0038,
  1148. OW, // Unprotect CRTC regs
  1149. 0x3d4, 0x0011,
  1150. METAOUT+INDXOUT, // Program the CRTC regs
  1151. 0x3d4,
  1152. 25, 0,
  1153. 0x63, 0x4f, 0x50, 0x86, 0x53,
  1154. 0x97, 0x07, 0x3e, 0x00, 0x40,
  1155. 0x00, 0x00, 0x00, 0x00, 0x00,
  1156. 0x00, 0xe8, 0x8b, 0xdf, 0x80,
  1157. 0x60, 0xdf, 0x07, 0xab, 0xff,
  1158. EOD
  1159. };
  1160. USHORT crtc911_800x70Hz[] = {
  1161. SELECTACCESSRANGE + SYSTEMCONTROL,
  1162. OW, // Unlock the S3 specific regs
  1163. 0x3d4, 0x4838,
  1164. OW, // Data Xfer Execution Position reg
  1165. 0x3d4, 0x783b,
  1166. OW, // S3R4 - Backwards Compatibility 3
  1167. 0x3d4, 0x1034,
  1168. OW, // Lock S3 specific regs
  1169. 0x3d4, 0x0038,
  1170. OW, // Unprotect CRTC regs
  1171. 0x3d4, 0x0011,
  1172. METAOUT+INDXOUT, // Program the CRTC regs
  1173. 0x3d4,
  1174. 25, 0,
  1175. 0x7d, 0x63, 0x64, 0x80, 0x69,
  1176. 0x1a, 0x98, 0xf0, 0x00, 0x60,
  1177. 0x00, 0x00, 0x00, 0x00, 0x00,
  1178. 0x00, 0x7c, 0xa2, 0x57, 0x80,
  1179. 0x00, 0x57, 0x98, 0xe3, 0xff,
  1180. EOD
  1181. };
  1182. USHORT crtc911_1024x70Hz[] = {
  1183. SELECTACCESSRANGE + SYSTEMCONTROL,
  1184. OW, // Unlock the S3 specific regs
  1185. 0x3d4, 0x4838,
  1186. OW, // Data Xfer Execution Position reg
  1187. 0x3d4, 0x9d3b,
  1188. OW, // S3R4 - Backwards Compatibility 3
  1189. 0x3d4, 0x1034,
  1190. OW, // Lock S3 specific regs
  1191. 0x3d4, 0x0038,
  1192. OW, // Unprotect CRTC regs
  1193. 0x3d4, 0x0011,
  1194. METAOUT+INDXOUT, // Program the CRTC regs
  1195. 0x3d4,
  1196. 25, 0,
  1197. 0xa2, 0x7f, 0x80, 0x85, 0x84,
  1198. 0x95, 0x24, 0xf5, 0x00, 0x60,
  1199. 0x00, 0x00, 0x00, 0x00, 0x00,
  1200. 0x00, 0x02, 0x88, 0xff, 0x80,
  1201. 0x60, 0xff, 0x24, 0xab, 0xff,
  1202. EOD
  1203. };
  1204. /*****************************************************************************
  1205. * 801 / 805 CRTC values
  1206. ****************************************************************************/
  1207. USHORT crtc801_640x60Hz[] = {
  1208. SELECTACCESSRANGE + SYSTEMCONTROL,
  1209. OW, // Unlock the S3 specific regs
  1210. 0x3d4, 0x4838,
  1211. OW, // Unlock the more S3 specific regs
  1212. 0x3d4, 0xA039,
  1213. OW, // Data Xfer Execution Position reg
  1214. 0x3d4, 0x5a3b,
  1215. OW, // S3R4 - Backwards Compatibility 3
  1216. 0x3d4, 0x1034,
  1217. OW, // Unprotect CRTC regs
  1218. 0x3d4, 0x0011,
  1219. METAOUT+INDXOUT, // Program the CRTC regs
  1220. 0x3d4,
  1221. 25, 0,
  1222. 0x5f, 0x4f, 0x50, 0x82, 0x54,
  1223. 0x80, 0x0b, 0x3e, 0x00, 0x40,
  1224. 0x00, 0x00, 0x00, 0x00, 0x00,
  1225. 0x00, 0xea, 0x8c, 0xdf, 0x80,
  1226. 0x60, 0xe7, 0x04, 0xab, 0xff,
  1227. OW,
  1228. 0X3D4, 0x005d,
  1229. OW,
  1230. 0X3D4, 0x005e,
  1231. EOD
  1232. };
  1233. USHORT crtc801_640x70Hz[] = {
  1234. SELECTACCESSRANGE + SYSTEMCONTROL,
  1235. OW, // Unlock the S3 specific regs
  1236. 0x3d4, 0x4838,
  1237. OW, // Unlock the more S3 specific regs
  1238. 0x3d4, 0xA039,
  1239. OW, // Data Xfer Execution Position reg
  1240. 0x3d4, 0x5e3b,
  1241. OW, // S3R4 - Backwards Compatibility 3
  1242. 0x3d4, 0x1034,
  1243. OW, // Unprotect CRTC regs
  1244. 0x3d4, 0x0011,
  1245. METAOUT+INDXOUT, // Program the CRTC regs
  1246. 0x3d4,
  1247. 25, 0,
  1248. 0x63, 0x4f, 0x50, 0x86, 0x53,
  1249. 0x97, 0x07, 0x3e, 0x00, 0x40,
  1250. 0x00, 0x00, 0x00, 0x00, 0x00,
  1251. 0x00, 0xe8, 0x8b, 0xdf, 0x80,
  1252. 0x60, 0xdf, 0x07, 0xab, 0xff,
  1253. OW,
  1254. 0X3D4, 0x005d,
  1255. OW,
  1256. 0X3D4, 0x005e,
  1257. EOD
  1258. };
  1259. USHORT crtc801_800x60Hz[] = {
  1260. SELECTACCESSRANGE + SYSTEMCONTROL,
  1261. OW, // Unlock the S3 specific regs
  1262. 0x3d4, 0x4838,
  1263. OW, // Unlock the more S3 specific regs
  1264. 0x3d4, 0xA039,
  1265. OW, // Data Xfer Execution Position reg
  1266. 0x3d4, 0x7a3b,
  1267. OW, // S3R4 - Backwards Compatibility 3
  1268. 0x3d4, 0x1034,
  1269. OW, // Unprotect CRTC regs
  1270. 0x3d4, 0x0011,
  1271. METAOUT+INDXOUT, // Program the CRTC regs
  1272. 0x3d4,
  1273. 25, 0,
  1274. 0x7f, 0x63, 0x64, 0x82,
  1275. 0x6a, 0x1a, 0x74, 0xf0,
  1276. 0x00, 0x60, 0x00, 0x00,
  1277. 0x00, 0x00, 0xff, 0x00,
  1278. 0x58, 0x8c, 0x57, 0x80,
  1279. 0x00, 0x57, 0x73, 0xe3,
  1280. 0xff,
  1281. OW,
  1282. 0X3D4, 0x005d,
  1283. OW,
  1284. 0X3D4, 0x005e,
  1285. EOD
  1286. };
  1287. USHORT crtc801_800x70Hz[] = {
  1288. SELECTACCESSRANGE + SYSTEMCONTROL,
  1289. OW, // Unlock the S3 specific regs
  1290. 0x3d4, 0x4838,
  1291. OW, // Unlock the more S3 specific regs
  1292. 0x3d4, 0xA039,
  1293. OW, // Data Xfer Execution Position reg
  1294. 0x3d4, 0x783b,
  1295. OW, // S3R4 - Backwards Compatibility 3
  1296. 0x3d4, 0x1034,
  1297. OW, // Unprotect CRTC regs
  1298. 0x3d4, 0x0011,
  1299. METAOUT+INDXOUT, // Program the CRTC regs
  1300. 0x3d4,
  1301. 25, 0,
  1302. 0x7d, 0x63, 0x64, 0x80,
  1303. 0x6c, 0x1b, 0x98, 0xf0,
  1304. 0x00, 0x60, 0x00, 0x00,
  1305. 0x00, 0x00, 0xff, 0x00,
  1306. 0x7c, 0xa2, 0x57, 0x80,
  1307. 0x00, 0x57, 0x98, 0xe3,
  1308. 0xff,
  1309. OW,
  1310. 0X3D4, 0x005d,
  1311. OW,
  1312. 0X3D4, 0x005e,
  1313. EOD
  1314. };
  1315. USHORT crtc801_1024x60Hz[] = {
  1316. SELECTACCESSRANGE + SYSTEMCONTROL,
  1317. OW, // Unlock the S3 specific regs
  1318. 0x3d4, 0x4838,
  1319. OW, // Unlock the more S3 specific regs
  1320. 0x3d4, 0xA039,
  1321. OW, // Data Xfer Execution Position reg
  1322. 0x3d4, 0x9d3b,
  1323. OW, // S3R4 - Backwards Compatibility 3
  1324. 0x3d4, 0x1034,
  1325. OW, // Unprotect CRTC regs
  1326. 0x3d4, 0x0011,
  1327. METAOUT+INDXOUT, // Program the CRTC regs
  1328. 0x3d4,
  1329. 25, 0,
  1330. 0xa3, 0x7f, 0x80, 0x86,
  1331. 0x84, 0x95, 0x25, 0xf5,
  1332. 0x00, 0x60, 0x00, 0x00,
  1333. 0x00, 0x00, 0xff, 0x00,
  1334. 0x02, 0x87, 0xff, 0x80,
  1335. 0x60, 0xff, 0x21, 0xeb,
  1336. 0xff,
  1337. OW,
  1338. 0X3D4, 0x005d,
  1339. OW,
  1340. 0X3D4, 0x005e,
  1341. EOD
  1342. };
  1343. USHORT crtc801_1024x70Hz[] = {
  1344. SELECTACCESSRANGE + SYSTEMCONTROL,
  1345. OW, // Unlock the S3 specific regs
  1346. 0x3d4, 0x4838,
  1347. OW, // Unlock the more S3 specific regs
  1348. 0x3d4, 0xA039,
  1349. OW, // Data Xfer Execution Position reg
  1350. 0x3d4, 0x9d3b,
  1351. OW, // S3R4 - Backwards Compatibility 3
  1352. 0x3d4, 0x1034,
  1353. OW, // Unprotect CRTC regs
  1354. 0x3d4, 0x0011,
  1355. METAOUT+INDXOUT, // Program the CRTC regs
  1356. 0x3d4,
  1357. 25, 0,
  1358. 0xa1, 0x7f, 0x80, 0x84,
  1359. 0x84, 0x95, 0x24, 0xf5,
  1360. 0x00, 0x60, 0x00, 0x00,
  1361. 0x00, 0x00, 0x0b, 0x00,
  1362. 0x02, 0x88, 0xff, 0x80,
  1363. 0x60, 0xff, 0x24, 0xeb,
  1364. 0xff,
  1365. OW,
  1366. 0X3D4, 0x005d,
  1367. OW,
  1368. 0X3D4, 0x005e,
  1369. EOD
  1370. };
  1371. /*****************************************************************************
  1372. * 928 CRTC values
  1373. ****************************************************************************/
  1374. USHORT crtc928_640x60Hz[] = {
  1375. SELECTACCESSRANGE + SYSTEMCONTROL,
  1376. OW, // Unlock the S3 specific regs
  1377. 0x3d4, 0x4838,
  1378. OW, // Unlock the more S3 specific regs
  1379. 0x3d4, 0xA039,
  1380. OW, // Data Xfer Execution Position reg
  1381. 0x3d4, 0x5a3b,
  1382. OW, // S3R4 - Backwards Compatibility 3
  1383. 0x3d4, 0x1034,
  1384. OW, // Unprotect CRTC regs
  1385. 0x3d4, 0x0011,
  1386. METAOUT+INDXOUT, // Program the CRTC regs
  1387. 0x3d4,
  1388. 25, 0,
  1389. 0x5f, 0x4f, 0x50, 0x82, 0x54,
  1390. 0x80, 0x0b, 0x3e, 0x00, 0x40,
  1391. 0x00, 0x00, 0x00, 0x00, 0x00,
  1392. 0x00, 0xea, 0x8c, 0xdf, 0x80,
  1393. 0x60, 0xe7, 0x04, 0xab, 0xff,
  1394. OW,
  1395. 0X3D4, 0x005d,
  1396. OW,
  1397. 0X3D4, 0x005e,
  1398. EOD
  1399. };
  1400. USHORT crtc928_640x70Hz[] = {
  1401. SELECTACCESSRANGE + SYSTEMCONTROL,
  1402. OW, // Unlock the S3 specific regs
  1403. 0x3d4, 0x4838,
  1404. OW, // Unlock the more S3 specific regs
  1405. 0x3d4, 0xA039,
  1406. OW, // Data Xfer Execution Position reg
  1407. 0x3d4, 0x5e3b,
  1408. OW, // S3R4 - Backwards Compatibility 3
  1409. 0x3d4, 0x1034,
  1410. OW, // Unprotect CRTC regs
  1411. 0x3d4, 0x0011,
  1412. METAOUT+INDXOUT, // Program the CRTC regs
  1413. 0x3d4,
  1414. 25, 0,
  1415. 0x63, 0x4f, 0x50, 0x86, 0x53,
  1416. 0x97, 0x07, 0x3e, 0x00, 0x40,
  1417. 0x00, 0x00, 0x00, 0x00, 0x00,
  1418. 0x00, 0xe8, 0x8b, 0xdf, 0x80,
  1419. 0x60, 0xdf, 0x07, 0xab, 0xff,
  1420. OW,
  1421. 0X3D4, 0x005d,
  1422. OW,
  1423. 0X3D4, 0x005e,
  1424. EOD
  1425. };
  1426. USHORT crtc928_800x60Hz[] = {
  1427. SELECTACCESSRANGE + SYSTEMCONTROL,
  1428. OW, // Unlock the S3 specific regs
  1429. 0x3d4, 0x4838,
  1430. OW, // Unlock the more S3 specific regs
  1431. 0x3d4, 0xA039,
  1432. OW, // Data Xfer Execution Position reg
  1433. 0x3d4, 0x7a3b,
  1434. OW, // S3R4 - Backwards Compatibility 3
  1435. 0x3d4, 0x1034,
  1436. OW, // Unprotect CRTC regs
  1437. 0x3d4, 0x0011,
  1438. METAOUT+INDXOUT, // Program the CRTC regs
  1439. 0x3d4,
  1440. 25, 0,
  1441. 0x7f, 0x63, 0x64, 0x82,
  1442. 0x6a, 0x1a, 0x74, 0xf0,
  1443. 0x00, 0x60, 0x00, 0x00,
  1444. 0x00, 0x00, 0xff, 0x00,
  1445. 0x58, 0x8c, 0x57, 0x80,
  1446. 0x00, 0x57, 0x73, 0xe3,
  1447. 0xff,
  1448. OW,
  1449. 0X3D4, 0x005d,
  1450. OW,
  1451. 0X3D4, 0x005e,
  1452. EOD
  1453. };
  1454. USHORT crtc928_800x70Hz[] = {
  1455. SELECTACCESSRANGE + SYSTEMCONTROL,
  1456. OW, // Unlock the S3 specific regs
  1457. 0x3d4, 0x4838,
  1458. OW, // Unlock the more S3 specific regs
  1459. 0x3d4, 0xA039,
  1460. OW, // Data Xfer Execution Position reg
  1461. 0x3d4, 0x783b,
  1462. OW, // S3R4 - Backwards Compatibility 3
  1463. 0x3d4, 0x1034,
  1464. OW, // Unprotect CRTC regs
  1465. 0x3d4, 0x0011,
  1466. METAOUT+INDXOUT, // Program the CRTC regs
  1467. 0x3d4,
  1468. 25, 0,
  1469. 0x7d, 0x63, 0x64, 0x80,
  1470. 0x6c, 0x1b, 0x98, 0xf0,
  1471. 0x00, 0x60, 0x00, 0x00,
  1472. 0x00, 0x00, 0xff, 0x00,
  1473. 0x7c, 0xa2, 0x57, 0x80,
  1474. 0x00, 0x57, 0x98, 0xe3,
  1475. 0xff,
  1476. OW,
  1477. 0X3D4, 0x005d,
  1478. OW,
  1479. 0X3D4, 0x005e,
  1480. EOD
  1481. };
  1482. /******************************************************************************
  1483. * CRTC values for S3-928 in 1024x768 @ 60Hz
  1484. *****************************************************************************/
  1485. USHORT crtc928_1024x60Hz[] = {
  1486. SELECTACCESSRANGE + SYSTEMCONTROL,
  1487. OW, // S3R4 - Backwards Compatibility 3
  1488. 0x3d4, 0x0034,
  1489. OW, // Unprotect CRTC regs
  1490. 0x3d4, 0x0011,
  1491. METAOUT+INDXOUT, // Program the CRTC regs
  1492. 0x3d4,
  1493. 25, 0,
  1494. 0xa3, 0x7f, 0x80, 0x86,
  1495. 0x84, 0x95, 0x25, 0xf5,
  1496. 0x00, 0x60, 0x00, 0x00,
  1497. 0x00, 0x00, 0xff, 0x00,
  1498. 0x02, 0x07, 0xff, 0x80,
  1499. 0x60, 0xff, 0x21, 0xeb,
  1500. 0xff,
  1501. OW, // overlfow regs
  1502. 0X3D4, 0x005d,
  1503. OW, // more overflow regs
  1504. 0X3D4, 0x005e,
  1505. EOD
  1506. };
  1507. /******************************************************************************
  1508. * CRTC values for S3-928 in 1024x768 @ 70Hz
  1509. *****************************************************************************/
  1510. USHORT crtc928_1024x70Hz[] = {
  1511. SELECTACCESSRANGE + SYSTEMCONTROL,
  1512. OW, // S3R4 - Backwards Compatibility 3
  1513. 0x3d4, 0x0034,
  1514. OW, // Unprotect CRTC regs
  1515. 0x3d4, 0x0011,
  1516. METAOUT+INDXOUT, // Program the CRTC regs
  1517. 0x3d4,
  1518. 25, 0,
  1519. 0xa1, 0x7f, 0x80, 0x84,
  1520. 0x84, 0x95, 0x24, 0xf5,
  1521. 0x00, 0x60, 0x00, 0x00,
  1522. 0x00, 0x00, 0x0b, 0x00,
  1523. 0x02, 0x88, 0xff, 0x80,
  1524. 0x60, 0xff, 0x24, 0xeb,
  1525. 0xff,
  1526. OW, // overflow regs
  1527. 0X3D4, 0x005d,
  1528. OW, // more overflow regs
  1529. 0X3D4, 0x405e,
  1530. EOD
  1531. };
  1532. /******************************************************************************
  1533. * CRTC values for S3-928 in 1280X1024 @ 60Hz
  1534. *****************************************************************************/
  1535. USHORT crtc928_1280x60Hz[] = {
  1536. SELECTACCESSRANGE + SYSTEMCONTROL,
  1537. OW, // S3R4 - Backwards Compatibility 3
  1538. 0x3d4, 0x0034,
  1539. OW, // Unprotect CRTC regs
  1540. 0x3d4, 0x0011,
  1541. METAOUT+INDXOUT, // Program the CRTC regs
  1542. 0x3d4,
  1543. 25, 0,
  1544. 0x30, 0x27, 0x29, 0x96,
  1545. 0x29, 0x8d, 0x28, 0x5a,
  1546. 0x00, 0x60, 0x00, 0x00,
  1547. 0x00, 0x00, 0xff, 0x00,
  1548. 0x05, 0x09, 0xff, 0x00, // reg 19 == 50 for packed
  1549. 0x00, 0xff, 0x29, 0xe3,
  1550. 0xff,
  1551. OW, // overflow regs
  1552. 0X3D4, 0x005d,
  1553. OW, // more overflow regs
  1554. 0X3D4, 0x515e,
  1555. EOD
  1556. };
  1557. /******************************************************************************
  1558. * CRTC values for S3-928 in 1280X1024 @ 70Hz
  1559. *****************************************************************************/
  1560. USHORT crtc928_1280x70Hz[] = {
  1561. SELECTACCESSRANGE + SYSTEMCONTROL,
  1562. OW, // S3R4 - Backwards Compatibility 3
  1563. 0x3d4, 0x0034,
  1564. OW, // Unprotect CRTC regs
  1565. 0x3d4, 0x0011,
  1566. METAOUT+INDXOUT, // Program the CRTC regs
  1567. 0x3d4,
  1568. 25, 0,
  1569. 0x2f, 0x27, 0x29, 0x95,
  1570. 0x29, 0x8d, 0x28, 0x5a,
  1571. 0x00, 0x60, 0x00, 0x00,
  1572. 0x00, 0x00, 0xff, 0x00,
  1573. 0x05, 0x09, 0xff, 0x00, // reg 19 == 50 for packed
  1574. 0x00, 0xff, 0x29, 0xe3,
  1575. 0xff,
  1576. OW, // overflow regs
  1577. 0X3D4, 0x005d,
  1578. OW, // more overflow regs
  1579. 0X3D4, 0x515e,
  1580. EOD
  1581. };
  1582. /*****************************************************************************
  1583. * 864 CRTC values
  1584. ****************************************************************************/
  1585. USHORT crtc864_640x60Hz[] = {
  1586. SELECTACCESSRANGE + ADVANCEDFUNCTIONCONTROL,
  1587. OW,
  1588. 0x4ae8, 0x05,
  1589. SELECTACCESSRANGE + SYSTEMCONTROL,
  1590. OW, // Unlock the S3 specific regs
  1591. 0x3d4, 0x4838,
  1592. OW, // Unlock the more S3 specific regs
  1593. 0x3d4, 0xA039,
  1594. OW, // Data Xfer Execution Position reg
  1595. 0x3d4, 0x5a3b,
  1596. OW, // S3R4 - Backwards Compatibility 3
  1597. 0x3d4, 0x1034,
  1598. OW, // Unprotect CRTC regs
  1599. 0x3d4, 0x0011,
  1600. METAOUT+INDXOUT, // Program the CRTC regs
  1601. 0x3d4,
  1602. 25, 0,
  1603. 0x5f, 0x4f, 0x50, 0x82, 0x54,
  1604. 0x80, 0x0b, 0x3e, 0x00, 0x40,
  1605. 0x00, 0x00, 0x00, 0x00, 0x00,
  1606. 0x00, 0xea, 0x8c, 0xdf, 0x80,
  1607. 0x60, 0xe7, 0x04, 0xab, 0xff,
  1608. OB, // Overflow bits for CR13
  1609. 0x3d4, 0x51,
  1610. METAOUT+MASKOUT,
  1611. 0x3d5, 0x0f, 0x00,
  1612. OW,
  1613. 0X3D4, 0x005d,
  1614. OW,
  1615. 0X3D4, 0x005e,
  1616. OW,
  1617. 0x3d4, 0x0050, // 8 bit pixel length
  1618. OW,
  1619. 0x3d4, 0x0067, // mode 0: 8 bit color, 1 VCLK/pixel
  1620. OW,
  1621. 0x3d4, 0x006d, // do not delay BLANK#
  1622. EOD
  1623. };
  1624. USHORT crtc864_640x70Hz[] = {
  1625. SELECTACCESSRANGE + ADVANCEDFUNCTIONCONTROL,
  1626. OW,
  1627. 0x4ae8, 0x05,
  1628. SELECTACCESSRANGE + SYSTEMCONTROL,
  1629. OW, // Unlock the S3 specific regs
  1630. 0x3d4, 0x4838,
  1631. OW, // Unlock the more S3 specific regs
  1632. 0x3d4, 0xA039,
  1633. OW, // Data Xfer Execution Position reg
  1634. 0x3d4, 0x5e3b,
  1635. OW, // S3R4 - Backwards Compatibility 3
  1636. 0x3d4, 0x1034,
  1637. OW, // Unprotect CRTC regs
  1638. 0x3d4, 0x0011,
  1639. METAOUT+INDXOUT, // Program the CRTC regs
  1640. 0x3d4,
  1641. 25, 0,
  1642. 0x63, 0x4f, 0x50, 0x86, 0x53,
  1643. 0x97, 0x07, 0x3e, 0x00, 0x40,
  1644. 0x00, 0x00, 0x00, 0x00, 0x00,
  1645. 0x00, 0xe8, 0x8b, 0xdf, 0x80,
  1646. 0x60, 0xdf, 0x07, 0xab, 0xff,
  1647. OB, // overflow bits for CR13
  1648. 0x3d4, 0x51,
  1649. METAOUT+MASKOUT,
  1650. 0x3d5, 0x0f, 0x00,
  1651. OW,
  1652. 0X3D4, 0x005d,
  1653. OW,
  1654. 0X3D4, 0x005e,
  1655. OW,
  1656. 0x3d4, 0x0050, // 8 bit pixel length
  1657. OW,
  1658. 0x3d4, 0x0067, // mode 0: 8 bit color, 1 VCLK/pixel
  1659. OW,
  1660. 0x3d4, 0x006d, // do not delay BLANK#
  1661. EOD
  1662. };
  1663. USHORT crtc864_800x60Hz[] = {
  1664. SELECTACCESSRANGE + ADVANCEDFUNCTIONCONTROL,
  1665. OW,
  1666. 0x4ae8, 0x05,
  1667. SELECTACCESSRANGE + SYSTEMCONTROL,
  1668. OW, // Unlock the S3 specific regs
  1669. 0x3d4, 0x4838,
  1670. OW, // Unlock the more S3 specific regs
  1671. 0x3d4, 0xA039,
  1672. OW, // Data Xfer Execution Position reg
  1673. 0x3d4, 0x7a3b,
  1674. OW, // S3R4 - Backwards Compatibility 3
  1675. 0x3d4, 0x1034,
  1676. OW, // Unprotect CRTC regs
  1677. 0x3d4, 0x0011,
  1678. METAOUT+INDXOUT, // Program the CRTC regs
  1679. 0x3d4,
  1680. 25, 0,
  1681. 0x7f, 0x63, 0x64, 0x82,
  1682. 0x6a, 0x1a, 0x74, 0xf0,
  1683. 0x00, 0x60, 0x00, 0x00,
  1684. 0x00, 0x00, 0xff, 0x00,
  1685. 0x58, 0x8c, 0x57, 0x80,
  1686. 0x00, 0x57, 0x73, 0xe3,
  1687. 0xff,
  1688. OB, // overflow bits for CR13
  1689. 0x3d4, 0x51,
  1690. METAOUT+MASKOUT,
  1691. 0x3d5, 0x0f, 0x00,
  1692. OW,
  1693. 0X3D4, 0x005d,
  1694. OW,
  1695. 0X3D4, 0x005e,
  1696. OW,
  1697. 0x3d4, 0x0050, // 8 bit pixel length
  1698. OW,
  1699. 0x3d4, 0x0067, // mode 0: 8 bit color, 1 VCLK/pixel
  1700. OW,
  1701. 0x3d4, 0x006d, // do not delay BLANK#
  1702. EOD
  1703. };
  1704. USHORT crtc864_800x70Hz[] = {
  1705. SELECTACCESSRANGE + ADVANCEDFUNCTIONCONTROL,
  1706. OW,
  1707. 0x4ae8, 0x05,
  1708. SELECTACCESSRANGE + SYSTEMCONTROL,
  1709. OW, // Unlock the S3 specific regs
  1710. 0x3d4, 0x4838,
  1711. OW, // Unlock the more S3 specific regs
  1712. 0x3d4, 0xA039,
  1713. OW, // Data Xfer Execution Position reg
  1714. 0x3d4, 0x783b,
  1715. OW, // S3R4 - Backwards Compatibility 3
  1716. 0x3d4, 0x1034,
  1717. OW, // Unprotect CRTC regs
  1718. 0x3d4, 0x0011,
  1719. METAOUT+INDXOUT, // Program the CRTC regs
  1720. 0x3d4,
  1721. 25, 0,
  1722. 0x7d, 0x63, 0x64, 0x80,
  1723. 0x6c, 0x1b, 0x98, 0xf0,
  1724. 0x00, 0x60, 0x00, 0x00,
  1725. 0x00, 0x00, 0xff, 0x00,
  1726. 0x7c, 0xa2, 0x57, 0x80,
  1727. 0x00, 0x57, 0x98, 0xe3,
  1728. 0xff,
  1729. OB, // overflow bits for CR13
  1730. 0x3d4, 0x51,
  1731. METAOUT+MASKOUT,
  1732. 0x3d5, 0x0f, 0x00,
  1733. OW,
  1734. 0X3D4, 0x005d,
  1735. OW,
  1736. 0X3D4, 0x005e,
  1737. OW,
  1738. 0x3d4, 0x0050, // 8 bit pixel length
  1739. OW,
  1740. 0x3d4, 0x0067, // mode 0: 8 bit color, 1 VCLK/pixel
  1741. OW,
  1742. 0x3d4, 0x006d, // do not delay BLANK#
  1743. EOD
  1744. };
  1745. /******************************************************************************
  1746. * CRTC values for S3-864 in 1024x768 @ 60Hz
  1747. *****************************************************************************/
  1748. USHORT crtc864_1024x60Hz[] = {
  1749. SELECTACCESSRANGE + ADVANCEDFUNCTIONCONTROL,
  1750. OW,
  1751. 0x4ae8, 0x05,
  1752. SELECTACCESSRANGE + SYSTEMCONTROL,
  1753. OW, // S3R4 - Backwards Compatibility 3
  1754. 0x3d4, 0x0034,
  1755. OW, // Unprotect CRTC regs
  1756. 0x3d4, 0x0011,
  1757. METAOUT+INDXOUT, // Program the CRTC regs
  1758. 0x3d4,
  1759. 25, 0,
  1760. 0xa3, 0x7f, 0x80, 0x86,
  1761. 0x84, 0x95, 0x25, 0xf5,
  1762. 0x00, 0x60, 0x00, 0x00,
  1763. 0x00, 0x00, 0xff, 0x00,
  1764. 0x02, 0x07, 0xff, 0x80,
  1765. 0x60, 0xff, 0x21, 0xeb,
  1766. 0xff,
  1767. OB, // overflow bits for CR13
  1768. 0x3d4, 0x51,
  1769. METAOUT+MASKOUT,
  1770. 0x3d5, 0x0f, 0x00,
  1771. OW, // overflow regs
  1772. 0X3D4, 0x005d,
  1773. OW, // more overflow regs
  1774. 0X3D4, 0x005e,
  1775. OW,
  1776. 0x3d4, 0x0050, // 8 bit pixel length
  1777. OW,
  1778. 0x3d4, 0x0067, // mode 0: 8 bit color, 1 VCLK/pixel
  1779. OW,
  1780. 0x3d4, 0x006d, // do not delay BLANK#
  1781. EOD
  1782. };
  1783. /******************************************************************************
  1784. * CRTC values for S3-864 in 1024x768 @ 70Hz
  1785. *****************************************************************************/
  1786. USHORT crtc864_1024x70Hz[] = {
  1787. SELECTACCESSRANGE + ADVANCEDFUNCTIONCONTROL,
  1788. OW,
  1789. 0x4ae8, 0x05,
  1790. SELECTACCESSRANGE + SYSTEMCONTROL,
  1791. OW, // S3R4 - Backwards Compatibility 3
  1792. 0x3d4, 0x0034,
  1793. OW, // Unprotect CRTC regs
  1794. 0x3d4, 0x0011,
  1795. METAOUT+INDXOUT, // Program the CRTC regs
  1796. 0x3d4,
  1797. 25, 0,
  1798. 0xa1, 0x7f, 0x80, 0x84,
  1799. 0x84, 0x95, 0x24, 0xf5,
  1800. 0x00, 0x60, 0x00, 0x00,
  1801. 0x00, 0x00, 0x0b, 0x00,
  1802. 0x02, 0x88, 0xff, 0x80,
  1803. 0x60, 0xff, 0x24, 0xeb,
  1804. 0xff,
  1805. OB, // overflow bits for CR13
  1806. 0x3d4, 0x51,
  1807. METAOUT+MASKOUT,
  1808. 0x3d5, 0x0f, 0x00,
  1809. OW, // overflow regs
  1810. 0X3D4, 0x005d,
  1811. OW, // more overflow regs
  1812. 0X3D4, 0x405e,
  1813. OW,
  1814. 0x3d4, 0x0050, // 8 bit pixel length
  1815. OW,
  1816. 0x3d4, 0x0067, // mode 0: 8 bit color, 1 VCLK/pixel
  1817. OW,
  1818. 0x3d4, 0x006d, // do not delay BLANK#
  1819. EOD
  1820. };
  1821. /******************************************************************************
  1822. * CRTC values for S3-864 in 1280X1024 @ 60Hz
  1823. *****************************************************************************/
  1824. USHORT crtc864_1280x60Hz[] = {
  1825. SELECTACCESSRANGE + ADVANCEDFUNCTIONCONTROL,
  1826. OW,
  1827. 0x4ae8, 0x05,
  1828. SELECTACCESSRANGE + SYSTEMCONTROL,
  1829. OW, // S3R4 - Backwards Compatibility 3
  1830. 0x3d4, 0x0034,
  1831. OW, // Unprotect CRTC regs
  1832. 0x3d4, 0x0011,
  1833. METAOUT+INDXOUT, // Program the CRTC regs
  1834. 0x3d4,
  1835. 25, 0,
  1836. 0x30, 0x27, 0x29, 0x96,
  1837. 0x29, 0x8d, 0x28, 0x5a,
  1838. 0x00, 0x60, 0x00, 0x00,
  1839. 0x00, 0x00, 0xff, 0x00,
  1840. 0x05, 0x09, 0xff, 0x00, // reg 19 == 50 for packed
  1841. 0x00, 0xff, 0x29, 0xe3,
  1842. 0xff,
  1843. OW, // overflow regs
  1844. 0X3D4, 0x005d,
  1845. OW, // more overflow regs
  1846. 0X3D4, 0x515e,
  1847. OW,
  1848. 0x3d4, 0x0050, // 8 bit pixel length
  1849. OW,
  1850. 0x3d4, 0x0067, // mode 0: 8 bit color, 1 VCLK/pixel
  1851. OW,
  1852. 0x3d4, 0x006d, // do not delay BLANK#
  1853. EOD
  1854. };
  1855. /******************************************************************************
  1856. * CRTC values for S3-864 in 1280X1024 @ 70Hz
  1857. *****************************************************************************/
  1858. USHORT crtc864_1280x70Hz[] = {
  1859. SELECTACCESSRANGE + ADVANCEDFUNCTIONCONTROL,
  1860. OW,
  1861. 0x4ae8, 0x05,
  1862. SELECTACCESSRANGE + SYSTEMCONTROL,
  1863. OW, // S3R4 - Backwards Compatibility 3
  1864. 0x3d4, 0x0034,
  1865. OW, // Unprotect CRTC regs
  1866. 0x3d4, 0x0011,
  1867. METAOUT+INDXOUT, // Program the CRTC regs
  1868. 0x3d4,
  1869. 25, 0,
  1870. 0x2f, 0x27, 0x29, 0x95,
  1871. 0x29, 0x8d, 0x28, 0x5a,
  1872. 0x00, 0x60, 0x00, 0x00,
  1873. 0x00, 0x00, 0xff, 0x00,
  1874. 0x05, 0x09, 0xff, 0x00, // reg 19 == 50 for packed
  1875. 0x00, 0xff, 0x29, 0xe3,
  1876. 0xff,
  1877. OW, // overflow regs
  1878. 0X3D4, 0x005d,
  1879. OW, // more overflow regs
  1880. 0X3D4, 0x515e,
  1881. OW,
  1882. 0x3d4, 0x0050, // 8 bit pixel length
  1883. OW,
  1884. 0x3d4, 0x0067, // mode 0: 8 bit color, 1 VCLK/pixel
  1885. OW,
  1886. 0x3d4, 0x006d, // do not delay BLANK#
  1887. EOD
  1888. };
  1889. /*****************************************************************************
  1890. * 864 CRTC values
  1891. ****************************************************************************/
  1892. USHORT crtc864_640x60Hz_16bpp[] = {
  1893. SELECTACCESSRANGE + ADVANCEDFUNCTIONCONTROL,
  1894. OW,
  1895. 0x4ae8, 0x01,
  1896. SELECTACCESSRANGE + SYSTEMCONTROL,
  1897. OW, // Unlock the S3 specific regs
  1898. 0x3d4, 0x4838,
  1899. OW, // Unlock the more S3 specific regs
  1900. 0x3d4, 0xA039,
  1901. OW, // Data Xfer Execution Position reg
  1902. 0x3d4, 0xbe3b,
  1903. OW, // S3R4 - Backwards Compatibility 3
  1904. 0x3d4, 0x1034,
  1905. OW, // Unprotect CRTC regs
  1906. 0x3d4, 0x0011,
  1907. METAOUT+INDXOUT, // Program the CRTC regs
  1908. 0x3d4,
  1909. 25, 0,
  1910. 0xc3, 0x9f, 0xa0, 0x04, 0xa8, // 04
  1911. 0x80, 0x0b, 0x3e, 0x00, 0x40, // 09
  1912. 0x00, 0x00, 0x00, 0x00, 0x00, // 0e
  1913. 0x00, 0xea, 0x8c, 0xdf, 0x00, // 13
  1914. 0x60, 0xe7, 0x04, 0xab, 0xff, // 18
  1915. OB, // overflow bits for CR13
  1916. 0x3d4, 0x51,
  1917. METAOUT+MASKOUT,
  1918. 0x3d5, 0x0f, 0x10,
  1919. OW,
  1920. 0X3D4, 0x005d,
  1921. OW,
  1922. 0X3D4, 0x005e,
  1923. OW,
  1924. 0x3d4, 0x1050, // 16 bit pixel length
  1925. OW,
  1926. 0x3d4, 0x5067, // mode 10: 16 bit color, 1 VCLK/pixel
  1927. OW,
  1928. 0x3d4, 0x026d, // recover pixel on right hand edge in 16 bpp mode
  1929. EOD
  1930. };
  1931. USHORT crtc864_640x70Hz_16bpp[] = {
  1932. SELECTACCESSRANGE + ADVANCEDFUNCTIONCONTROL,
  1933. OW,
  1934. 0x4ae8, 0x01,
  1935. SELECTACCESSRANGE + SYSTEMCONTROL,
  1936. OW, // Unlock the S3 specific regs
  1937. 0x3d4, 0x4838,
  1938. OW, // Unlock the more S3 specific regs
  1939. 0x3d4, 0xA039,
  1940. OW, // Data Xfer Execution Position reg
  1941. 0x3d4, 0xc03b,
  1942. OW, // S3R4 - Backwards Compatibility 3
  1943. 0x3d4, 0x1034,
  1944. OW, // Unprotect CRTC regs
  1945. 0x3d4, 0x0011,
  1946. METAOUT+INDXOUT, // Program the CRTC regs
  1947. 0x3d4,
  1948. 25, 0,
  1949. 0xc5, 0x9f, 0xa0, 0x0c, 0xa9, // 04
  1950. 0x00, 0x07, 0x3e, 0x00, 0x40, // 09
  1951. 0x00, 0x00, 0x00, 0x00, 0x00, // 0e
  1952. 0x00, 0xe8, 0x8b, 0xdf, 0x00, // 13
  1953. 0x60, 0xdf, 0x07, 0xab, 0xff, // 18
  1954. OB, // overflow bits for CR13
  1955. 0x3d4, 0x51,
  1956. METAOUT+MASKOUT,
  1957. 0x3d5, 0x0f, 0x10,
  1958. OW,
  1959. 0X3D4, 0x085d,
  1960. OW,
  1961. 0X3D4, 0x005e,
  1962. OW,
  1963. 0x3d4, 0x1050, // 16 bit pixel length
  1964. OW,
  1965. 0x3d4, 0x5067, // mode 10: 16 bit color, 1 VCLK/pixel
  1966. OW,
  1967. 0x3d4, 0x026d, // recover pixel on right hand edge in 16 bpp mode
  1968. EOD
  1969. };
  1970. USHORT crtc864_800x60Hz_16bpp[] = {
  1971. SELECTACCESSRANGE + ADVANCEDFUNCTIONCONTROL,
  1972. OW,
  1973. 0x4ae8, 0x01,
  1974. SELECTACCESSRANGE + SYSTEMCONTROL,
  1975. OW, // Unlock the S3 specific regs
  1976. 0x3d4, 0x4838,
  1977. OW, // Unlock the more S3 specific regs
  1978. 0x3d4, 0xA039,
  1979. OW, // Data Xfer Execution Position reg
  1980. 0x3d4, 0xfe3b,
  1981. OW, // S3R4 - Backwards Compatibility 3
  1982. 0x3d4, 0x1034,
  1983. OW, // Unprotect CRTC regs
  1984. 0x3d4, 0x0011,
  1985. METAOUT+INDXOUT, // Program the CRTC regs
  1986. 0x3d4,
  1987. 25, 0,
  1988. 0x03, 0xc7, 0xc8, 0x84,
  1989. 0xd4, 0x14, 0x74, 0xf0,
  1990. 0x00, 0x60, 0x00, 0x00,
  1991. 0x00, 0x00, 0xff, 0x00,
  1992. 0x58, 0x8c, 0x57, 0xc8,
  1993. 0x00, 0x57, 0x73, 0xe3,
  1994. 0xff,
  1995. OB, // overflow bits for CR13
  1996. 0x3d4, 0x51,
  1997. METAOUT+MASKOUT,
  1998. 0x3d5, 0x0f, 0x00,
  1999. OW,
  2000. 0X3D4, 0x015d,
  2001. OW,
  2002. 0X3D4, 0x005e,
  2003. OW,
  2004. 0x3d4, 0x9050, // 16 bit pixel length, 800 pixel stride
  2005. OW,
  2006. 0x3d4, 0x5067, // mode 10: 16 bit color, 1 VCLK/pixel
  2007. OW,
  2008. 0x3d4, 0x026d, // recover pixel on right hand edge in 16 bpp mode
  2009. EOD
  2010. };
  2011. USHORT crtc864_800x70Hz_16bpp[] = {
  2012. SELECTACCESSRANGE + ADVANCEDFUNCTIONCONTROL,
  2013. OW,
  2014. 0x4ae8, 0x01,
  2015. SELECTACCESSRANGE + SYSTEMCONTROL,
  2016. OW, // Unlock the S3 specific regs
  2017. 0x3d4, 0x4838,
  2018. OW, // Unlock the more S3 specific regs
  2019. 0x3d4, 0xA039,
  2020. OW, // Data Xfer Execution Position reg
  2021. 0x3d4, 0xfa3b,
  2022. OW, // S3R4 - Backwards Compatibility 3
  2023. 0x3d4, 0x1034,
  2024. OW, // Unprotect CRTC regs
  2025. 0x3d4, 0x0011,
  2026. METAOUT+INDXOUT, // Program the CRTC regs
  2027. 0x3d4,
  2028. 25, 0,
  2029. 0xff, 0xc7, 0xc8, 0x80,
  2030. 0xd8, 0x16, 0x98, 0xf0,
  2031. 0x00, 0x60, 0x00, 0x00,
  2032. 0x00, 0x00, 0xff, 0x00,
  2033. 0x7c, 0xa2, 0x57, 0xc8,
  2034. 0x00, 0x57, 0x98, 0xe3,
  2035. 0xff,
  2036. OB, // overflow bits for CR13
  2037. 0x3d4, 0x51,
  2038. METAOUT+MASKOUT,
  2039. 0x3d5, 0x0f, 0x00,
  2040. OW,
  2041. 0X3D4, 0x005d,
  2042. OW,
  2043. 0X3D4, 0x005e,
  2044. OW,
  2045. 0x3d4, 0x9050, // 16 bit pixel length, 800 pixel stride
  2046. OW,
  2047. 0x3d4, 0x5067, // mode 10: 16 bit color, 1 VCLK/pixel
  2048. OW,
  2049. 0x3d4, 0x026d, // recover pixel on right hand edge in 16 bpp mode
  2050. EOD
  2051. };
  2052. /******************************************************************************
  2053. * CRTC values for S3-864 in 1024x768 @ 60Hz
  2054. *****************************************************************************/
  2055. USHORT crtc864_1024x60Hz_16bpp[] = {
  2056. SELECTACCESSRANGE + ADVANCEDFUNCTIONCONTROL,
  2057. OW,
  2058. 0x4ae8, 0x01,
  2059. SELECTACCESSRANGE + SYSTEMCONTROL,
  2060. OW, // S3R4 - Backwards Compatibility 3
  2061. 0x3d4, 0x0034,
  2062. OW, // Unprotect CRTC regs
  2063. 0x3d4, 0x0011,
  2064. METAOUT+INDXOUT, // Program the CRTC regs
  2065. 0x3d4,
  2066. 25, 0,
  2067. 0x4b, 0xff, 0x00, 0x8c,
  2068. 0x08, 0x8a, 0x25, 0xf5,
  2069. 0x00, 0x60, 0x00, 0x00,
  2070. 0x00, 0x00, 0xff, 0x00,
  2071. 0x02, 0x0f, 0xff, 0x00,
  2072. 0x60, 0xff, 0x21, 0xeb,
  2073. 0xff,
  2074. OB, // overflow bits for CR13
  2075. 0x3d4, 0x51,
  2076. METAOUT+MASKOUT,
  2077. 0x3d5, 0x0f, 0x10,
  2078. OW, // overflow regs
  2079. 0X3D4, 0x355d,
  2080. OW, // more overflow regs
  2081. 0X3D4, 0x005e,
  2082. OW,
  2083. 0x3d4, 0x1050, // 16 bit pixel length
  2084. OW,
  2085. 0x3d4, 0x5067, // mode 10: 16 bit color, 1 VCLK/pixel
  2086. OW,
  2087. 0x3d4, 0x026d, // recover pixel on right hand edge in 16 bpp mode
  2088. EOD
  2089. };
  2090. /******************************************************************************
  2091. * CRTC values for S3-864 in 1024x768 @ 70Hz
  2092. *****************************************************************************/
  2093. USHORT crtc864_1024x70Hz_16bpp[] = {
  2094. SELECTACCESSRANGE + ADVANCEDFUNCTIONCONTROL,
  2095. OW,
  2096. 0x4ae8, 0x01,
  2097. SELECTACCESSRANGE + SYSTEMCONTROL,
  2098. OW, // S3R4 - Backwards Compatibility 3
  2099. 0x3d4, 0x0034,
  2100. OW, // Unprotect CRTC regs
  2101. 0x3d4, 0x0011,
  2102. METAOUT+INDXOUT, // Program the CRTC regs
  2103. 0x3d4,
  2104. 25, 0,
  2105. 0x47, 0xff, 0x00, 0x88,
  2106. 0x08, 0x8a, 0x24, 0xf5,
  2107. 0x00, 0x60, 0x00, 0x00,
  2108. 0x00, 0x00, 0x0b, 0x00,
  2109. 0x02, 0x88, 0xff, 0x00,
  2110. 0x60, 0xff, 0x24, 0xeb,
  2111. 0xff,
  2112. OB, // overflow bits for CR13
  2113. 0x3d4, 0x51,
  2114. METAOUT+MASKOUT,
  2115. 0x3d5, 0x0f, 0x10,
  2116. OW, // overflow regs
  2117. 0X3D4, 0x355d,
  2118. OW, // more overflow regs
  2119. 0X3D4, 0x405e,
  2120. OW,
  2121. 0x3d4, 0x1050, // 16 bit pixel length
  2122. OW,
  2123. 0x3d4, 0x5067, // mode 10: 16 bit color, 1 VCLK/pixel
  2124. OW,
  2125. 0x3d4, 0x026d, // recover pixel on right hand edge in 16 bpp mode
  2126. EOD
  2127. };
  2128. /******************************************************************************
  2129. * CRTC values for S3-864 in 1280X1024 @ 60Hz
  2130. *****************************************************************************/
  2131. USHORT crtc864_1280x60Hz_16bpp[] = {
  2132. SELECTACCESSRANGE + ADVANCEDFUNCTIONCONTROL,
  2133. OW,
  2134. 0x4ae8, 0x01,
  2135. SELECTACCESSRANGE + SYSTEMCONTROL,
  2136. OW, // S3R4 - Backwards Compatibility 3
  2137. 0x3d4, 0x0034,
  2138. OW, // Unprotect CRTC regs
  2139. 0x3d4, 0x0011,
  2140. METAOUT+INDXOUT, // Program the CRTC regs
  2141. 0x3d4,
  2142. 25, 0,
  2143. 0x30, 0x27, 0x29, 0x96,
  2144. 0x29, 0x8d, 0x28, 0x5a,
  2145. 0x00, 0x60, 0x00, 0x00,
  2146. 0x00, 0x00, 0xff, 0x00,
  2147. 0x05, 0x09, 0xff, 0x00, // reg 19 == 50 for packed
  2148. 0x00, 0xff, 0x29, 0xe3,
  2149. 0xff,
  2150. OW, // overflow regs
  2151. 0X3D4, 0x005d,
  2152. OW, // more overflow regs
  2153. 0X3D4, 0x515e,
  2154. OW,
  2155. 0x3d4, 0x1050, // 16 bit pixel length
  2156. OW,
  2157. 0x3d4, 0x5067, // mode 10: 16 bit color, 1 VCLK/pixel
  2158. OW,
  2159. 0x3d4, 0x026d, // recover pixel on right hand edge in 16 bpp mode
  2160. EOD
  2161. };
  2162. /******************************************************************************
  2163. * CRTC values for S3-864 in 1280X1024 @ 70Hz
  2164. *****************************************************************************/
  2165. USHORT crtc864_1280x70Hz_16bpp[] = {
  2166. SELECTACCESSRANGE + ADVANCEDFUNCTIONCONTROL,
  2167. OW,
  2168. 0x4ae8, 0x01,
  2169. SELECTACCESSRANGE + SYSTEMCONTROL,
  2170. OW, // S3R4 - Backwards Compatibility 3
  2171. 0x3d4, 0x0034,
  2172. OW, // Unprotect CRTC regs
  2173. 0x3d4, 0x0011,
  2174. METAOUT+INDXOUT, // Program the CRTC regs
  2175. 0x3d4,
  2176. 25, 0,
  2177. 0x2f, 0x27, 0x29, 0x95,
  2178. 0x29, 0x8d, 0x28, 0x5a,
  2179. 0x00, 0x60, 0x00, 0x00,
  2180. 0x00, 0x00, 0xff, 0x00,
  2181. 0x05, 0x09, 0xff, 0x00, // reg 19 == 50 for packed
  2182. 0x00, 0xff, 0x29, 0xe3,
  2183. 0xff,
  2184. OW, // overflow regs
  2185. 0X3D4, 0x005d,
  2186. OW, // more overflow regs
  2187. 0X3D4, 0x515e,
  2188. OW,
  2189. 0x3d4, 0x1050, // 16 bit pixel length
  2190. OW,
  2191. 0x3d4, 0x5067, // mode 10: 16 bit color, 1 VCLK/pixel
  2192. OW,
  2193. 0x3d4, 0x026d, // recover pixel on right hand edge in 16 bpp mode
  2194. EOD
  2195. };
  2196. ///////////////////////////////////////////////////////////////////////////
  2197. // Video mode table - Lists the information about each individual mode.
  2198. //
  2199. // Note that any new modes should be added here and to the appropriate
  2200. // S3_VIDEO_FREQUENCIES tables.
  2201. //
  2202. S3_VIDEO_MODES S3Modes[] = {
  2203. { // 640x480x8bpp
  2204. 0x0101, // 'Contiguous' Int 10 mode number (for high-colour)
  2205. 0x0201, // 'Noncontiguous' Int 10 mode number
  2206. 1024, // 'Contiguous' screen stride (it's '1024' here merely
  2207. // because we don't do 640x480 in contiguous mode)
  2208. {
  2209. sizeof(VIDEO_MODE_INFORMATION), // Size of the mode informtion structure
  2210. 0, // Mode index used in setting the mode
  2211. // (filled in later)
  2212. 640, // X Resolution, in pixels
  2213. 480, // Y Resolution, in pixels
  2214. 1024, // 'Noncontiguous' screen stride,
  2215. // in bytes (distance between the
  2216. // start point of two consecutive
  2217. // scan lines, in bytes)
  2218. 1, // Number of video memory planes
  2219. 8, // Number of bits per plane
  2220. 1, // Screen Frequency, in Hertz ('1'
  2221. // means use hardware default)
  2222. 320, // Horizontal size of screen in millimeters
  2223. 240, // Vertical size of screen in millimeters
  2224. 6, // Number Red pixels in DAC
  2225. 6, // Number Green pixels in DAC
  2226. 6, // Number Blue pixels in DAC
  2227. 0x00000000, // Mask for Red Pixels in non-palette modes
  2228. 0x00000000, // Mask for Green Pixels in non-palette modes
  2229. 0x00000000, // Mask for Blue Pixels in non-palette modes
  2230. VIDEO_MODE_COLOR | VIDEO_MODE_GRAPHICS | VIDEO_MODE_PALETTE_DRIVEN |
  2231. VIDEO_MODE_MANAGED_PALETTE, // Mode description flags.
  2232. 0, // Video Memory Bitmap Width (filled
  2233. // in later)
  2234. 0, // Video Memory Bitmap Height (filled
  2235. // in later)
  2236. 0 // DriverSpecificAttributeFlags (filled
  2237. // in later)
  2238. },
  2239. },
  2240. { // 800x600x8bpp
  2241. 0x0103,
  2242. 0x0203,
  2243. 800,
  2244. {
  2245. sizeof(VIDEO_MODE_INFORMATION),
  2246. 0,
  2247. 800,
  2248. 600,
  2249. 1024,
  2250. 1,
  2251. 8,
  2252. 1,
  2253. 320,
  2254. 240,
  2255. 6,
  2256. 6,
  2257. 6,
  2258. 0x00000000,
  2259. 0x00000000,
  2260. 0x00000000,
  2261. VIDEO_MODE_COLOR | VIDEO_MODE_GRAPHICS | VIDEO_MODE_PALETTE_DRIVEN |
  2262. VIDEO_MODE_MANAGED_PALETTE,
  2263. }
  2264. },
  2265. { // 1024x768x8bpp
  2266. 0x0105,
  2267. 0x0205, // 868 doesn't support 0x205 any more...
  2268. 1024,
  2269. {
  2270. sizeof(VIDEO_MODE_INFORMATION),
  2271. 0,
  2272. 1024,
  2273. 768,
  2274. 1024,
  2275. 1,
  2276. 8,
  2277. 1,
  2278. 320,
  2279. 240,
  2280. 6,
  2281. 6,
  2282. 6,
  2283. 0x00000000,
  2284. 0x00000000,
  2285. 0x00000000,
  2286. VIDEO_MODE_COLOR | VIDEO_MODE_GRAPHICS | VIDEO_MODE_PALETTE_DRIVEN |
  2287. VIDEO_MODE_MANAGED_PALETTE,
  2288. }
  2289. },
  2290. { // 1152x864x8bpp
  2291. 0x0207,
  2292. 0x0207,
  2293. 1152,
  2294. {
  2295. sizeof(VIDEO_MODE_INFORMATION),
  2296. 0,
  2297. 1152,
  2298. 864,
  2299. 1152,
  2300. 1,
  2301. 8,
  2302. 1,
  2303. 320,
  2304. 240,
  2305. 6,
  2306. 6,
  2307. 6,
  2308. 0x00000000,
  2309. 0x00000000,
  2310. 0x00000000,
  2311. VIDEO_MODE_COLOR | VIDEO_MODE_GRAPHICS | VIDEO_MODE_PALETTE_DRIVEN |
  2312. VIDEO_MODE_MANAGED_PALETTE,
  2313. }
  2314. },
  2315. { // 1280x1024x8bpp
  2316. 0x0107,
  2317. 0x0107,
  2318. 1280,
  2319. {
  2320. sizeof(VIDEO_MODE_INFORMATION),
  2321. 0,
  2322. 1280,
  2323. 1024,
  2324. 1280,
  2325. 1,
  2326. 8,
  2327. 1,
  2328. 320,
  2329. 240,
  2330. 6,
  2331. 6,
  2332. 6,
  2333. 0x00000000,
  2334. 0x00000000,
  2335. 0x00000000,
  2336. VIDEO_MODE_COLOR | VIDEO_MODE_GRAPHICS | VIDEO_MODE_PALETTE_DRIVEN |
  2337. VIDEO_MODE_MANAGED_PALETTE,
  2338. }
  2339. },
  2340. { // 1600x1200x8bpp
  2341. 0x0120,
  2342. 0x0120,
  2343. 1600,
  2344. {
  2345. sizeof(VIDEO_MODE_INFORMATION),
  2346. 0,
  2347. 1600,
  2348. 1200,
  2349. 1600,
  2350. 1,
  2351. 8,
  2352. 1,
  2353. 320,
  2354. 240,
  2355. 6,
  2356. 6,
  2357. 6,
  2358. 0x00000000,
  2359. 0x00000000,
  2360. 0x00000000,
  2361. VIDEO_MODE_COLOR | VIDEO_MODE_GRAPHICS | VIDEO_MODE_PALETTE_DRIVEN |
  2362. VIDEO_MODE_MANAGED_PALETTE,
  2363. }
  2364. },
  2365. { // 640x480x16bpp
  2366. 0x0111,
  2367. 0x0211,
  2368. 1280,
  2369. {
  2370. sizeof(VIDEO_MODE_INFORMATION),
  2371. 0,
  2372. 640,
  2373. 480,
  2374. 2048,
  2375. 1,
  2376. 16,
  2377. 1,
  2378. 320,
  2379. 240,
  2380. 8,
  2381. 8,
  2382. 8,
  2383. 0x0000f800, // RGB 5:6:5
  2384. 0x000007e0,
  2385. 0x0000001f,
  2386. VIDEO_MODE_COLOR | VIDEO_MODE_GRAPHICS,
  2387. }
  2388. },
  2389. { // 800x600x16bpp
  2390. 0x0114,
  2391. 0x0214,
  2392. 1600,
  2393. {
  2394. sizeof(VIDEO_MODE_INFORMATION),
  2395. 0,
  2396. 800,
  2397. 600,
  2398. 1600,
  2399. 1,
  2400. 16,
  2401. 1,
  2402. 320,
  2403. 240,
  2404. 8,
  2405. 8,
  2406. 8,
  2407. 0x0000f800, // RGB 5:6:5
  2408. 0x000007e0,
  2409. 0x0000001f,
  2410. VIDEO_MODE_COLOR | VIDEO_MODE_GRAPHICS,
  2411. }
  2412. },
  2413. { // 1024x768x16bpp
  2414. 0x0117,
  2415. 0x0117,
  2416. 2048,
  2417. {
  2418. sizeof(VIDEO_MODE_INFORMATION),
  2419. 0,
  2420. 1024,
  2421. 768,
  2422. 2048,
  2423. 1,
  2424. 16,
  2425. 1,
  2426. 320,
  2427. 240,
  2428. 8,
  2429. 8,
  2430. 8,
  2431. 0x0000f800, // RGB 5:6:5
  2432. 0x000007e0,
  2433. 0x0000001f,
  2434. VIDEO_MODE_COLOR | VIDEO_MODE_GRAPHICS,
  2435. }
  2436. },
  2437. { // 1152x864x16bpp
  2438. 0x020A, // Diamond int 10
  2439. 0x020A,
  2440. 2304,
  2441. {
  2442. sizeof(VIDEO_MODE_INFORMATION),
  2443. 0,
  2444. 1152,
  2445. 864,
  2446. 2304,
  2447. 1,
  2448. 16,
  2449. 1,
  2450. 320,
  2451. 240,
  2452. 8,
  2453. 8,
  2454. 8,
  2455. 0x0000f800, // RGB 5:6:5
  2456. 0x000007e0,
  2457. 0x0000001f,
  2458. VIDEO_MODE_COLOR | VIDEO_MODE_GRAPHICS,
  2459. }
  2460. },
  2461. { // 1280x1024x16bpp
  2462. 0x011A,
  2463. 0x021A,
  2464. 2560,
  2465. {
  2466. sizeof(VIDEO_MODE_INFORMATION),
  2467. 0,
  2468. 1280,
  2469. 1024,
  2470. 4096,
  2471. 1,
  2472. 16,
  2473. 1,
  2474. 320,
  2475. 240,
  2476. 8,
  2477. 8,
  2478. 8,
  2479. 0x0000f800, // RGB 5:6:5
  2480. 0x000007e0,
  2481. 0x0000001f,
  2482. VIDEO_MODE_COLOR | VIDEO_MODE_GRAPHICS,
  2483. }
  2484. },
  2485. { // 1600x1200x16bpp
  2486. 0x0122,
  2487. 0x0122,
  2488. 3200,
  2489. {
  2490. sizeof(VIDEO_MODE_INFORMATION),
  2491. 0,
  2492. 1600,
  2493. 1200,
  2494. 3200,
  2495. 1,
  2496. 16,
  2497. 1,
  2498. 320,
  2499. 240,
  2500. 8,
  2501. 8,
  2502. 8,
  2503. 0x0000f800, // RGB 5:6:5
  2504. 0x000007e0,
  2505. 0x0000001f,
  2506. VIDEO_MODE_COLOR | VIDEO_MODE_GRAPHICS,
  2507. }
  2508. },
  2509. { // 640x480x15bpp
  2510. 0x0111,
  2511. 0x0211,
  2512. 1280,
  2513. {
  2514. sizeof(VIDEO_MODE_INFORMATION),
  2515. 0,
  2516. 640,
  2517. 480,
  2518. 2048,
  2519. 1,
  2520. 15,
  2521. 1,
  2522. 320,
  2523. 240,
  2524. 8,
  2525. 8,
  2526. 8,
  2527. 0x00007c00, // RGB 5:5:5
  2528. 0x000003e0,
  2529. 0x0000001f,
  2530. VIDEO_MODE_COLOR | VIDEO_MODE_GRAPHICS,
  2531. }
  2532. },
  2533. { // 800x600x15bpp
  2534. 0x0114,
  2535. 0x0214,
  2536. 1600,
  2537. {
  2538. sizeof(VIDEO_MODE_INFORMATION),
  2539. 0,
  2540. 800,
  2541. 600,
  2542. 2048,
  2543. 1,
  2544. 15,
  2545. 1,
  2546. 320,
  2547. 240,
  2548. 8,
  2549. 8,
  2550. 8,
  2551. 0x00007c00, // RGB 5:5:5
  2552. 0x000003e0,
  2553. 0x0000001f,
  2554. VIDEO_MODE_COLOR | VIDEO_MODE_GRAPHICS,
  2555. }
  2556. },
  2557. { // 1024x768x15bpp
  2558. 0x0117,
  2559. 0x0117,
  2560. 2048,
  2561. {
  2562. sizeof(VIDEO_MODE_INFORMATION),
  2563. 0,
  2564. 1024,
  2565. 768,
  2566. 2048,
  2567. 1,
  2568. 15,
  2569. 1,
  2570. 320,
  2571. 240,
  2572. 8,
  2573. 8,
  2574. 8,
  2575. 0x00007c00, // RGB 5:5:5
  2576. 0x000003e0,
  2577. 0x0000001f,
  2578. VIDEO_MODE_COLOR | VIDEO_MODE_GRAPHICS,
  2579. }
  2580. },
  2581. { // 1280x1024x15bpp
  2582. 0x011A,
  2583. 0x021A,
  2584. 2560,
  2585. {
  2586. sizeof(VIDEO_MODE_INFORMATION),
  2587. 0,
  2588. 1280,
  2589. 1024,
  2590. 4096,
  2591. 1,
  2592. 15,
  2593. 1,
  2594. 320,
  2595. 240,
  2596. 8,
  2597. 8,
  2598. 8,
  2599. 0x00007c00, // RGB 5:5:5
  2600. 0x000003e0,
  2601. 0x0000001f,
  2602. VIDEO_MODE_COLOR | VIDEO_MODE_GRAPHICS,
  2603. }
  2604. },
  2605. { // 1600x1200x15bpp
  2606. 0x0121,
  2607. 0x0121,
  2608. 3200,
  2609. {
  2610. sizeof(VIDEO_MODE_INFORMATION),
  2611. 0,
  2612. 1600,
  2613. 1200,
  2614. 3200,
  2615. 1,
  2616. 15,
  2617. 1,
  2618. 320,
  2619. 240,
  2620. 8,
  2621. 8,
  2622. 8,
  2623. 0x00007c00, // RGB 5:5:5
  2624. 0x000003e0,
  2625. 0x0000001f,
  2626. VIDEO_MODE_COLOR | VIDEO_MODE_GRAPHICS,
  2627. }
  2628. },
  2629. { // 1280x1024x24bpp
  2630. 0x011B, // Diamond && NumberNine int 10 1280 x 1024
  2631. 0x011B,
  2632. 3840, // 1280 * 3 bytes
  2633. {
  2634. sizeof(VIDEO_MODE_INFORMATION),
  2635. 0,
  2636. 1280, // x pixres
  2637. 1024, // y pixres
  2638. 3840, // bytestride
  2639. 1, // # vidmem planes
  2640. 24, // bits per plane
  2641. 1, // default screen freq.
  2642. 320, // x mm sz
  2643. 240, // y mm sz
  2644. 8, // Red DAC pixels
  2645. 8, // Grn DAC pixels
  2646. 8, // Blu DAC pixels
  2647. 0x00ff0000, // RGB 8:8:8
  2648. 0x0000ff00,
  2649. 0x000000ff,
  2650. VIDEO_MODE_COLOR | VIDEO_MODE_GRAPHICS,
  2651. }
  2652. },
  2653. { // 640x480x32bpp
  2654. 0x0112,
  2655. 0x0220,
  2656. 2560,
  2657. {
  2658. sizeof(VIDEO_MODE_INFORMATION),
  2659. 0,
  2660. 640,
  2661. 480,
  2662. 4096,
  2663. 1,
  2664. 32,
  2665. 1,
  2666. 320,
  2667. 240,
  2668. 8,
  2669. 8,
  2670. 8,
  2671. 0x00ff0000, // RGB 8:8:8
  2672. 0x0000ff00,
  2673. 0x000000ff,
  2674. VIDEO_MODE_COLOR | VIDEO_MODE_GRAPHICS,
  2675. }
  2676. },
  2677. { // 800x600x32bpp
  2678. 0x0115,
  2679. 0x0221,
  2680. 3200,
  2681. {
  2682. sizeof(VIDEO_MODE_INFORMATION),
  2683. 0,
  2684. 800,
  2685. 600,
  2686. 4096,
  2687. 1,
  2688. 32,
  2689. 1,
  2690. 320,
  2691. 240,
  2692. 8,
  2693. 8,
  2694. 8,
  2695. 0x00ff0000, // RGB 8:8:8
  2696. 0x0000ff00,
  2697. 0x000000ff,
  2698. VIDEO_MODE_COLOR | VIDEO_MODE_GRAPHICS,
  2699. }
  2700. },
  2701. { // 1024x768x32bpp
  2702. 0x0118,
  2703. 0x0222,
  2704. 4096,
  2705. {
  2706. sizeof(VIDEO_MODE_INFORMATION),
  2707. 0,
  2708. 1024,
  2709. 768,
  2710. 4096,
  2711. 1,
  2712. 32,
  2713. 1,
  2714. 320,
  2715. 240,
  2716. 8,
  2717. 8,
  2718. 8,
  2719. 0x00ff0000, // RGB 8:8:8
  2720. 0x0000ff00,
  2721. 0x000000ff,
  2722. VIDEO_MODE_COLOR | VIDEO_MODE_GRAPHICS,
  2723. }
  2724. },
  2725. { // 1152x864x32bpp
  2726. 0x020B, // Diamond int 10
  2727. 0x020B,
  2728. 4608,
  2729. {
  2730. sizeof(VIDEO_MODE_INFORMATION),
  2731. 0,
  2732. 1152,
  2733. 864,
  2734. 4608,
  2735. 1,
  2736. 32,
  2737. 1,
  2738. 320,
  2739. 240,
  2740. 8,
  2741. 8,
  2742. 8,
  2743. 0x00ff0000, // RGB 8:8:8
  2744. 0x0000ff00,
  2745. 0x000000ff,
  2746. VIDEO_MODE_COLOR | VIDEO_MODE_GRAPHICS,
  2747. }
  2748. },
  2749. { // 1280x1024x32bpp
  2750. 0x011B,
  2751. 0x011B,
  2752. 5120,
  2753. {
  2754. sizeof(VIDEO_MODE_INFORMATION),
  2755. 0,
  2756. 1280,
  2757. 1024,
  2758. 5120,
  2759. 1,
  2760. 32,
  2761. 1,
  2762. 320,
  2763. 240,
  2764. 8,
  2765. 8,
  2766. 8,
  2767. 0x00ff0000, // RGB 8:8:8
  2768. 0x0000ff00,
  2769. 0x000000ff,
  2770. VIDEO_MODE_COLOR | VIDEO_MODE_GRAPHICS,
  2771. }
  2772. },
  2773. { // 1600x1200x32bpp
  2774. 0x0123,
  2775. 0x0123,
  2776. 6400,
  2777. {
  2778. sizeof(VIDEO_MODE_INFORMATION),
  2779. 0,
  2780. 1600,
  2781. 1200,
  2782. 6400,
  2783. 1,
  2784. 32,
  2785. 1,
  2786. 320,
  2787. 240,
  2788. 8,
  2789. 8,
  2790. 8,
  2791. 0x00ff0000, // RGB 8:8:8
  2792. 0x0000ff00,
  2793. 0x000000ff,
  2794. VIDEO_MODE_COLOR | VIDEO_MODE_GRAPHICS,
  2795. }
  2796. },
  2797. };
  2798. ULONG NumS3VideoModes = sizeof(S3Modes) / sizeof(S3_VIDEO_MODES);
  2799. /*****************************************************************************
  2800. * Generic S3 mode set bits table
  2801. *
  2802. * Uses the hardware refresh setting for all the listed modes.
  2803. *
  2804. * Note that any new modes should be added here and to the S3_VIDEO_MODES
  2805. * table.
  2806. *
  2807. ****************************************************************************/
  2808. S3_VIDEO_FREQUENCIES GenericFrequencyTable[] = {
  2809. { 8, 640, 1, 0x00, 0x00, 0x00, 0x00 },
  2810. { 8, 800, 1, 0x00, 0x00, 0x00, 0x00 },
  2811. { 8, 1024, 1, 0x00, 0x00, 0x00, 0x00 },
  2812. { 8, 1280, 1, 0x00, 0x00, 0x00, 0x00 },
  2813. { 8, 1600, 1, 0x00, 0x00, 0x00, 0x00 },
  2814. { 15, 640, 1, 0x00, 0x00, 0x00, 0x00 },
  2815. { 15, 800, 1, 0x00, 0x00, 0x00, 0x00 },
  2816. { 15, 1024, 1, 0x00, 0x00, 0x00, 0x00 },
  2817. { 15, 1280, 1, 0x00, 0x00, 0x00, 0x00 },
  2818. { 15, 1600, 1, 0x00, 0x00, 0x00, 0x00 },
  2819. { 16, 640, 1, 0x00, 0x00, 0x00, 0x00 },
  2820. { 16, 800, 1, 0x00, 0x00, 0x00, 0x00 },
  2821. { 16, 1024, 1, 0x00, 0x00, 0x00, 0x00 },
  2822. { 16, 1280, 1, 0x00, 0x00, 0x00, 0x00 },
  2823. { 16, 1600, 1, 0x00, 0x00, 0x00, 0x00 },
  2824. { 32, 640, 1, 0x00, 0x00, 0x00, 0x00 },
  2825. { 32, 800, 1, 0x00, 0x00, 0x00, 0x00 },
  2826. { 32, 1024, 1, 0x00, 0x00, 0x00, 0x00 },
  2827. { 32, 1280, 1, 0x00, 0x00, 0x00, 0x00 },
  2828. { 32, 1600, 1, 0x00, 0x00, 0x00, 0x00 },
  2829. { 0 } // Mark the end
  2830. };
  2831. /*****************************************************************************
  2832. * Generic S3 using old 864/964 standard -- Uses register 0x52
  2833. *
  2834. * S3 came out with a new frequency standard for the 864/964 products,
  2835. * and a bunch of BIOSes were made according to this standard.
  2836. * Unfortunately, S3 later changed their minds and revised it again...
  2837. *
  2838. ****************************************************************************/
  2839. S3_VIDEO_FREQUENCIES Generic64OldFrequencyTable[] = {
  2840. { 8, 640, 60, 0x00, 0xff, 0x00, 0x00 }, // 640x480x8x60 is the default
  2841. { 8, 640, 72, 0x01, 0xff, 0x00, 0x00 },
  2842. { 8, 640, 75, 0x02, 0xff, 0x00, 0x00 },
  2843. { 8, 640, 1, 0x00, 0x00, 0x00, 0x00 },
  2844. { 8, 800, 56, 0x00, 0xff, 0x00, 0x00 },
  2845. { 8, 800, 60, 0x01, 0xff, 0x00, 0x00 },
  2846. { 8, 800, 72, 0x02, 0xff, 0x00, 0x00 },
  2847. { 8, 800, 75, 0x03, 0xff, 0x00, 0x00 },
  2848. { 8, 800, 1, 0x00, 0x00, 0x00, 0x00 },
  2849. { 8, 1024, 60, 0x02, 0xff, 0x00, 0x00 },
  2850. { 8, 1024, 70, 0x03, 0xff, 0x00, 0x00 },
  2851. { 8, 1024, 75, 0x04, 0xff, 0x00, 0x00 },
  2852. { 8, 1024, 1, 0x00, 0x00, 0x00, 0x00 },
  2853. { 8, 1152, 60, 0x00, 0xff, 0x00, 0x00 },
  2854. { 8, 1152, 1, 0x00, 0x00, 0x00, 0x00 },
  2855. { 8, 1280, 60, 0x04, 0xff, 0x00, 0x00 },
  2856. { 8, 1280, 72, 0x05, 0xff, 0x00, 0x00 },
  2857. { 8, 1280, 75, 0x06, 0xff, 0x00, 0x00 },
  2858. { 8, 1280, 1, 0x00, 0x00, 0x00, 0x00 },
  2859. { 8, 1600, 60, 0x00, 0xff, 0x00, 0x00 },
  2860. { 8, 1600, 1, 0x00, 0x00, 0x00, 0x00 },
  2861. { 16, 640, 60, 0x00, 0xff, 0x00, 0x00 },
  2862. { 16, 640, 72, 0x01, 0xff, 0x00, 0x00 },
  2863. { 16, 640, 75, 0x02, 0xff, 0x00, 0x00 },
  2864. { 16, 640, 1, 0x00, 0x00, 0x00, 0x00 },
  2865. { 16, 800, 56, 0x00, 0xff, 0x00, 0x00 },
  2866. { 16, 800, 60, 0x01, 0xff, 0x00, 0x00 },
  2867. { 16, 800, 72, 0x02, 0xff, 0x00, 0x00 },
  2868. { 16, 800, 75, 0x03, 0xff, 0x00, 0x00 },
  2869. { 16, 800, 1, 0x00, 0x00, 0x00, 0x00 },
  2870. { 16, 1024, 60, 0x02, 0xff, 0x00, 0x00 },
  2871. { 16, 1024, 70, 0x03, 0xff, 0x00, 0x00 },
  2872. { 16, 1024, 75, 0x04, 0xff, 0x00, 0x00 },
  2873. { 16, 1024, 1, 0x00, 0x00, 0x00, 0x00 },
  2874. { 16, 1280, 60, 0x04, 0xff, 0x00, 0x00 },
  2875. { 16, 1280, 72, 0x05, 0xff, 0x00, 0x00 },
  2876. { 16, 1280, 75, 0x06, 0xff, 0x00, 0x00 },
  2877. { 16, 1280, 1, 0x00, 0x00, 0x00, 0x00 },
  2878. { 16, 1600, 60, 0x00, 0xff, 0x00, 0x00 },
  2879. { 16, 1600, 1, 0x00, 0x00, 0x00, 0x00 },
  2880. { 32, 640, 60, 0x00, 0xff, 0x00, 0x00 },
  2881. { 32, 640, 72, 0x01, 0xff, 0x00, 0x00 },
  2882. { 32, 640, 75, 0x02, 0xff, 0x00, 0x00 },
  2883. { 32, 640, 1, 0x00, 0x00, 0x00, 0x00 },
  2884. { 32, 800, 56, 0x00, 0xff, 0x00, 0x00 },
  2885. { 32, 800, 60, 0x01, 0xff, 0x00, 0x00 },
  2886. { 32, 800, 72, 0x02, 0xff, 0x00, 0x00 },
  2887. { 32, 800, 75, 0x03, 0xff, 0x00, 0x00 },
  2888. { 32, 800, 1, 0x00, 0x00, 0x00, 0x00 },
  2889. { 32, 1024, 60, 0x02, 0xff, 0x00, 0x00 },
  2890. { 32, 1024, 70, 0x03, 0xff, 0x00, 0x00 },
  2891. { 32, 1024, 75, 0x04, 0xff, 0x00, 0x00 },
  2892. { 32, 1024, 1, 0x00, 0x00, 0x00, 0x00 },
  2893. { 32, 1280, 60, 0x04, 0xff, 0x00, 0x00 },
  2894. { 32, 1280, 72, 0x05, 0xff, 0x00, 0x00 },
  2895. { 32, 1280, 75, 0x06, 0xff, 0x00, 0x00 },
  2896. { 32, 1280, 1, 0x00, 0x00, 0x00, 0x00 },
  2897. { 32, 1600, 60, 0x00, 0xff, 0x00, 0x00 },
  2898. { 32, 1600, 1, 0x00, 0x00, 0x00, 0x00 },
  2899. { 0 } // Mark the end
  2900. };
  2901. /*****************************************************************************
  2902. * Generic S3 using old 864/964 standard -- Uses registers 0x52 and 0x5B
  2903. *
  2904. * This is the 'new revised' S3 standard for Vision products.
  2905. *
  2906. ****************************************************************************/
  2907. S3_VIDEO_FREQUENCIES Generic64NewFrequencyTable[] = {
  2908. { 8, 640, 60, 0x00, 0x70, 0x00, 0x00 }, // 640x480x8x60 is the default
  2909. { 8, 640, 72, 0x10, 0x70, 0x00, 0x00 },
  2910. { 8, 640, 75, 0x20, 0x70, 0x00, 0x00 },
  2911. { 8, 640, 1, 0x00, 0x00, 0x00, 0x00 },
  2912. { 8, 800, 56, 0x00, 0x80, 0x00, 0x03 },
  2913. { 8, 800, 60, 0x80, 0x80, 0x00, 0x03 },
  2914. { 8, 800, 72, 0x00, 0x80, 0x01, 0x03 },
  2915. { 8, 800, 75, 0x80, 0x80, 0x01, 0x03 },
  2916. { 8, 800, 1, 0x00, 0x00, 0x00, 0x00 },
  2917. { 8, 1024, 60, 0x02, 0x00, 0x08, 0x1C },
  2918. { 8, 1024, 70, 0x03, 0x00, 0x0C, 0x1C },
  2919. { 8, 1024, 75, 0x04, 0x00, 0x10, 0x1C },
  2920. { 8, 1024, 1, 0x00, 0x00, 0x00, 0x00 },
  2921. { 8, 1152, 60, 0x00, 0x00, 0x00, 0xE0 },
  2922. { 8, 1152, 1, 0x00, 0x00, 0x00, 0x00 },
  2923. { 8, 1280, 60, 0x04, 0x00, 0x80, 0xE0 },
  2924. { 8, 1280, 72, 0x05, 0x00, 0xA0, 0xE0 },
  2925. { 8, 1280, 75, 0x06, 0x00, 0xC0, 0xE0 },
  2926. { 8, 1280, 1, 0x00, 0x00, 0x00, 0x00 },
  2927. { 8, 1600, 60, 0x00, 0x00, 0x00, 0xE0 },
  2928. { 8, 1600, 1, 0x00, 0x00, 0x00, 0x00 },
  2929. { 16, 640, 60, 0x00, 0x70, 0x00, 0x00 },
  2930. { 16, 640, 72, 0x10, 0x70, 0x00, 0x00 },
  2931. { 16, 640, 75, 0x20, 0x70, 0x00, 0x00 },
  2932. { 16, 640, 1, 0x00, 0x00, 0x00, 0x00 },
  2933. { 16, 800, 56, 0x00, 0x80, 0x00, 0x03 },
  2934. { 16, 800, 60, 0x80, 0x80, 0x00, 0x03 },
  2935. { 16, 800, 72, 0x00, 0x80, 0x01, 0x03 },
  2936. { 16, 800, 75, 0x80, 0x80, 0x01, 0x03 },
  2937. { 16, 800, 1, 0x00, 0x00, 0x00, 0x00 },
  2938. { 16, 1024, 60, 0x02, 0x00, 0x08, 0x1C },
  2939. { 16, 1024, 70, 0x03, 0x00, 0x0C, 0x1C },
  2940. { 16, 1024, 75, 0x04, 0x00, 0x10, 0x1C },
  2941. { 16, 1024, 1, 0x00, 0x00, 0x00, 0x00 },
  2942. { 16, 1280, 60, 0x04, 0x00, 0x80, 0xE0 },
  2943. { 16, 1280, 72, 0x05, 0x00, 0xA0, 0xE0 },
  2944. { 16, 1280, 75, 0x06, 0x00, 0xC0, 0xE0 },
  2945. { 16, 1280, 1, 0x00, 0x00, 0x00, 0x00 },
  2946. { 16, 1600, 60, 0x00, 0x00, 0x00, 0xE0 },
  2947. { 16, 1600, 1, 0x00, 0x00, 0x00, 0x00 },
  2948. { 32, 640, 60, 0x00, 0x70, 0x00, 0x00 },
  2949. { 32, 640, 72, 0x10, 0x70, 0x00, 0x00 },
  2950. { 32, 640, 75, 0x20, 0x70, 0x00, 0x00 },
  2951. { 32, 640, 1, 0x00, 0x00, 0x00, 0x00 },
  2952. { 32, 800, 56, 0x00, 0x80, 0x00, 0x03 },
  2953. { 32, 800, 60, 0x80, 0x80, 0x00, 0x03 },
  2954. { 32, 800, 72, 0x00, 0x80, 0x01, 0x03 },
  2955. { 32, 800, 75, 0x80, 0x80, 0x01, 0x03 },
  2956. { 32, 800, 1, 0x00, 0x00, 0x00, 0x00 },
  2957. { 32, 1024, 60, 0x02, 0x00, 0x08, 0x1C },
  2958. { 32, 1024, 70, 0x03, 0x00, 0x0C, 0x1C },
  2959. { 32, 1024, 75, 0x04, 0x00, 0x10, 0x1C },
  2960. { 32, 1024, 1, 0x00, 0x00, 0x00, 0x00 },
  2961. { 32, 1280, 60, 0x04, 0x00, 0x80, 0xE0 },
  2962. { 32, 1280, 72, 0x05, 0x00, 0xA0, 0xE0 },
  2963. { 32, 1280, 75, 0x06, 0x00, 0xC0, 0xE0 },
  2964. { 32, 1280, 1, 0x00, 0x00, 0x00, 0x00 },
  2965. { 32, 1600, 60, 0x00, 0x00, 0x00, 0xE0 },
  2966. { 32, 1600, 1, 0x00, 0x00, 0x00, 0x00 },
  2967. { 0 } // Mark the end
  2968. };
  2969. /*****************************************************************************
  2970. * Looks like we need yet another frequency table. This table
  2971. * works for Hercules 732/764/765 based S3's.
  2972. *
  2973. ****************************************************************************/
  2974. S3_VIDEO_FREQUENCIES HerculesFrequencyTable[] = {
  2975. { 8, 640, 60, 0x00, 0x70, 0x00, 0x00 }, // 640x480x8x60 is the default
  2976. { 8, 640, 72, 0x10, 0x70, 0x00, 0x00 },
  2977. { 8, 640, 75, 0x20, 0x70, 0x00, 0x00 },
  2978. { 8, 640, 1, 0x00, 0x00, 0x00, 0x00 },
  2979. { 8, 800, 56, 0x00, 0x80, 0x00, 0x03 },
  2980. { 8, 800, 60, 0x80, 0x80, 0x00, 0x03 },
  2981. { 8, 800, 72, 0x00, 0x80, 0x01, 0x03 },
  2982. { 8, 800, 75, 0x80, 0x80, 0x01, 0x03 },
  2983. { 8, 800, 1, 0x00, 0x00, 0x00, 0x00 },
  2984. { 8, 1024, 60, 0x00, 0x00, 0x04, 0x1C },
  2985. { 8, 1024, 70, 0x00, 0x00, 0x08, 0x1C },
  2986. { 8, 1024, 75, 0x00, 0x00, 0x0C, 0x1C },
  2987. { 8, 1024, 1, 0x00, 0x00, 0x00, 0x00 },
  2988. { 8, 1280, 60, 0x00, 0x00, 0x20, 0xE0 },
  2989. { 8, 1280, 72, 0x00, 0x00, 0x40, 0xE0 },
  2990. { 8, 1280, 75, 0x00, 0x00, 0x60, 0xE0 },
  2991. { 8, 1280, 1, 0x00, 0x00, 0x00, 0x00 },
  2992. { 16, 640, 60, 0x00, 0x70, 0x00, 0x00 },
  2993. { 16, 640, 72, 0x10, 0x70, 0x00, 0x00 },
  2994. { 16, 640, 75, 0x20, 0x70, 0x00, 0x00 },
  2995. { 16, 640, 1, 0x00, 0x00, 0x00, 0x00 },
  2996. { 16, 800, 56, 0x00, 0x80, 0x00, 0x03 },
  2997. { 16, 800, 60, 0x80, 0x80, 0x00, 0x03 },
  2998. { 16, 800, 72, 0x00, 0x80, 0x01, 0x03 },
  2999. { 16, 800, 75, 0x80, 0x80, 0x01, 0x03 },
  3000. { 16, 800, 1, 0x00, 0x00, 0x00, 0x00 },
  3001. { 16, 1024, 60, 0x00, 0x00, 0x04, 0x1C },
  3002. { 16, 1024, 70, 0x00, 0x00, 0x08, 0x1C },
  3003. { 16, 1024, 75, 0x00, 0x00, 0x0C, 0x1C },
  3004. { 16, 1024, 1, 0x00, 0x00, 0x00, 0x00 },
  3005. { 16, 1280, 60, 0x00, 0x00, 0x20, 0xE0 },
  3006. { 16, 1280, 72, 0x00, 0x00, 0x40, 0xE0 },
  3007. { 16, 1280, 75, 0x00, 0x00, 0x60, 0xE0 },
  3008. { 16, 1280, 1, 0x00, 0x00, 0x00, 0x00 },
  3009. { 32, 640, 60, 0x00, 0x70, 0x00, 0x00 },
  3010. { 32, 640, 72, 0x10, 0x70, 0x00, 0x00 },
  3011. { 32, 640, 75, 0x20, 0x70, 0x00, 0x00 },
  3012. { 32, 640, 1, 0x00, 0x00, 0x00, 0x00 },
  3013. { 32, 800, 56, 0x00, 0x80, 0x00, 0x03 },
  3014. { 32, 800, 60, 0x80, 0x80, 0x00, 0x03 },
  3015. { 32, 800, 72, 0x00, 0x80, 0x01, 0x03 },
  3016. { 32, 800, 75, 0x80, 0x80, 0x01, 0x03 },
  3017. { 32, 800, 1, 0x00, 0x00, 0x00, 0x00 },
  3018. { 32, 1024, 60, 0x00, 0x00, 0x04, 0x1C },
  3019. { 32, 1024, 70, 0x00, 0x00, 0x08, 0x1C },
  3020. { 32, 1024, 75, 0x00, 0x00, 0x0C, 0x1C },
  3021. { 32, 1024, 1, 0x00, 0x00, 0x00, 0x00 },
  3022. { 32, 1280, 60, 0x00, 0x00, 0x20, 0xE0 },
  3023. { 32, 1280, 72, 0x00, 0x00, 0x40, 0xE0 },
  3024. { 32, 1280, 75, 0x00, 0x00, 0x60, 0xE0 },
  3025. { 32, 1280, 1, 0x00, 0x00, 0x00, 0x00 },
  3026. { 0 } // Mark the end
  3027. };
  3028. S3_VIDEO_FREQUENCIES Hercules64FrequencyTable[] = {
  3029. { 8, 640, 60, 0x00, 0x70, 0x00, 0x00 }, // 640x480x8x60 is the default
  3030. { 8, 640, 72, 0x10, 0x70, 0x00, 0x00 },
  3031. { 8, 640, 75, 0x20, 0x70, 0x00, 0x00 },
  3032. { 8, 640, 1, 0x00, 0x00, 0x00, 0x00 },
  3033. { 8, 800, 56, 0x00, 0x80, 0x00, 0x03 },
  3034. { 8, 800, 60, 0x80, 0x80, 0x00, 0x03 },
  3035. { 8, 800, 72, 0x00, 0x80, 0x01, 0x03 },
  3036. { 8, 800, 75, 0x80, 0x80, 0x01, 0x03 },
  3037. { 8, 800, 1, 0x00, 0x00, 0x00, 0x00 },
  3038. { 8, 1024, 60, 0x00, 0x00, 0x00, 0x1C },
  3039. { 8, 1024, 70, 0x00, 0x00, 0x04, 0x1C },
  3040. { 8, 1024, 75, 0x00, 0x00, 0x08, 0x1C },
  3041. { 8, 1024, 1, 0x00, 0x00, 0x00, 0x00 },
  3042. { 8, 1280, 60, 0x00, 0x00, 0x20, 0xE0 },
  3043. { 8, 1280, 72, 0x00, 0x00, 0x40, 0xE0 },
  3044. { 8, 1280, 75, 0x00, 0x00, 0x60, 0xE0 },
  3045. { 8, 1280, 1, 0x00, 0x00, 0x00, 0x00 },
  3046. { 16, 640, 60, 0x00, 0x70, 0x00, 0x00 },
  3047. { 16, 640, 72, 0x10, 0x70, 0x00, 0x00 },
  3048. { 16, 640, 75, 0x20, 0x70, 0x00, 0x00 },
  3049. { 16, 640, 1, 0x00, 0x00, 0x00, 0x00 },
  3050. { 16, 800, 56, 0x00, 0x80, 0x00, 0x03 },
  3051. { 16, 800, 60, 0x80, 0x80, 0x00, 0x03 },
  3052. { 16, 800, 72, 0x00, 0x80, 0x01, 0x03 },
  3053. { 16, 800, 75, 0x80, 0x80, 0x01, 0x03 },
  3054. { 16, 800, 1, 0x00, 0x00, 0x00, 0x00 },
  3055. { 16, 1024, 60, 0x00, 0x00, 0x00, 0x1C },
  3056. { 16, 1024, 70, 0x00, 0x00, 0x04, 0x1C },
  3057. { 16, 1024, 75, 0x00, 0x00, 0x08, 0x1C },
  3058. { 16, 1024, 1, 0x00, 0x00, 0x00, 0x00 },
  3059. { 16, 1280, 60, 0x00, 0x00, 0x20, 0xE0 },
  3060. { 16, 1280, 72, 0x00, 0x00, 0x40, 0xE0 },
  3061. { 16, 1280, 75, 0x00, 0x00, 0x60, 0xE0 },
  3062. { 16, 1280, 1, 0x00, 0x00, 0x00, 0x00 },
  3063. { 32, 640, 60, 0x00, 0x70, 0x00, 0x00 },
  3064. { 32, 640, 72, 0x10, 0x70, 0x00, 0x00 },
  3065. { 32, 640, 75, 0x20, 0x70, 0x00, 0x00 },
  3066. { 32, 640, 1, 0x00, 0x00, 0x00, 0x00 },
  3067. { 32, 800, 56, 0x00, 0x80, 0x00, 0x03 },
  3068. { 32, 800, 60, 0x80, 0x80, 0x00, 0x03 },
  3069. { 32, 800, 72, 0x00, 0x80, 0x01, 0x03 },
  3070. { 32, 800, 75, 0x80, 0x80, 0x01, 0x03 },
  3071. { 32, 800, 1, 0x00, 0x00, 0x00, 0x00 },
  3072. { 32, 1024, 60, 0x00, 0x00, 0x00, 0x1C },
  3073. { 32, 1024, 70, 0x00, 0x00, 0x04, 0x1C },
  3074. { 32, 1024, 75, 0x00, 0x00, 0x08, 0x1C },
  3075. { 32, 1024, 1, 0x00, 0x00, 0x00, 0x00 },
  3076. { 32, 1280, 60, 0x00, 0x00, 0x20, 0xE0 },
  3077. { 32, 1280, 72, 0x00, 0x00, 0x40, 0xE0 },
  3078. { 32, 1280, 75, 0x00, 0x00, 0x60, 0xE0 },
  3079. { 32, 1280, 1, 0x00, 0x00, 0x00, 0x00 },
  3080. { 0 } // Mark the end
  3081. };
  3082. S3_VIDEO_FREQUENCIES Hercules68FrequencyTable[] = {
  3083. { 8, 640, 60, 0x00, 0x70, 0x00, 0x00 }, // 640x480x8x60 is the default
  3084. { 8, 640, 72, 0x10, 0x70, 0x00, 0x00 },
  3085. { 8, 640, 75, 0x20, 0x70, 0x00, 0x00 },
  3086. { 8, 640, 1, 0x00, 0x00, 0x00, 0x00 },
  3087. { 8, 800, 56, 0x00, 0x80, 0x00, 0x03 },
  3088. { 8, 800, 60, 0x80, 0x80, 0x00, 0x03 },
  3089. { 8, 800, 72, 0x00, 0x80, 0x01, 0x03 },
  3090. { 8, 800, 75, 0x80, 0x80, 0x01, 0x03 },
  3091. { 8, 800, 1, 0x00, 0x00, 0x00, 0x00 },
  3092. { 8, 1024, 60, 0x00, 0x00, 0x00, 0x1C },
  3093. { 8, 1024, 70, 0x00, 0x00, 0x04, 0x1C },
  3094. { 8, 1024, 75, 0x00, 0x00, 0x08, 0x1C },
  3095. { 8, 1024, 1, 0x00, 0x00, 0x00, 0x00 },
  3096. { 8, 1280, 60, 0x00, 0x00, 0x20, 0xE0 },
  3097. { 8, 1280, 72, 0x00, 0x00, 0x40, 0xE0 },
  3098. { 8, 1280, 75, 0x00, 0x00, 0x60, 0xE0 },
  3099. { 8, 1280, 1, 0x00, 0x00, 0x00, 0x00 },
  3100. { 16, 640, 60, 0x00, 0x70, 0x00, 0x00 },
  3101. { 16, 640, 72, 0x10, 0x70, 0x00, 0x00 },
  3102. { 16, 640, 75, 0x20, 0x70, 0x00, 0x00 },
  3103. { 16, 640, 1, 0x00, 0x00, 0x00, 0x00 },
  3104. { 16, 800, 56, 0x00, 0x80, 0x00, 0x03 },
  3105. { 16, 800, 60, 0x80, 0x80, 0x00, 0x03 },
  3106. { 16, 800, 72, 0x00, 0x80, 0x01, 0x03 },
  3107. { 16, 800, 75, 0x80, 0x80, 0x01, 0x03 },
  3108. { 16, 800, 1, 0x00, 0x00, 0x00, 0x00 },
  3109. { 16, 1024, 60, 0x00, 0x00, 0x00, 0x1C },
  3110. { 16, 1024, 70, 0x00, 0x00, 0x04, 0x1C },
  3111. { 16, 1024, 75, 0x00, 0x00, 0x08, 0x1C },
  3112. { 16, 1024, 1, 0x00, 0x00, 0x00, 0x00 },
  3113. { 16, 1280, 60, 0x00, 0x00, 0x20, 0xE0 },
  3114. { 16, 1280, 72, 0x00, 0x00, 0x40, 0xE0 },
  3115. { 16, 1280, 75, 0x00, 0x00, 0x60, 0xE0 },
  3116. { 16, 1280, 1, 0x00, 0x00, 0x00, 0x00 },
  3117. { 32, 640, 60, 0x00, 0x70, 0x00, 0x00 },
  3118. { 32, 640, 72, 0x10, 0x70, 0x00, 0x00 },
  3119. { 32, 640, 75, 0x20, 0x70, 0x00, 0x00 },
  3120. { 32, 640, 1, 0x00, 0x00, 0x00, 0x00 },
  3121. { 32, 800, 56, 0x00, 0x80, 0x00, 0x03 },
  3122. { 32, 800, 60, 0x80, 0x80, 0x00, 0x03 },
  3123. { 32, 800, 72, 0x00, 0x80, 0x01, 0x03 },
  3124. { 32, 800, 75, 0x80, 0x80, 0x01, 0x03 },
  3125. { 32, 800, 1, 0x00, 0x00, 0x00, 0x00 },
  3126. { 32, 1024, 60, 0x00, 0x00, 0x00, 0x1C },
  3127. { 32, 1024, 70, 0x00, 0x00, 0x04, 0x1C },
  3128. { 32, 1024, 75, 0x00, 0x00, 0x08, 0x1C },
  3129. { 32, 1024, 1, 0x00, 0x00, 0x00, 0x00 },
  3130. { 32, 1280, 60, 0x00, 0x00, 0x20, 0xE0 },
  3131. { 32, 1280, 72, 0x00, 0x00, 0x40, 0xE0 },
  3132. { 32, 1280, 75, 0x00, 0x00, 0x60, 0xE0 },
  3133. { 32, 1280, 1, 0x00, 0x00, 0x00, 0x00 },
  3134. { 0 } // Mark the end
  3135. };
  3136. /*****************************************************************************
  3137. * Number Nine GXE 64 -- Uses registers 0x52 and 0x5B
  3138. *
  3139. * This is close to the new 'generic' standard, except for the change
  3140. * to 76 Hz and the addition of 1152 x 870 modes.
  3141. *
  3142. ****************************************************************************/
  3143. S3_VIDEO_FREQUENCIES NumberNine64FrequencyTable[] = {
  3144. { 8, 640, 60, 0x00, 0x70, 0x00, 0x00 }, // 640x480x8x60 is the default
  3145. { 8, 640, 72, 0x10, 0x70, 0x00, 0x00 },
  3146. { 8, 640, 76, 0x20, 0x70, 0x00, 0x00 },
  3147. { 8, 800, 56, 0x00, 0x80, 0x00, 0x03 },
  3148. { 8, 800, 60, 0x80, 0x80, 0x00, 0x03 },
  3149. { 8, 800, 72, 0x00, 0x80, 0x01, 0x03 },
  3150. { 8, 800, 76, 0x80, 0x80, 0x01, 0x03 },
  3151. { 8, 1024, 60, 0x02, 0x00, 0x08, 0x1C },
  3152. { 8, 1024, 70, 0x03, 0x00, 0x0C, 0x1C },
  3153. { 8, 1024, 76, 0x04, 0x00, 0x10, 0x1C },
  3154. { 8, 1152, 60, 0x04, 0x00, 0x80, 0xE0 },
  3155. { 8, 1152, 72, 0x05, 0x00, 0xA0, 0xE0 },
  3156. { 8, 1152, 76, 0x06, 0x00, 0xC0, 0xE0 },
  3157. { 8, 1280, 60, 0x04, 0x00, 0x80, 0xE0 },
  3158. { 8, 1280, 72, 0x05, 0x00, 0xA0, 0xE0 },
  3159. { 8, 1280, 76, 0x06, 0x00, 0xC0, 0xE0 },
  3160. { 8, 1600, 60, 0x00, 0x00, 0x00, 0xE0 },
  3161. { 16, 640, 60, 0x00, 0x70, 0x00, 0x00 },
  3162. { 16, 640, 72, 0x10, 0x70, 0x00, 0x00 },
  3163. { 16, 640, 76, 0x20, 0x70, 0x00, 0x00 },
  3164. { 16, 800, 56, 0x00, 0x80, 0x00, 0x03 },
  3165. { 16, 800, 60, 0x80, 0x80, 0x00, 0x03 },
  3166. { 16, 800, 72, 0x00, 0x80, 0x01, 0x03 },
  3167. { 16, 800, 76, 0x80, 0x80, 0x01, 0x03 },
  3168. { 16, 1024, 60, 0x02, 0x00, 0x08, 0x1C },
  3169. { 16, 1024, 70, 0x03, 0x00, 0x0C, 0x1C },
  3170. { 16, 1024, 76, 0x04, 0x00, 0x10, 0x1C },
  3171. { 16, 1152, 60, 0x04, 0x00, 0x80, 0xE0 },
  3172. { 16, 1152, 72, 0x05, 0x00, 0xA0, 0xE0 },
  3173. { 16, 1152, 76, 0x06, 0x00, 0xC0, 0xE0 },
  3174. { 16, 1280, 60, 0x04, 0x00, 0x80, 0xE0 },
  3175. { 16, 1280, 72, 0x05, 0x00, 0xA0, 0xE0 },
  3176. { 16, 1280, 76, 0x06, 0x00, 0xC0, 0xE0 },
  3177. { 16, 1600, 60, 0x00, 0x00, 0x00, 0xE0 },
  3178. { 24, 1280, 60, 0x04, 0x00, 0x80, 0xE0 }, //24bpp
  3179. { 24, 1280, 72, 0x05, 0x00, 0xA0, 0xE0 }, //24bpp
  3180. { 32, 640, 60, 0x00, 0x70, 0x00, 0x00 },
  3181. { 32, 640, 72, 0x10, 0x70, 0x00, 0x00 },
  3182. { 32, 640, 76, 0x20, 0x70, 0x00, 0x00 },
  3183. { 32, 800, 56, 0x00, 0x80, 0x00, 0x03 },
  3184. { 32, 800, 60, 0x80, 0x80, 0x00, 0x03 },
  3185. { 32, 800, 72, 0x00, 0x80, 0x01, 0x03 },
  3186. { 32, 800, 76, 0x80, 0x80, 0x01, 0x03 },
  3187. { 32, 1024, 60, 0x02, 0x00, 0x08, 0x1C },
  3188. { 32, 1024, 70, 0x03, 0x00, 0x0C, 0x1C },
  3189. { 32, 1024, 76, 0x04, 0x00, 0x10, 0x1C },
  3190. { 32, 1152, 60, 0x04, 0x00, 0x80, 0xE0 },
  3191. { 32, 1152, 72, 0x05, 0x00, 0xA0, 0xE0 },
  3192. { 32, 1152, 76, 0x06, 0x00, 0xC0, 0xE0 },
  3193. { 32, 1280, 60, 0x04, 0x00, 0x80, 0xE0 },
  3194. { 32, 1280, 72, 0x05, 0x00, 0xA0, 0xE0 },
  3195. { 32, 1280, 76, 0x06, 0x00, 0xC0, 0xE0 },
  3196. { 32, 1600, 60, 0x00, 0x00, 0x00, 0xE0 },
  3197. { 0 } // Mark the end
  3198. };
  3199. /*****************************************************************************
  3200. * Diamond Stealth 64 -- Uses register 0x5B
  3201. *
  3202. * We keep 'hardware default refresh' around just in case Diamond decides
  3203. * to change their convention on us.
  3204. *
  3205. ****************************************************************************/
  3206. S3_VIDEO_FREQUENCIES Diamond64FrequencyTable[] = {
  3207. { 8, 640, 60, 0x00, 0x00, 0x08, 0xff }, // 640x480x8x60 is the default
  3208. { 8, 640, 72, 0x00, 0x00, 0x00, 0xff },
  3209. { 8, 640, 75, 0x00, 0x00, 0x02, 0xff },
  3210. { 8, 640, 90, 0x00, 0x00, 0x04, 0xff },
  3211. { 8, 640,100, 0x00, 0x00, 0x0D, 0xff },
  3212. { 8, 640,120, 0x00, 0x00, 0x0E, 0xff },
  3213. { 8, 640, 1, 0x00, 0x00, 0x00, 0x00 },
  3214. { 8, 800, 56, 0x00, 0x00, 0x08, 0xff },
  3215. { 8, 800, 60, 0x00, 0x00, 0x00, 0xff },
  3216. { 8, 800, 72, 0x00, 0x00, 0x06, 0xff },
  3217. { 8, 800, 75, 0x00, 0x00, 0x02, 0xff },
  3218. { 8, 800, 90, 0x00, 0x00, 0x04, 0xff },
  3219. { 8, 800,100, 0x00, 0x00, 0x0D, 0xff },
  3220. { 8, 800,120, 0x00, 0x00, 0x0E, 0xff },
  3221. { 8, 800, 1, 0x00, 0x00, 0x00, 0x00 },
  3222. { 8, 1024, 60, 0x00, 0x00, 0x06, 0xff },
  3223. { 8, 1024, 70, 0x00, 0x00, 0x0A, 0xff },
  3224. { 8, 1024, 72, 0x00, 0x00, 0x04, 0xff },
  3225. { 8, 1024, 75, 0x00, 0x00, 0x02, 0xff },
  3226. { 8, 1024, 80, 0x00, 0x00, 0x0D, 0xff },
  3227. { 8, 1024,100, 0x00, 0x00, 0x0E, 0xff },
  3228. { 8, 1024, 1, 0x00, 0x00, 0x00, 0x00 },
  3229. { 8, 1152, 60, 0x00, 0x00, 0x00, 0xff },
  3230. { 8, 1152, 70, 0x00, 0x00, 0x0D, 0xff },
  3231. { 8, 1152, 75, 0x00, 0x00, 0x02, 0xff },
  3232. { 8, 1152, 1, 0x00, 0x00, 0x00, 0x00 },
  3233. { 8, 1280, 60, 0x00, 0x00, 0x07, 0xff },
  3234. { 8, 1280, 72, 0x00, 0x00, 0x04, 0xff },
  3235. { 8, 1280, 75, 0x00, 0x00, 0x02, 0xff },
  3236. { 8, 1280, 1, 0x00, 0x00, 0x00, 0x00 },
  3237. { 8, 1600, 60, 0x00, 0x00, 0x00, 0xff },
  3238. { 8, 1600, 1, 0x00, 0x00, 0x00, 0x00 },
  3239. { 16, 640, 60, 0x00, 0x00, 0x08, 0xff },
  3240. { 16, 640, 72, 0x00, 0x00, 0x00, 0xff },
  3241. { 16, 640, 75, 0x00, 0x00, 0x02, 0xff },
  3242. { 16, 640, 90, 0x00, 0x00, 0x04, 0xff },
  3243. { 16, 640,100, 0x00, 0x00, 0x0D, 0xff },
  3244. { 16, 640,120, 0x00, 0x00, 0x0E, 0xff },
  3245. { 16, 640, 1, 0x00, 0x00, 0x00, 0x00 },
  3246. { 16, 800, 56, 0x00, 0x00, 0x08, 0xff },
  3247. { 16, 800, 60, 0x00, 0x00, 0x00, 0xff },
  3248. { 16, 800, 72, 0x00, 0x00, 0x06, 0xff },
  3249. { 16, 800, 75, 0x00, 0x00, 0x02, 0xff },
  3250. { 16, 800, 90, 0x00, 0x00, 0x04, 0xff },
  3251. { 16, 800,100, 0x00, 0x00, 0x0D, 0xff },
  3252. { 16, 800,120, 0x00, 0x00, 0x0E, 0xff },
  3253. { 16, 800, 1, 0x00, 0x00, 0x00, 0x00 },
  3254. { 16, 1024, 60, 0x00, 0x00, 0x06, 0xff },
  3255. { 16, 1024, 70, 0x00, 0x00, 0x0A, 0xff },
  3256. { 16, 1024, 72, 0x00, 0x00, 0x04, 0xff },
  3257. { 16, 1024, 75, 0x00, 0x00, 0x02, 0xff },
  3258. { 16, 1024, 80, 0x00, 0x00, 0x0D, 0xff },
  3259. { 16, 1024,100, 0x00, 0x00, 0x0E, 0xff },
  3260. { 16, 1024, 1, 0x00, 0x00, 0x00, 0x00 },
  3261. { 16, 1152, 60, 0x00, 0x00, 0x00, 0xff },
  3262. { 16, 1152, 70, 0x00, 0x00, 0x0D, 0xff },
  3263. { 16, 1152, 75, 0x00, 0x00, 0x02, 0xff },
  3264. { 16, 1152, 1, 0x00, 0x00, 0x00, 0x00 },
  3265. { 16, 1280, 60, 0x00, 0x00, 0x07, 0xff },
  3266. { 16, 1280, 72, 0x00, 0x00, 0x04, 0xff },
  3267. { 16, 1280, 75, 0x00, 0x00, 0x02, 0xff },
  3268. { 16, 1280, 1, 0x00, 0x00, 0x00, 0x00 },
  3269. { 16, 1600, 60, 0x00, 0x00, 0x00, 0xff },
  3270. { 16, 1600, 1, 0x00, 0x00, 0x00, 0x00 },
  3271. { 24, 1280, 60, 0x00, 0x00, 0x07, 0xff }, //24bpp
  3272. { 24, 1280, 72, 0x00, 0x00, 0x04, 0xff }, //24bpp
  3273. { 24, 1280, 75, 0x00, 0x00, 0x02, 0xff }, //24bpp
  3274. { 24, 1280, 1, 0x00, 0x00, 0x00, 0x00 }, //24bpp
  3275. { 32, 640, 60, 0x00, 0x00, 0x08, 0xff },
  3276. { 32, 640, 72, 0x00, 0x00, 0x00, 0xff },
  3277. { 32, 640, 75, 0x00, 0x00, 0x02, 0xff },
  3278. { 32, 640, 90, 0x00, 0x00, 0x04, 0xff },
  3279. { 32, 640,100, 0x00, 0x00, 0x0D, 0xff },
  3280. { 32, 640,120, 0x00, 0x00, 0x0E, 0xff },
  3281. { 32, 640, 1, 0x00, 0x00, 0x00, 0x00 },
  3282. { 32, 800, 56, 0x00, 0x00, 0x08, 0xff },
  3283. { 32, 800, 60, 0x00, 0x00, 0x00, 0xff },
  3284. { 32, 800, 72, 0x00, 0x00, 0x06, 0xff },
  3285. { 32, 800, 75, 0x00, 0x00, 0x02, 0xff },
  3286. { 32, 800, 90, 0x00, 0x00, 0x04, 0xff },
  3287. { 32, 800,100, 0x00, 0x00, 0x0D, 0xff },
  3288. { 32, 800,120, 0x00, 0x00, 0x0E, 0xff },
  3289. { 32, 800, 1, 0x00, 0x00, 0x00, 0x00 },
  3290. { 32, 1024, 60, 0x00, 0x00, 0x06, 0xff },
  3291. { 32, 1024, 70, 0x00, 0x00, 0x0A, 0xff },
  3292. { 32, 1024, 72, 0x00, 0x00, 0x04, 0xff },
  3293. { 32, 1024, 75, 0x00, 0x00, 0x02, 0xff },
  3294. { 32, 1024, 80, 0x00, 0x00, 0x0D, 0xff },
  3295. { 32, 1024,100, 0x00, 0x00, 0x0E, 0xff },
  3296. { 32, 1024, 1, 0x00, 0x00, 0x00, 0x00 },
  3297. { 32, 1152, 60, 0x00, 0x00, 0x00, 0xff },
  3298. { 32, 1152, 70, 0x00, 0x00, 0x0D, 0xff },
  3299. { 32, 1152, 75, 0x00, 0x00, 0x02, 0xff },
  3300. { 32, 1152, 1, 0x00, 0x00, 0x00, 0x00 },
  3301. { 32, 1280, 60, 0x00, 0x00, 0x07, 0xff },
  3302. { 32, 1280, 72, 0x00, 0x00, 0x04, 0xff },
  3303. { 32, 1280, 75, 0x00, 0x00, 0x02, 0xff },
  3304. { 32, 1280, 1, 0x00, 0x00, 0x00, 0x00 },
  3305. { 32, 1600, 60, 0x00, 0x00, 0x00, 0xff },
  3306. { 32, 1600, 1, 0x00, 0x00, 0x00, 0x00 },
  3307. { 0 } // Mark the end
  3308. };
  3309. /*****************************************************************************
  3310. * DELL 805 mode set bits table
  3311. *
  3312. * Dell has a different mapping for each resolution.
  3313. *
  3314. * index registry 640 800 1024 1280
  3315. * 0 43 60 56 43 43
  3316. * 1 56 72 60 60 --
  3317. * 2 60 -- 72 70 --
  3318. * 3 72 56 56 72 --
  3319. *
  3320. ****************************************************************************/
  3321. S3_VIDEO_FREQUENCIES Dell805FrequencyTable[] = {
  3322. { 8, 640, 60, 0x00, 0x03, 0x00, 0x00 }, // 640x480x8x60 is the default
  3323. { 8, 640, 72, 0x01, 0x03, 0x00, 0x00 },
  3324. { 8, 800, 56, 0x00, 0x0C, 0x00, 0x00 },
  3325. { 8, 800, 60, 0x04, 0x0C, 0x00, 0x00 },
  3326. { 8, 800, 72, 0x08, 0x0C, 0x00, 0x00 },
  3327. { 8, 1024, 60, 0x10, 0x30, 0x00, 0x00 },
  3328. { 8, 1024, 70, 0x20, 0x30, 0x00, 0x00 },
  3329. { 8, 1024, 72, 0x30, 0x30, 0x00, 0x00 },
  3330. // The Dell doesn't use standard mode-set numbers for 16bpp, so we
  3331. // simply won't do any 16bpp modes.
  3332. { 0 } // Mark the end
  3333. };
  3334. /*****************************************************************************
  3335. * Old Number Nine Computer 928 mode set bits table
  3336. *
  3337. * BIOS versions before 1.10.04 have the following refresh index to
  3338. * vertical refresh rate association:
  3339. *
  3340. * 0 60 Hz (56 Hz if 800x600)
  3341. * 1 70 Hz
  3342. * 2 72 Hz
  3343. * 3 76 Hz
  3344. *
  3345. ****************************************************************************/
  3346. S3_VIDEO_FREQUENCIES NumberNine928OldFrequencyTable[] = {
  3347. { 8, 640, 60, 0x00, 0x03, 0x00, 0x00 }, // 640x480x8x60 is the default
  3348. { 8, 640, 70, 0x01, 0x03, 0x00, 0x00 },
  3349. { 8, 640, 72, 0x02, 0x03, 0x00, 0x00 },
  3350. { 8, 640, 76, 0x03, 0x03, 0x00, 0x00 },
  3351. { 8, 800, 56, 0x00, 0x0C, 0x00, 0x00 },
  3352. { 8, 800, 70, 0x04, 0x0C, 0x00, 0x00 },
  3353. { 8, 800, 72, 0x08, 0x0C, 0x00, 0x00 },
  3354. { 8, 800, 76, 0x0C, 0x0C, 0x00, 0x00 },
  3355. { 8, 1024, 60, 0x00, 0x30, 0x00, 0x00 },
  3356. { 8, 1024, 70, 0x10, 0x30, 0x00, 0x00 },
  3357. { 8, 1024, 72, 0x20, 0x30, 0x00, 0x00 },
  3358. { 8, 1024, 76, 0x30, 0x30, 0x00, 0x00 },
  3359. { 8, 1280, 60, 0x00, 0xC0, 0x00, 0x00 },
  3360. { 8, 1280, 70, 0x40, 0xC0, 0x00, 0x00 },
  3361. { 8, 1280, 72, 0x80, 0xC0, 0x00, 0x00 },
  3362. { 8, 1280, 76, 0xC0, 0xC0, 0x00, 0x00 },
  3363. { 8, 1600, 60, 0x00, 0xC0, 0x00, 0x00 },
  3364. { 8, 1600, 70, 0x40, 0xC0, 0x00, 0x00 },
  3365. { 8, 1600, 72, 0x80, 0xC0, 0x00, 0x00 },
  3366. { 8, 1600, 76, 0xC0, 0xC0, 0x00, 0x00 },
  3367. { 15, 640, 60, 0x00, 0x03, 0x00, 0x00 },
  3368. { 15, 640, 70, 0x01, 0x03, 0x00, 0x00 },
  3369. { 15, 640, 72, 0x02, 0x03, 0x00, 0x00 },
  3370. { 15, 640, 76, 0x03, 0x03, 0x00, 0x00 },
  3371. { 15, 800, 56, 0x00, 0x0C, 0x00, 0x00 },
  3372. { 15, 800, 70, 0x04, 0x0C, 0x00, 0x00 },
  3373. { 15, 800, 72, 0x08, 0x0C, 0x00, 0x00 },
  3374. { 15, 800, 76, 0x0C, 0x0C, 0x00, 0x00 },
  3375. { 15, 1024, 60, 0x00, 0x30, 0x00, 0x00 },
  3376. { 15, 1024, 70, 0x10, 0x30, 0x00, 0x00 },
  3377. { 15, 1024, 72, 0x20, 0x30, 0x00, 0x00 },
  3378. { 15, 1024, 76, 0x30, 0x30, 0x00, 0x00 },
  3379. { 15, 1280, 60, 0x00, 0xC0, 0x00, 0x00 },
  3380. { 15, 1280, 70, 0x40, 0xC0, 0x00, 0x00 },
  3381. { 15, 1280, 72, 0x80, 0xC0, 0x00, 0x00 },
  3382. { 15, 1280, 76, 0xC0, 0xC0, 0x00, 0x00 },
  3383. { 16, 640, 60, 0x00, 0x03, 0x00, 0x00 },
  3384. { 16, 640, 70, 0x01, 0x03, 0x00, 0x00 },
  3385. { 16, 640, 72, 0x02, 0x03, 0x00, 0x00 },
  3386. { 16, 640, 76, 0x03, 0x03, 0x00, 0x00 },
  3387. { 16, 800, 56, 0x00, 0x0C, 0x00, 0x00 },
  3388. { 16, 800, 70, 0x04, 0x0C, 0x00, 0x00 },
  3389. { 16, 800, 72, 0x08, 0x0C, 0x00, 0x00 },
  3390. { 16, 800, 76, 0x0C, 0x0C, 0x00, 0x00 },
  3391. { 16, 1024, 60, 0x00, 0x30, 0x00, 0x00 },
  3392. { 16, 1024, 70, 0x10, 0x30, 0x00, 0x00 },
  3393. { 16, 1024, 72, 0x20, 0x30, 0x00, 0x00 },
  3394. { 16, 1024, 76, 0x30, 0x30, 0x00, 0x00 },
  3395. { 16, 1280, 60, 0x00, 0xC0, 0x00, 0x00 },
  3396. { 16, 1280, 70, 0x40, 0xC0, 0x00, 0x00 },
  3397. { 16, 1280, 72, 0x80, 0xC0, 0x00, 0x00 },
  3398. { 16, 1280, 76, 0xC0, 0xC0, 0x00, 0x00 },
  3399. { 32, 640, 60, 0x00, 0x03, 0x00, 0x00 },
  3400. { 32, 640, 70, 0x01, 0x03, 0x00, 0x00 },
  3401. { 32, 640, 72, 0x02, 0x03, 0x00, 0x00 },
  3402. { 32, 640, 76, 0x03, 0x03, 0x00, 0x00 },
  3403. { 32, 800, 56, 0x00, 0x0C, 0x00, 0x00 },
  3404. { 32, 800, 70, 0x04, 0x0C, 0x00, 0x00 },
  3405. { 32, 800, 72, 0x08, 0x0C, 0x00, 0x00 },
  3406. { 32, 800, 76, 0x0C, 0x0C, 0x00, 0x00 },
  3407. { 32, 1024, 60, 0x00, 0x30, 0x00, 0x00 },
  3408. { 32, 1024, 70, 0x10, 0x30, 0x00, 0x00 },
  3409. { 32, 1024, 72, 0x20, 0x30, 0x00, 0x00 },
  3410. { 32, 1024, 76, 0x30, 0x30, 0x00, 0x00 },
  3411. { 32, 1280, 60, 0x00, 0xC0, 0x00, 0x00 },
  3412. { 32, 1280, 70, 0x40, 0xC0, 0x00, 0x00 },
  3413. { 32, 1280, 72, 0x80, 0xC0, 0x00, 0x00 },
  3414. { 32, 1280, 76, 0xC0, 0xC0, 0x00, 0x00 },
  3415. { 0 } // Mark the end
  3416. };
  3417. /*****************************************************************************
  3418. * New Number Nine Computer 928 mode set bits table
  3419. *
  3420. * BIOS versions after 1.10.04 have the following refresh index to
  3421. * vertical refresh rate association:
  3422. *
  3423. * 0 70 Hz
  3424. * 1 76 Hz
  3425. * 2 60 Hz (56 Hz if 800x600)
  3426. * 3 72 Hz
  3427. *
  3428. ****************************************************************************/
  3429. S3_VIDEO_FREQUENCIES NumberNine928NewFrequencyTable[] = {
  3430. { 8, 640, 60, 0x02, 0x03, 0x00, 0x00 }, // 640x480x8x60 is the default
  3431. { 8, 640, 70, 0x00, 0x03, 0x00, 0x00 },
  3432. { 8, 640, 72, 0x03, 0x03, 0x00, 0x00 },
  3433. { 8, 640, 76, 0x01, 0x03, 0x00, 0x00 },
  3434. { 8, 800, 56, 0x08, 0x0C, 0x00, 0x00 },
  3435. { 8, 800, 70, 0x00, 0x0C, 0x00, 0x00 },
  3436. { 8, 800, 72, 0x0C, 0x0C, 0x00, 0x00 },
  3437. { 8, 800, 76, 0x04, 0x0C, 0x00, 0x00 },
  3438. { 8, 1024, 60, 0x20, 0x30, 0x00, 0x00 },
  3439. { 8, 1024, 70, 0x00, 0x30, 0x00, 0x00 },
  3440. { 8, 1024, 72, 0x30, 0x30, 0x00, 0x00 },
  3441. { 8, 1024, 76, 0x10, 0x30, 0x00, 0x00 },
  3442. { 8, 1280, 60, 0x80, 0xC0, 0x00, 0x00 },
  3443. { 8, 1280, 70, 0x00, 0xC0, 0x00, 0x00 },
  3444. { 8, 1280, 72, 0xC0, 0xC0, 0x00, 0x00 },
  3445. { 8, 1280, 76, 0x40, 0xC0, 0x00, 0x00 },
  3446. { 8, 1600, 60, 0x80, 0xC0, 0x00, 0x00 },
  3447. { 8, 1600, 70, 0x00, 0xC0, 0x00, 0x00 },
  3448. { 8, 1600, 72, 0xC0, 0xC0, 0x00, 0x00 },
  3449. { 8, 1600, 76, 0x40, 0xC0, 0x00, 0x00 },
  3450. { 15, 640, 60, 0x02, 0x03, 0x00, 0x00 },
  3451. { 15, 640, 70, 0x00, 0x03, 0x00, 0x00 },
  3452. { 15, 640, 72, 0x03, 0x03, 0x00, 0x00 },
  3453. { 15, 640, 76, 0x01, 0x03, 0x00, 0x00 },
  3454. { 15, 800, 56, 0x08, 0x0C, 0x00, 0x00 },
  3455. { 15, 800, 70, 0x00, 0x0C, 0x00, 0x00 },
  3456. { 15, 800, 72, 0x0C, 0x0C, 0x00, 0x00 },
  3457. { 15, 800, 76, 0x04, 0x0C, 0x00, 0x00 },
  3458. { 15, 1024, 60, 0x20, 0x30, 0x00, 0x00 },
  3459. { 15, 1024, 70, 0x00, 0x30, 0x00, 0x00 },
  3460. { 15, 1024, 72, 0x30, 0x30, 0x00, 0x00 },
  3461. { 15, 1024, 76, 0x10, 0x30, 0x00, 0x00 },
  3462. { 15, 1280, 60, 0x80, 0xC0, 0x00, 0x00 },
  3463. { 15, 1280, 70, 0x00, 0xC0, 0x00, 0x00 },
  3464. { 15, 1280, 72, 0xC0, 0xC0, 0x00, 0x00 },
  3465. { 15, 1280, 76, 0x40, 0xC0, 0x00, 0x00 },
  3466. { 16, 640, 60, 0x02, 0x03, 0x00, 0x00 },
  3467. { 16, 640, 70, 0x00, 0x03, 0x00, 0x00 },
  3468. { 16, 640, 72, 0x03, 0x03, 0x00, 0x00 },
  3469. { 16, 640, 76, 0x01, 0x03, 0x00, 0x00 },
  3470. { 16, 800, 56, 0x08, 0x0C, 0x00, 0x00 },
  3471. { 16, 800, 70, 0x00, 0x0C, 0x00, 0x00 },
  3472. { 16, 800, 72, 0x0C, 0x0C, 0x00, 0x00 },
  3473. { 16, 800, 76, 0x04, 0x0C, 0x00, 0x00 },
  3474. { 16, 1024, 60, 0x20, 0x30, 0x00, 0x00 },
  3475. { 16, 1024, 70, 0x00, 0x30, 0x00, 0x00 },
  3476. { 16, 1024, 72, 0x30, 0x30, 0x00, 0x00 },
  3477. { 16, 1024, 76, 0x10, 0x30, 0x00, 0x00 },
  3478. { 16, 1280, 60, 0x80, 0xC0, 0x00, 0x00 },
  3479. { 16, 1280, 70, 0x00, 0xC0, 0x00, 0x00 },
  3480. { 16, 1280, 72, 0xC0, 0xC0, 0x00, 0x00 },
  3481. { 16, 1280, 76, 0x40, 0xC0, 0x00, 0x00 },
  3482. { 32, 640, 60, 0x02, 0x03, 0x00, 0x00 },
  3483. { 32, 640, 70, 0x00, 0x03, 0x00, 0x00 },
  3484. { 32, 640, 72, 0x03, 0x03, 0x00, 0x00 },
  3485. { 32, 640, 76, 0x01, 0x03, 0x00, 0x00 },
  3486. { 32, 800, 56, 0x08, 0x0C, 0x00, 0x00 },
  3487. { 32, 800, 70, 0x00, 0x0C, 0x00, 0x00 },
  3488. { 32, 800, 72, 0x0C, 0x0C, 0x00, 0x00 },
  3489. { 32, 800, 76, 0x04, 0x0C, 0x00, 0x00 },
  3490. { 32, 1024, 60, 0x20, 0x30, 0x00, 0x00 },
  3491. { 32, 1024, 70, 0x00, 0x30, 0x00, 0x00 },
  3492. { 32, 1024, 72, 0x30, 0x30, 0x00, 0x00 },
  3493. { 32, 1024, 76, 0x10, 0x30, 0x00, 0x00 },
  3494. { 32, 1280, 60, 0x80, 0xC0, 0x00, 0x00 },
  3495. { 32, 1280, 70, 0x00, 0xC0, 0x00, 0x00 },
  3496. { 32, 1280, 72, 0xC0, 0xC0, 0x00, 0x00 },
  3497. { 32, 1280, 76, 0x40, 0xC0, 0x00, 0x00 },
  3498. { 0 } // Mark the end
  3499. };
  3500. /*****************************************************************************
  3501. * Metheus 928 mode set bits table
  3502. *
  3503. * 2 60 Hz
  3504. * 3 72 Hz
  3505. *
  3506. * We don't bother to support interlaced modes.
  3507. *
  3508. ****************************************************************************/
  3509. S3_VIDEO_FREQUENCIES Metheus928FrequencyTable[] = {
  3510. { 8, 640, 60, 0x02, 0x03, 0x00, 0x00 }, // 640x480x8x60 is the default
  3511. { 8, 640, 72, 0x03, 0x03, 0x00, 0x00 },
  3512. { 8, 800, 60, 0x08, 0x0C, 0x00, 0x00 },
  3513. { 8, 800, 72, 0x0C, 0x0C, 0x00, 0x00 },
  3514. { 8, 1024, 60, 0x20, 0x30, 0x00, 0x00 },
  3515. { 8, 1024, 72, 0x30, 0x30, 0x00, 0x00 },
  3516. { 8, 1280, 60, 0x80, 0xC0, 0x00, 0x00 },
  3517. { 8, 1280, 72, 0xC0, 0xC0, 0x00, 0x00 },
  3518. // The Metheus Premier 928 ship with DACs that all do 5-6-5 in the 1xx
  3519. // modes, so we won't bother listing any '15bpp' modes that we know
  3520. // won't work. The Metheus BIOS also only ever does 60 Hz at 16bpp.
  3521. { 16, 640, 60, 0x02, 0x03, 0x00, 0x00 },
  3522. { 16, 800, 60, 0x08, 0x0C, 0x00, 0x00 },
  3523. { 16, 1024, 60, 0x20, 0x30, 0x00, 0x00 },
  3524. { 16, 1280, 60, 0x80, 0xC0, 0x00, 0x00 },
  3525. { 32, 640, 60, 0x02, 0x03, 0x00, 0x00 },
  3526. { 32, 640, 72, 0x03, 0x03, 0x00, 0x00 },
  3527. { 32, 800, 60, 0x08, 0x0C, 0x00, 0x00 },
  3528. { 32, 800, 72, 0x0C, 0x0C, 0x00, 0x00 },
  3529. { 32, 1024, 60, 0x20, 0x30, 0x00, 0x00 },
  3530. { 32, 1024, 72, 0x30, 0x30, 0x00, 0x00 },
  3531. { 32, 1280, 60, 0x80, 0xC0, 0x00, 0x00 },
  3532. { 32, 1280, 72, 0xC0, 0xC0, 0x00, 0x00 },
  3533. { 0 } // Mark the end
  3534. };
  3535. /******************************************************************************
  3536. * Streams minimum stretch ratios, multiplied by 1000, for every mode.
  3537. *
  3538. *****************************************************************************/
  3539. K2TABLE K2WidthRatio[] = {
  3540. { 1024, 16, 43, 0x10, 40, 1000 },
  3541. { 1024, 16, 60, 0x10, 40, 2700 },
  3542. { 1024, 16, 70, 0x10, 40, 2900 },
  3543. { 1024, 16, 75, 0x10, 40, 2900 },
  3544. { 1024, 16, 43, 0x13, 60, 1000 },
  3545. { 1024, 16, 60, 0x13, 60, 3500 },
  3546. { 1024, 16, 70, 0x13, 60, 3500 },
  3547. { 1024, 16, 75, 0x13, 60, 4000 },
  3548. { 1024, 16, 43, 0x13, 57, 1000 },
  3549. { 1024, 16, 60, 0x13, 57, 3500 },
  3550. { 1024, 16, 70, 0x13, 57, 3500 },
  3551. { 1024, 16, 75, 0x13, 57, 4000 },
  3552. { 1024, 8, 43, 0x00, 40, 1500 },
  3553. { 1024, 8, 43, 0x10, 40, 1500 },
  3554. { 1024, 8, 60, 0x00, 40, 2000 },
  3555. { 1024, 8, 60, 0x10, 40, 1200 },
  3556. { 1024, 8, 70, 0x00, 40, 3000 },
  3557. { 1024, 8, 70, 0x10, 40, 1500 },
  3558. { 1024, 8, 75, 0x00, 40, 3300 },
  3559. { 1024, 8, 75, 0x10, 40, 1500 },
  3560. { 1024, 8, 85, 0x00, 40, 4000 },
  3561. { 1024, 8, 85, 0x10, 40, 1700 },
  3562. { 1024, 8, 43, 0x03, 60, 1000 },
  3563. { 1024, 8, 43, 0x13, 60, 1000 },
  3564. { 1024, 8, 60, 0x03, 60, 3500 },
  3565. { 1024, 8, 60, 0x13, 60, 1300 },
  3566. { 1024, 8, 70, 0x03, 60, 4000 },
  3567. { 1024, 8, 70, 0x13, 60, 1500 },
  3568. { 1024, 8, 75, 0x03, 60, 4300 },
  3569. { 1024, 8, 75, 0x13, 60, 1700 },
  3570. { 1024, 8, 85, 0x03, 60, 4300 },
  3571. { 1024, 8, 85, 0x13, 60, 1700 },
  3572. { 1024, 8, 43, 0x03, 57, 1000 },
  3573. { 1024, 8, 43, 0x13, 57, 1000 },
  3574. { 1024, 8, 60, 0x03, 57, 3500 },
  3575. { 1024, 8, 60, 0x13, 57, 1300 },
  3576. { 1024, 8, 70, 0x03, 57, 4000 },
  3577. { 1024, 8, 70, 0x13, 57, 1500 },
  3578. { 1024, 8, 75, 0x03, 57, 4300 },
  3579. { 1024, 8, 75, 0x13, 57, 1700 },
  3580. { 1024, 8, 85, 0x03, 57, 4300 },
  3581. { 1024, 8, 85, 0x13, 57, 1700 },
  3582. { 800, 16, 60, 0x10, 40, 1000 },
  3583. { 800, 16, 72, 0x10, 40, 1200 },
  3584. { 800, 16, 75, 0x10, 40, 1500 },
  3585. { 800, 16, 85, 0x10, 40, 2000 },
  3586. { 800, 16, 60, 0x13, 60, 1000 },
  3587. { 800, 16, 72, 0x13, 60, 2000 },
  3588. { 800, 16, 75, 0x13, 60, 2000 },
  3589. { 800, 16, 85, 0x13, 60, 2000 },
  3590. { 800, 16, 60, 0x13, 57, 1000 },
  3591. { 800, 16, 72, 0x13, 57, 2000 },
  3592. { 800, 16, 75, 0x13, 57, 2000 },
  3593. { 800, 16, 85, 0x13, 57, 2000 },
  3594. { 800, 8, 60, 0x00, 40, 1100 },
  3595. { 800, 8, 60, 0x10, 40, 1000 },
  3596. { 800, 8, 72, 0x00, 40, 1400 },
  3597. { 800, 8, 72, 0x10, 40, 1000 },
  3598. { 800, 8, 75, 0x00, 40, 1700 },
  3599. { 800, 8, 75, 0x10, 40, 1000 },
  3600. { 800, 8, 85, 0x00, 40, 1800 },
  3601. { 800, 8, 85, 0x10, 40, 1200 },
  3602. { 800, 8, 60, 0x03, 60, 2000 },
  3603. { 800, 8, 60, 0x13, 60, 1000 },
  3604. { 800, 8, 72, 0x03, 60, 2600 },
  3605. { 800, 8, 72, 0x13, 60, 1000 },
  3606. { 800, 8, 75, 0x03, 60, 2600 },
  3607. { 800, 8, 75, 0x13, 60, 1000 },
  3608. { 800, 8, 85, 0x03, 60, 3000 },
  3609. { 800, 8, 85, 0x13, 60, 1000 },
  3610. { 800, 8, 60, 0x03, 57, 2000 },
  3611. { 800, 8, 60, 0x13, 57, 1000 },
  3612. { 800, 8, 72, 0x03, 57, 2600 },
  3613. { 800, 8, 72, 0x13, 57, 1000 },
  3614. { 800, 8, 75, 0x03, 57, 2600 },
  3615. { 800, 8, 75, 0x13, 57, 1000 },
  3616. { 800, 8, 85, 0x13, 57, 1000 },
  3617. { 640, 32, 60, 0x10, 40, 1000 },
  3618. { 640, 32, 72, 0x10, 40, 1300 },
  3619. { 640, 32, 75, 0x10, 40, 1500 },
  3620. { 640, 32, 85, 0x10, 40, 1800 },
  3621. { 640, 32, 60, 0x13, 60, 1000 },
  3622. { 640, 32, 72, 0x13, 60, 2000 },
  3623. { 640, 32, 75, 0x13, 60, 2000 },
  3624. { 640, 32, 85, 0x13, 60, 2000 },
  3625. { 640, 32, 60, 0x13, 57, 1000 },
  3626. { 640, 32, 72, 0x13, 57, 2000 },
  3627. { 640, 32, 75, 0x13, 57, 2000 },
  3628. { 640, 32, 85, 0x13, 57, 2000 },
  3629. { 640, 16, 60, 0x00, 40, 1000 },
  3630. { 640, 16, 60, 0x10, 40, 1000 },
  3631. { 640, 16, 72, 0x00, 40, 1000 },
  3632. { 640, 16, 72, 0x10, 40, 1000 },
  3633. { 640, 16, 75, 0x00, 40, 1300 },
  3634. { 640, 16, 75, 0x10, 40, 1000 },
  3635. { 640, 16, 85, 0x00, 40, 1800 },
  3636. { 640, 16, 85, 0x10, 40, 1000 },
  3637. { 640, 16, 60, 0x03, 60, 1150 },
  3638. { 640, 16, 60, 0x13, 60, 1000 },
  3639. { 640, 16, 72, 0x03, 60, 2200 },
  3640. { 640, 16, 72, 0x13, 60, 1000 },
  3641. { 640, 16, 75, 0x03, 60, 2200 },
  3642. { 640, 16, 75, 0x13, 60, 1000 },
  3643. { 640, 16, 85, 0x03, 60, 3000 },
  3644. { 640, 16, 85, 0x13, 60, 1000 },
  3645. { 640, 16, 60, 0x03, 57, 1150 },
  3646. { 640, 16, 60, 0x13, 57, 1000 },
  3647. { 640, 16, 72, 0x03, 57, 2200 },
  3648. { 640, 16, 72, 0x13, 57, 1000 },
  3649. { 640, 16, 75, 0x03, 57, 2200 },
  3650. { 640, 16, 75, 0x13, 57, 1000 },
  3651. { 640, 16, 85, 0x03, 57, 3000 },
  3652. { 640, 16, 85, 0x13, 57, 1000 },
  3653. { 640, 8, 60, 0x00, 40, 1000 },
  3654. { 640, 8, 60, 0x10, 40, 1000 },
  3655. { 640, 8, 72, 0x00, 40, 1000 },
  3656. { 640, 8, 72, 0x10, 40, 1000 },
  3657. { 640, 8, 75, 0x00, 40, 1000 },
  3658. { 640, 8, 75, 0x10, 40, 1000 },
  3659. { 640, 8, 85, 0x00, 40, 1000 },
  3660. { 640, 8, 85, 0x10, 40, 1000 },
  3661. { 640, 8, 60, 0x03, 60, 1000 },
  3662. { 640, 8, 60, 0x13, 60, 1000 },
  3663. { 640, 8, 72, 0x03, 60, 1300 },
  3664. { 640, 8, 72, 0x13, 60, 1000 },
  3665. { 640, 8, 75, 0x03, 60, 1500 },
  3666. { 640, 8, 75, 0x13, 60, 1000 },
  3667. { 640, 8, 85, 0x03, 60, 1000 },
  3668. { 640, 8, 85, 0x13, 60, 1000 },
  3669. { 640, 8, 60, 0x03, 57, 1000 },
  3670. { 640, 8, 60, 0x13, 57, 1000 },
  3671. { 640, 8, 72, 0x03, 57, 1300 },
  3672. { 640, 8, 72, 0x13, 57, 1000 },
  3673. { 640, 8, 75, 0x03, 57, 1500 },
  3674. { 640, 8, 75, 0x13, 57, 1000 },
  3675. { 640, 8, 85, 0x03, 57, 1000 },
  3676. { 640, 8, 85, 0x13, 57, 1000 },
  3677. { 1024, 16, 43, 0x10, 50, 1000 },
  3678. { 1024, 16, 43, 0x12, 60, 1000 },
  3679. { 1024, 16, 60, 0x10, 50, 2250 },
  3680. { 1024, 16, 60, 0x12, 60, 3500 },
  3681. { 1024, 16, 70, 0x10, 50, 2250 },
  3682. { 1024, 16, 70, 0x12, 60, 3500 },
  3683. { 1024, 16, 75, 0x10, 50, 2250 },
  3684. { 1024, 16, 75, 0x12, 60, 4000 },
  3685. { 1024, 8, 43, 0x00, 50, 1000 },
  3686. { 1024, 8, 43, 0x10, 50, 1000 },
  3687. { 1024, 8, 43, 0x02, 60, 1000 },
  3688. { 1024, 8, 43, 0x12, 60, 1000 },
  3689. { 1024, 8, 60, 0x00, 50, 3500 },
  3690. { 1024, 8, 60, 0x10, 50, 1300 },
  3691. { 1024, 8, 60, 0x02, 60, 3500 },
  3692. { 1024, 8, 60, 0x12, 60, 1300 },
  3693. { 1024, 8, 70, 0x00, 50, 4000 },
  3694. { 1024, 8, 70, 0x10, 50, 1500 },
  3695. { 1024, 8, 70, 0x02, 60, 4000 },
  3696. { 1024, 8, 70, 0x12, 60, 1500 },
  3697. { 1024, 8, 75, 0x00, 50, 4300 },
  3698. { 1024, 8, 75, 0x10, 50, 1700 },
  3699. { 1024, 8, 75, 0x02, 60, 4300 },
  3700. { 1024, 8, 75, 0x12, 60, 1700 },
  3701. { 1024, 8, 85, 0x00, 50, 4300 },
  3702. { 1024, 8, 85, 0x10, 50, 1700 },
  3703. { 1024, 8, 85, 0x02, 60, 4300 },
  3704. { 1024, 8, 85, 0x12, 60, 1700 },
  3705. { 800, 16, 60, 0x10, 50, 1000 },
  3706. { 800, 16, 60, 0x12, 60, 1000 },
  3707. { 800, 16, 72, 0x10, 50, 1600 },
  3708. { 800, 16, 72, 0x12, 60, 2000 },
  3709. { 800, 16, 75, 0x10, 50, 1000 },
  3710. { 800, 16, 75, 0x12, 60, 2000 },
  3711. { 800, 16, 85, 0x10, 50, 2000 },
  3712. { 800, 16, 85, 0x12, 60, 2000 },
  3713. { 800, 8, 60, 0x00, 50, 1300 },
  3714. { 800, 8, 60, 0x10, 50, 1000 },
  3715. { 800, 8, 60, 0x02, 60, 2000 },
  3716. { 800, 8, 60, 0x12, 60, 1000 },
  3717. { 800, 8, 72, 0x00, 50, 2300 },
  3718. { 800, 8, 72, 0x10, 50, 1000 },
  3719. { 800, 8, 72, 0x02, 60, 2600 },
  3720. { 800, 8, 72, 0x12, 60, 1000 },
  3721. { 800, 8, 75, 0x00, 50, 2300 },
  3722. { 800, 8, 75, 0x10, 50, 1000 },
  3723. { 800, 8, 75, 0x02, 60, 2600 },
  3724. { 800, 8, 75, 0x12, 60, 1000 },
  3725. { 800, 8, 85, 0x00, 50, 3000 },
  3726. { 800, 8, 85, 0x10, 50, 1000 },
  3727. { 800, 8, 85, 0x02, 60, 3000 },
  3728. { 800, 8, 85, 0x12, 60, 1000 },
  3729. { 640, 32, 60, 0x10, 50, 1000 },
  3730. { 640, 32, 60, 0x12, 60, 1000 },
  3731. { 640, 32, 72, 0x10, 50, 2000 },
  3732. { 640, 32, 72, 0x12, 60, 2000 },
  3733. { 640, 32, 75, 0x10, 50, 2000 },
  3734. { 640, 32, 75, 0x12, 60, 2000 },
  3735. { 640, 32, 85, 0x10, 50, 2000 },
  3736. { 640, 32, 85, 0x12, 60, 2000 },
  3737. { 640, 16, 60, 0x00, 50, 1000 },
  3738. { 640, 16, 60, 0x10, 50, 1000 },
  3739. { 640, 16, 60, 0x02, 60, 1150 },
  3740. { 640, 16, 60, 0x12, 60, 1000 },
  3741. { 640, 16, 72, 0x00, 50, 1000 },
  3742. { 640, 16, 72, 0x10, 50, 1000 },
  3743. { 640, 16, 72, 0x02, 60, 2200 },
  3744. { 640, 16, 72, 0x12, 60, 1000 },
  3745. { 640, 16, 75, 0x00, 50, 2300 },
  3746. { 640, 16, 75, 0x10, 50, 1000 },
  3747. { 640, 16, 75, 0x02, 60, 2200 },
  3748. { 640, 16, 75, 0x12, 60, 1000 },
  3749. { 640, 16, 85, 0x00, 50, 3000 },
  3750. { 640, 16, 85, 0x10, 50, 1000 },
  3751. { 640, 16, 85, 0x02, 60, 3000 },
  3752. { 640, 16, 85, 0x12, 60, 1000 },
  3753. { 640, 8, 60, 0x00, 50, 1000 },
  3754. { 640, 8, 60, 0x10, 50, 1000 },
  3755. { 640, 8, 60, 0x02, 60, 1000 },
  3756. { 640, 8, 60, 0x12, 60, 1000 },
  3757. { 640, 8, 72, 0x00, 50, 1000 },
  3758. { 640, 8, 72, 0x10, 50, 1000 },
  3759. { 640, 8, 72, 0x02, 60, 1300 },
  3760. { 640, 8, 72, 0x12, 60, 1000 },
  3761. { 640, 8, 75, 0x00, 50, 1000 },
  3762. { 640, 8, 75, 0x10, 50, 1000 },
  3763. { 640, 8, 75, 0x02, 60, 1500 },
  3764. { 640, 8, 75, 0x12, 60, 1000 },
  3765. { 640, 8, 85, 0x00, 50, 1000 },
  3766. { 640, 8, 85, 0x10, 50, 1000 },
  3767. { 640, 8, 85, 0x02, 60, 1000 },
  3768. { 640, 8, 85, 0x12, 60, 1000 },
  3769. { 0 } // Mark the end
  3770. };
  3771. /******************************************************************************
  3772. * Streams FIFO values for every mode.
  3773. *
  3774. *****************************************************************************/
  3775. K2TABLE K2FifoValue[] = {
  3776. { 1024, 16, 43, 0x10, 40, 0x04a10c },
  3777. { 1024, 16, 60, 0x10, 40, 0x04acc8 },
  3778. { 1024, 16, 70, 0x10, 40, 0x04acc8 },
  3779. { 1024, 16, 75, 0x10, 40, 0x04acc8 },
  3780. { 1024, 16, 85, 0x10, 40, 0x04acc8 },
  3781. { 1024, 16, 43, 0x13, 60, 0x00214c },
  3782. { 1024, 16, 60, 0x13, 60, 0x00214c },
  3783. { 1024, 16, 70, 0x13, 60, 0x00214c },
  3784. { 1024, 16, 75, 0x13, 60, 0x00214c },
  3785. { 1024, 16, 43, 0x13, 57, 0x00214c },
  3786. { 1024, 16, 60, 0x13, 57, 0x00214c },
  3787. { 1024, 16, 70, 0x13, 57, 0x00214c },
  3788. { 1024, 16, 75, 0x13, 57, 0x00214c },
  3789. { 1024, 8, 43, 0x00, 40, 0x00a10c },
  3790. { 1024, 8, 43, 0x10, 40, 0x04a10c },
  3791. { 1024, 8, 60, 0x00, 40, 0x00a10c },
  3792. { 1024, 8, 60, 0x10, 40, 0x04a10c },
  3793. { 1024, 8, 70, 0x00, 40, 0x00a14c },
  3794. { 1024, 8, 70, 0x10, 40, 0x04a10c },
  3795. { 1024, 8, 75, 0x00, 40, 0x01a10c },
  3796. { 1024, 8, 75, 0x10, 40, 0x04a10c },
  3797. { 1024, 8, 85, 0x00, 40, 0x00a10c },
  3798. { 1024, 8, 85, 0x10, 40, 0x04a14c },
  3799. { 1024, 8, 43, 0x03, 60, 0x00290c },
  3800. { 1024, 8, 43, 0x13, 60, 0x00190c },
  3801. { 1024, 8, 60, 0x03, 60, 0x00216c },
  3802. { 1024, 8, 60, 0x13, 60, 0x00214c },
  3803. { 1024, 8, 70, 0x03, 60, 0x00294c },
  3804. { 1024, 8, 70, 0x13, 60, 0x00214c },
  3805. { 1024, 8, 75, 0x03, 60, 0x00254c },
  3806. { 1024, 8, 75, 0x13, 60, 0x00214c },
  3807. { 1024, 8, 85, 0x03, 60, 0x00290c },
  3808. { 1024, 8, 85, 0x13, 60, 0x00250c },
  3809. { 1024, 8, 43, 0x03, 57, 0x00290c },
  3810. { 1024, 8, 43, 0x13, 57, 0x00190c },
  3811. { 1024, 8, 60, 0x03, 57, 0x00216c },
  3812. { 1024, 8, 60, 0x13, 57, 0x00214c },
  3813. { 1024, 8, 70, 0x03, 57, 0x00294c },
  3814. { 1024, 8, 70, 0x13, 57, 0x00214c },
  3815. { 1024, 8, 75, 0x03, 57, 0x00254c },
  3816. { 1024, 8, 75, 0x13, 57, 0x00214c },
  3817. { 1024, 8, 85, 0x03, 57, 0x00290c },
  3818. { 1024, 8, 85, 0x13, 57, 0x00250c },
  3819. { 800, 16, 60, 0x10, 40, 0x04a10c },
  3820. { 800, 16, 72, 0x10, 40, 0x04a14c },
  3821. { 800, 16, 75, 0x10, 40, 0x04a14c },
  3822. { 800, 16, 85, 0x10, 40, 0x04a14c },
  3823. { 800, 16, 60, 0x13, 60, 0x00290c },
  3824. { 800, 16, 72, 0x13, 60, 0x0030c8 },
  3825. { 800, 16, 75, 0x13, 60, 0x0030c8 },
  3826. { 800, 16, 85, 0x13, 60, 0x00250c },
  3827. { 800, 16, 60, 0x13, 57, 0x00290c },
  3828. { 800, 16, 72, 0x13, 57, 0x0030c8 },
  3829. { 800, 16, 75, 0x13, 57, 0x0030c8 },
  3830. { 800, 16, 85, 0x13, 57, 0x00250c },
  3831. { 800, 8, 60, 0x00, 40, 0x00a10c },
  3832. { 800, 8, 60, 0x10, 40, 0x04a10c },
  3833. { 800, 8, 72, 0x00, 40, 0x00a10c },
  3834. { 800, 8, 72, 0x10, 40, 0x04a14c },
  3835. { 800, 8, 75, 0x00, 40, 0x00a10c },
  3836. { 800, 8, 75, 0x10, 40, 0x04ad4c },
  3837. { 800, 8, 85, 0x00, 40, 0x00a10c },
  3838. { 800, 8, 85, 0x10, 40, 0x04a10c },
  3839. { 800, 8, 60, 0x03, 60, 0x00212c },
  3840. { 800, 8, 60, 0x13, 60, 0x00214c },
  3841. { 800, 8, 72, 0x03, 60, 0x00210c },
  3842. { 800, 8, 72, 0x13, 60, 0x00214c },
  3843. { 800, 8, 72, 0x13, 60, 0x00214c },
  3844. { 800, 8, 75, 0x03, 60, 0x00210c },
  3845. { 800, 8, 75, 0x13, 60, 0x00214c },
  3846. { 800, 8, 85, 0x03, 60, 0x00290c },
  3847. { 800, 8, 85, 0x13, 60, 0x00250c },
  3848. { 800, 8, 60, 0x03, 57, 0x00212c },
  3849. { 800, 8, 60, 0x13, 57, 0x00214c },
  3850. { 800, 8, 72, 0x03, 57, 0x00210c },
  3851. { 800, 8, 72, 0x13, 57, 0x00214c },
  3852. { 800, 8, 75, 0x03, 57, 0x00210c },
  3853. { 800, 8, 75, 0x13, 57, 0x00214c },
  3854. { 800, 8, 85, 0x03, 57, 0x00290c },
  3855. { 800, 8, 85, 0x13, 57, 0x00250c },
  3856. { 640, 32, 60, 0x10, 40, 0x04a14c },
  3857. { 640, 32, 72, 0x10, 40, 0x04a14c },
  3858. { 640, 32, 75, 0x10, 40, 0x04b4c8 },
  3859. { 640, 32, 85, 0x10, 40, 0x04acc8 },
  3860. { 640, 32, 60, 0x13, 60, 0x0028c8 },
  3861. { 640, 32, 72, 0x13, 60, 0x00190c },
  3862. { 640, 32, 75, 0x13, 60, 0x0028c8 },
  3863. { 640, 32, 85, 0x13, 60, 0x0028c8 },
  3864. { 640, 32, 60, 0x13, 57, 0x0028c8 },
  3865. { 640, 32, 72, 0x13, 57, 0x00190c },
  3866. { 640, 32, 75, 0x13, 57, 0x0028c8 },
  3867. { 640, 32, 85, 0x13, 57, 0x0028c8 },
  3868. { 640, 16, 60, 0x00, 40, 0x00990c },
  3869. { 640, 16, 60, 0x10, 40, 0x04a10c },
  3870. { 640, 16, 72, 0x00, 40, 0x00a10c },
  3871. { 640, 16, 72, 0x10, 40, 0x04a10c },
  3872. { 640, 16, 75, 0x00, 40, 0x00a10c },
  3873. { 640, 16, 75, 0x10, 40, 0x04a10c },
  3874. { 640, 16, 85, 0x00, 40, 0x00a10c },
  3875. { 640, 16, 85, 0x10, 40, 0x04a10c },
  3876. { 640, 16, 60, 0x03, 60, 0x00190c },
  3877. { 640, 16, 60, 0x13, 60, 0x00214c },
  3878. { 640, 16, 72, 0x03, 60, 0x00190c },
  3879. { 640, 16, 72, 0x13, 60, 0x001910 },
  3880. { 640, 16, 75, 0x03, 60, 0x00190c },
  3881. { 640, 16, 75, 0x13, 60, 0x001910 },
  3882. { 640, 16, 85, 0x03, 60, 0x00190c },
  3883. { 640, 16, 85, 0x13, 60, 0x00250c },
  3884. { 640, 16, 60, 0x03, 57, 0x00190c },
  3885. { 640, 16, 60, 0x13, 57, 0x00214c },
  3886. { 640, 16, 72, 0x03, 57, 0x00190c },
  3887. { 640, 16, 75, 0x03, 57, 0x00190c },
  3888. { 640, 16, 75, 0x13, 57, 0x001910 },
  3889. { 640, 16, 85, 0x03, 57, 0x00190c },
  3890. { 640, 16, 85, 0x13, 57, 0x00250c },
  3891. { 640, 8, 60, 0x00, 40, 0x009910 },
  3892. { 640, 8, 60, 0x10, 40, 0x049910 },
  3893. { 640, 8, 72, 0x00, 40, 0x009910 },
  3894. { 640, 8, 72, 0x10, 40, 0x049910 },
  3895. { 640, 8, 75, 0x00, 40, 0x00a10c },
  3896. { 640, 8, 75, 0x10, 40, 0x049910 },
  3897. { 640, 8, 85, 0x00, 40, 0x00a10c },
  3898. { 640, 8, 85, 0x10, 40, 0x049910 },
  3899. { 640, 8, 60, 0x03, 60, 0x00252c },
  3900. { 640, 8, 60, 0x13, 60, 0x001990 },
  3901. { 640, 8, 72, 0x03, 60, 0x00252c },
  3902. { 640, 8, 72, 0x13, 60, 0x00190c },
  3903. { 640, 8, 75, 0x03, 60, 0x00252c },
  3904. { 640, 8, 75, 0x13, 60, 0x001990 },
  3905. { 640, 8, 85, 0x03, 60, 0x00190c },
  3906. { 640, 8, 85, 0x13, 60, 0x00190c },
  3907. { 640, 8, 60, 0x03, 57, 0x00252c },
  3908. { 640, 8, 60, 0x13, 57, 0x001990 },
  3909. { 640, 8, 72, 0x03, 57, 0x00252c },
  3910. { 640, 8, 72, 0x13, 57, 0x00190c },
  3911. { 640, 8, 75, 0x03, 57, 0x00252c },
  3912. { 640, 8, 75, 0x13, 57, 0x001990 },
  3913. { 640, 8, 85, 0x03, 57, 0x00190c },
  3914. { 640, 8, 85, 0x13, 57, 0x00190c },
  3915. { 1024, 16, 43, 0x10, 50, 0x04a10c },
  3916. { 1024, 16, 43, 0x12, 60, 0x001510 },
  3917. { 1024, 16, 60, 0x10, 50, 0x04acc8 },
  3918. { 1024, 16, 60, 0x12, 60, 0x001510 },
  3919. { 1024, 16, 70, 0x10, 50, 0x04acc8 },
  3920. { 1024, 16, 70, 0x12, 60, 0x001510 },
  3921. { 1024, 16, 75, 0x10, 50, 0x04acc8 },
  3922. { 1024, 16, 75, 0x12, 60, 0x001510 },
  3923. { 1024, 16, 85, 0x10, 50, 0x04acc8 },
  3924. { 1024, 16, 85, 0x12, 60, 0x001510 },
  3925. { 1024, 8, 43, 0x00, 50, 0x00a10c },
  3926. { 1024, 8, 43, 0x02, 60, 0x01a90c },
  3927. { 1024, 8, 43, 0x10, 50, 0x04a10c },
  3928. { 1024, 8, 43, 0x12, 60, 0x001510 },
  3929. { 1024, 8, 60, 0x00, 50, 0x00a10c },
  3930. { 1024, 8, 60, 0x02, 60, 0x00216c },
  3931. { 1024, 8, 60, 0x10, 50, 0x04a14c },
  3932. { 1024, 8, 60, 0x12, 60, 0x00214c },
  3933. { 1024, 8, 70, 0x00, 50, 0x00a10c },
  3934. { 1024, 8, 70, 0x02, 60, 0x00294c },
  3935. { 1024, 8, 70, 0x10, 50, 0x04a14c },
  3936. { 1024, 8, 70, 0x12, 60, 0x00214c },
  3937. { 1024, 8, 75, 0x00, 50, 0x00a14c },
  3938. { 1024, 8, 75, 0x02, 60, 0x00254c },
  3939. { 1024, 8, 75, 0x10, 50, 0x04a14c },
  3940. { 1024, 8, 75, 0x12, 60, 0x00214c },
  3941. { 1024, 8, 85, 0x00, 50, 0x00a10c },
  3942. { 1024, 8, 85, 0x02, 60, 0x01a90c },
  3943. { 1024, 8, 85, 0x10, 50, 0x04a10c },
  3944. { 1024, 8, 85, 0x12, 60, 0x001510 },
  3945. { 800, 16, 60, 0x10, 50, 0x04a10c },
  3946. { 800, 16, 60, 0x12, 60, 0x00290c },
  3947. { 800, 16, 72, 0x10, 50, 0x04a10c },
  3948. { 800, 16, 72, 0x12, 60, 0x0030c8 },
  3949. { 800, 16, 75, 0x10, 50, 0x04a10c },
  3950. { 800, 16, 75, 0x12, 60, 0x0030c8 },
  3951. { 800, 16, 85, 0x10, 50, 0x04acc8 },
  3952. { 800, 16, 85, 0x12, 60, 0x00294c },
  3953. { 800, 8, 60, 0x00, 50, 0x00a12c },
  3954. { 800, 8, 60, 0x02, 60, 0x00212c },
  3955. { 800, 8, 60, 0x10, 50, 0x04990c },
  3956. { 800, 8, 60, 0x12, 60, 0x00214c },
  3957. { 800, 8, 72, 0x00, 50, 0x00a10c },
  3958. { 800, 8, 72, 0x02, 60, 0x00210c },
  3959. { 800, 8, 72, 0x10, 50, 0x04990c },
  3960. { 800, 8, 72, 0x12, 60, 0x00214c },
  3961. { 800, 8, 75, 0x00, 50, 0x00a10c },
  3962. { 800, 8, 75, 0x02, 60, 0x00210c },
  3963. { 800, 8, 75, 0x10, 50, 0x04990c },
  3964. { 800, 8, 75, 0x12, 60, 0x00214c },
  3965. { 800, 8, 85, 0x00, 50, 0x00a10c },
  3966. { 800, 8, 85, 0x02, 60, 0x01a90c },
  3967. { 800, 8, 85, 0x10, 50, 0x04990c },
  3968. { 800, 8, 85, 0x12, 60, 0x001990 },
  3969. { 640, 32, 60, 0x10, 50, 0x04a10c },
  3970. { 640, 32, 60, 0x12, 60, 0x0028c8 },
  3971. { 640, 32, 72, 0x10, 50, 0x04a10c },
  3972. { 640, 32, 72, 0x12, 60, 0x0038c8 },
  3973. { 640, 32, 75, 0x10, 50, 0x04a10c },
  3974. { 640, 32, 75, 0x12, 60, 0x0038c8 },
  3975. { 640, 32, 85, 0x10, 50, 0x04acc8 },
  3976. { 640, 32, 85, 0x12, 60, 0x0038c8 },
  3977. { 640, 16, 60, 0x00, 50, 0x00990c },
  3978. { 640, 16, 60, 0x02, 60, 0x00190c },
  3979. { 640, 16, 60, 0x10, 50, 0x04a10c },
  3980. { 640, 16, 60, 0x12, 60, 0x00214c },
  3981. { 640, 16, 72, 0x00, 50, 0x00990c },
  3982. { 640, 16, 72, 0x02, 60, 0x00190c },
  3983. { 640, 16, 72, 0x10, 50, 0x04a10c },
  3984. { 640, 16, 72, 0x12, 60, 0x00214c },
  3985. { 640, 16, 75, 0x02, 60, 0x00294c },
  3986. { 640, 16, 75, 0x10, 50, 0x04a10c },
  3987. { 640, 16, 75, 0x12, 60, 0x00214c },
  3988. { 640, 16, 85, 0x00, 50, 0x00a10c },
  3989. { 640, 16, 85, 0x02, 60, 0x00294c },
  3990. { 640, 16, 85, 0x10, 50, 0x04a10c },
  3991. { 640, 16, 85, 0x12, 60, 0x00214c },
  3992. { 640, 8, 60, 0x00, 50, 0x00990c },
  3993. { 640, 8, 60, 0x02, 60, 0x00252c },
  3994. { 640, 8, 60, 0x10, 50, 0x049910 },
  3995. { 640, 8, 60, 0x12, 60, 0x001990 },
  3996. { 640, 8, 72, 0x00, 50, 0x00990c },
  3997. { 640, 8, 72, 0x02, 60, 0x00252c },
  3998. { 640, 8, 72, 0x10, 50, 0x049910 },
  3999. { 640, 8, 72, 0x12, 60, 0x00190c },
  4000. { 640, 8, 75, 0x00, 50, 0x00990c },
  4001. { 640, 8, 75, 0x02, 60, 0x00252c },
  4002. { 640, 8, 75, 0x10, 50, 0x049910 },
  4003. { 640, 8, 75, 0x12, 60, 0x001990 },
  4004. { 640, 8, 85, 0x00, 50, 0x00990c },
  4005. { 640, 8, 85, 0x02, 60, 0x001990 },
  4006. { 640, 8, 85, 0x10, 50, 0x049910 },
  4007. { 640, 8, 85, 0x12, 60, 0x001990 },
  4008. { 0 } // Mark the end
  4009. };
  4010. /*****************************************************************************
  4011. * Generic S3 hard-wired mode-sets.
  4012. *
  4013. ****************************************************************************/
  4014. S3_VIDEO_FREQUENCIES GenericFixedFrequencyTable[] = {
  4015. { 8, 640, 60, 0, (ULONG_PTR)crtc911_640x60Hz, (ULONG_PTR)crtc801_640x60Hz, (ULONG_PTR)crtc928_640x60Hz, (ULONG_PTR)crtc864_640x60Hz },
  4016. { 8, 640, 72, 0xB, (ULONG_PTR)crtc911_640x70Hz, (ULONG_PTR)crtc801_640x70Hz, (ULONG_PTR)crtc928_640x70Hz, (ULONG_PTR)crtc864_640x70Hz },
  4017. { 8, 800, 60, 0x2, (ULONG_PTR)crtc911_800x60Hz, (ULONG_PTR)crtc801_800x60Hz, (ULONG_PTR)crtc928_800x60Hz, (ULONG_PTR)crtc864_800x60Hz },
  4018. { 8, 800, 72, 0x4, (ULONG_PTR)crtc911_800x70Hz, (ULONG_PTR)crtc801_800x70Hz, (ULONG_PTR)crtc928_800x70Hz, (ULONG_PTR)crtc864_800x70Hz },
  4019. { 8, 1024, 60, 0xD, (ULONG_PTR)crtc911_1024x60Hz, (ULONG_PTR)crtc801_1024x60Hz, (ULONG_PTR)crtc928_1024x60Hz, (ULONG_PTR)crtc864_1024x60Hz },
  4020. { 8, 1024, 72, 0xE, (ULONG_PTR)crtc911_1024x70Hz, (ULONG_PTR)crtc801_1024x70Hz, (ULONG_PTR)crtc928_1024x70Hz, (ULONG_PTR)crtc864_1024x70Hz },
  4021. { 16, 640, 60, 0, (ULONG_PTR)NULL, (ULONG_PTR)NULL, (ULONG_PTR)NULL, (ULONG_PTR)crtc864_640x60Hz_16bpp },
  4022. { 16, 640, 72, 0xB, (ULONG_PTR)NULL, (ULONG_PTR)NULL, (ULONG_PTR)NULL, (ULONG_PTR)crtc864_640x70Hz_16bpp },
  4023. { 16, 800, 60, 0x2, (ULONG_PTR)NULL, (ULONG_PTR)NULL, (ULONG_PTR)NULL, (ULONG_PTR)crtc864_800x60Hz_16bpp },
  4024. { 16, 800, 72, 0x4, (ULONG_PTR)NULL, (ULONG_PTR)NULL, (ULONG_PTR)NULL, (ULONG_PTR)crtc864_800x70Hz_16bpp },
  4025. { 16, 1024, 60, 0xD, (ULONG_PTR)NULL, (ULONG_PTR)NULL, (ULONG_PTR)NULL, (ULONG_PTR)crtc864_1024x60Hz_16bpp },
  4026. { 16, 1024, 72, 0xE, (ULONG_PTR)NULL, (ULONG_PTR)NULL, (ULONG_PTR)NULL, (ULONG_PTR)crtc864_1024x70Hz_16bpp },
  4027. { 0 } // Mark the end
  4028. };
  4029. /*****************************************************************************
  4030. * Orchid hard-wired mode-sets.
  4031. *
  4032. ****************************************************************************/
  4033. S3_VIDEO_FREQUENCIES OrchidFixedFrequencyTable[] = {
  4034. { 8, 640, 60, 0x0, (ULONG_PTR)crtc911_640x60Hz, (ULONG_PTR)crtc801_640x60Hz, (ULONG_PTR)crtc928_640x60Hz, (ULONG_PTR)NULL },
  4035. { 8, 640, 72, 0x2, (ULONG_PTR)crtc911_640x70Hz, (ULONG_PTR)crtc801_640x70Hz, (ULONG_PTR)crtc928_640x70Hz, (ULONG_PTR)NULL },
  4036. { 8, 800, 60, 0x4, (ULONG_PTR)crtc911_800x60Hz, (ULONG_PTR)crtc801_800x60Hz, (ULONG_PTR)crtc928_800x60Hz, (ULONG_PTR)NULL },
  4037. { 8, 800, 72, 0x6, (ULONG_PTR)crtc911_800x70Hz, (ULONG_PTR)crtc801_800x70Hz, (ULONG_PTR)crtc928_800x70Hz, (ULONG_PTR)NULL },
  4038. { 8, 1024, 60, 0x7, (ULONG_PTR)crtc911_1024x60Hz, (ULONG_PTR)crtc801_1024x60Hz, (ULONG_PTR)crtc928_1024x60Hz, (ULONG_PTR)NULL },
  4039. { 8, 1024, 72, 0xB, (ULONG_PTR)crtc911_1024x70Hz, (ULONG_PTR)crtc801_1024x70Hz, (ULONG_PTR)crtc928_1024x70Hz, (ULONG_PTR)NULL },
  4040. { 0 } // Mark the end
  4041. };
  4042. /*****************************************************************************
  4043. * Number 9 hard-wired mode-sets.
  4044. *
  4045. ****************************************************************************/
  4046. S3_VIDEO_FREQUENCIES NumberNine928NewFixedFrequencyTable[] = {
  4047. { 8, 640, 60, 25175000, (ULONG_PTR)crtc911_640x60Hz, (ULONG_PTR)crtc801_640x60Hz, (ULONG_PTR)crtc928_640x60Hz, (ULONG_PTR)NULL },
  4048. { 8, 640, 72, 31500000, (ULONG_PTR)crtc911_640x70Hz, (ULONG_PTR)crtc801_640x70Hz, (ULONG_PTR)crtc928_640x70Hz, (ULONG_PTR)NULL },
  4049. { 8, 800, 60, 40000000, (ULONG_PTR)crtc911_800x60Hz, (ULONG_PTR)crtc801_800x60Hz, (ULONG_PTR)crtc928_800x60Hz, (ULONG_PTR)NULL },
  4050. { 8, 800, 72, 50000000, (ULONG_PTR)crtc911_800x70Hz, (ULONG_PTR)crtc801_800x70Hz, (ULONG_PTR)crtc928_800x70Hz, (ULONG_PTR)NULL },
  4051. { 8, 1024, 60, 65000000, (ULONG_PTR)crtc911_1024x60Hz, (ULONG_PTR)crtc801_1024x60Hz, (ULONG_PTR)crtc928_1024x60Hz, (ULONG_PTR)NULL },
  4052. { 8, 1024, 72, 77000000, (ULONG_PTR)crtc911_1024x70Hz, (ULONG_PTR)crtc801_1024x70Hz, (ULONG_PTR)crtc928_1024x70Hz, (ULONG_PTR)NULL },
  4053. { 8, 1280, 60, 55000000, (ULONG_PTR)NULL, (ULONG_PTR)NULL, (ULONG_PTR)crtc928_1280x60Hz, (ULONG_PTR)NULL },
  4054. { 8, 1280, 72, 64000000, (ULONG_PTR)NULL, (ULONG_PTR)NULL, (ULONG_PTR)crtc928_1280x70Hz, (ULONG_PTR)NULL },
  4055. { 0 } // Mark the end
  4056. };
  4057. #if defined(ALLOC_PRAGMA)
  4058. #pragma data_seg()
  4059. #endif