home *** CD-ROM | disk | FTP | other *** search
/ Power-Programmierung / CD2.mdf / doc / graphdoc / cirrus.txt < prev    next >
Text File  |  1994-01-18  |  76KB  |  1,957 lines

  1.   Cirrus Logic  CL-GD 500/600
  2.  
  3.     CL-GD 510/520     Flat Panel/LCD
  4.     CL-GD 610/620     Flat Panel/LCD
  5.  
  6.     CL-GD 5320
  7.  
  8. The 64xx Flat Panel family:
  9.  
  10.     CL-GD 5410
  11.     CL-GD 6410        Flat Panel LCD 256k no banks.
  12.     CL-GD 6420        Flat Panel/LCD 512k/1M?
  13.     CL-GD 6412
  14.     CL-GD 6416
  15.     CL-GD 6440
  16.     CL-GD 6450
  17.  
  18. The 54xx Super VGA family:
  19.  
  20.     CL-GD 5401        AVGA 1. No banks
  21.     CL-GD 5402        AVGA 2.
  22. Note: the 5401 and 5402 are sometimes sold as the Acumos AVGA1 and 2.
  23.     CL-GD 6205
  24.     CL-GD 6215
  25.     CL-GD 6225
  26.  
  27.     CL-GD 5420
  28.     CL-GD 5422        1024x768x256.
  29.     CL-GD 5424
  30.     CL-GD 5426        Up to 2MB. Accelerated version of 5422. BitBLT
  31.     CL-GD 5428        Newer version of 5426  
  32.     CL-GD 5434        Next generation 64bit chip
  33. The 54xx series has a built in RAMDAC. 8 bit for the 5401/5402, 15/16bit for
  34. the 5420 and 15/16/24 bit for the 5422 and up.
  35.  
  36.  
  37. Other Chips:
  38.     CL-GD 6340        LCD Panel Driver
  39.  
  40.  
  41.  
  42. The 5xx/6xx Flat Panel family:
  43. This family strongly resembles the early Video 7 chips. Apparently Cirrus
  44. supplied at least one of the early Video 7 chips (Video7 OEM).
  45.  
  46. 3C4h index  6  (W):
  47. bit 0-7  Writing ("Eagle ID" rol 4) will disable extensions.
  48.          Writing "Eagle ID" will enable.
  49.          Reading will return 0 if extensions are disabled, 1 if enabled
  50. The "Eagle ID" is read from 3d4h index 1Fh
  51.  
  52. 3C4h index 80h (R/W):  Miscellaneous Control 1
  53.  
  54. 3C4h index 81h (R/W):  Graphics Position 1
  55.  
  56. 3C4h index 82h (R/W):  Graphics Position 2
  57.  
  58. 3C4h index 83h (R/W):  Attribute Controller Index
  59.  
  60. 3C4h index 84h (R/W):  Write Control
  61.  
  62. 3C4h index 85h (R/W):  Timing Control
  63.  
  64. 3C4h index 86h (R/W):  Bandwidth Control
  65.  
  66. 3C4h index 87h (R/W):  Miscellaneous Control 2
  67.  
  68. 3C4h index 88h (R/W):  Horizontal Sync skew
  69.  
  70. 3C4h index 89h (R/W):  CGA, HGC Font Control
  71.  
  72. 3C4h index 8Ah (R/W):  Reserved
  73.  
  74. 3C4h index 8Bh (R/W):  Screen B preset row scan
  75.  
  76. 3C4h index 8Ch (R/W):  Screen B start address high
  77.  
  78. 3C4h index 8Dh (R/W):  Screen B start address low
  79.  
  80. 3C4h index 8Eh (R):  Version Code
  81.  
  82. 3C4h index 8Fh (R):  Version Code
  83.  
  84. 3C4h index 90h (R/W):  Vertical Retrace Start
  85.  
  86. 3C4h index 91h (R/W):  Vertical Retrace End
  87.  
  88. 3C4h index 92h (R/W):  Lightpen High
  89.  
  90. 3C4h index 93h (R/W):  Lightpen Low
  91.  
  92. 3C4h index 94h (R/W):  Pointer Pattern Address High
  93.  
  94. 3C4h index 95h (R/W):  Cursor Height Adjust
  95.  
  96. 3C4h index 96h (R/W):  Caret Width
  97.  
  98. 3C4h index 97h (R/W):  Caret Height
  99.  
  100. 3C4h index 98h (R/W):  Caret Horizontal Position High
  101.  
  102. 3C4h index 99h (R/W):  Caret Horizontal Position Low
  103.  
  104. 3C4h index 9Ah (R/W):  Caret Vertical Position High
  105.  
  106. 3C4h index 9Bh (R/W):  Caret Vertical Position Low
  107.  
  108. 3C4h index 9Ch (R/W):  Pointer Horizontal Position High
  109.  
  110. 3C4h index 9Dh (R/W):  Pointer Horizontal Position Low
  111.  
  112. 3C4h index 9Eh (R/W):  Pointer Vertical Position High
  113.  
  114. 3C4h index 9Fh (R/W):  Pointer Vertical Position Low
  115.  
  116. 3C4h index A0h (R/W):  Graphics Controller Memory Latch 0
  117.  
  118. 3C4h index A1h (R/W):  Graphics Controller Memory Latch 1
  119.  
  120. 3C4h index A2h (R/W):  Graphics Controller Memory Latch 2
  121.  
  122. 3C4h index A3h (R/W):  Graphics Controller Memory Latch 3
  123.  
  124. 3C4h index A4h (R/W):  Clock Select
  125.  
  126. 3C4h index A5h (R/W):  Cursor (Caret and pointer) Attribute
  127.  
  128. 3C4h index A6h (R/W):  Internal Switch Source
  129.  
  130. 3C4h index A7h (R/W):  Status Switch Control
  131.  
  132. 3C4h index A8h (R/W):  NMI Mask 1
  133.  
  134. 3C4h index A9h (R/W):  NMI Mask 2
  135.  
  136. 3C4h index AAh (R/W):  Reserved
  137.  
  138. 3C4h index ABh (R):  NMI Status 1
  139.  
  140. 3C4h index ACh (R):  NMI Status 2
  141.  
  142. 3C4h index ADh (R/W):  256 Color mode Page Control
  143.  
  144. 3C4h index AEh (R):  NMI data cache (Four 24 bit words)
  145.  
  146. 3C4h index AFh (R/W):  Active Adapter State
  147.  
  148. 3C4h index B0h..BFh (R/W):  Scratch Registers
  149.  
  150. 3C4h index C0h..FFh (R/W):  Reserved
  151.  
  152. 3d4h index  Ch (R/W):  Screen A start address Hi
  153. Must be cleared before the Eagle ID Register (3d4h index 1Fh) can be read.
  154.  
  155. 3d4h index 1Fh (R):  Eagle ID register
  156. bit 0-7  Eagle ID.  Used for test of 3C4h index 6.
  157.          Reading this register will return the content of 3d4h index 0Ch XORed
  158.          with the Eagle ID value.
  159.          ECh for CL-GD 510/520, CAh for 610/620. EAh for Video7 boards.
  160.  
  161. Memory locations:
  162.  
  163. $C000:$6  2 bytes  'CL'  if Cirrus Bios
  164.  
  165.   Modes for the CL-GD510/520:
  166.  
  167.   40h T  100   30
  168.   41h T  100   50
  169.   42h T  100   60
  170.   50h T  132   30
  171.   51h T  132   50
  172.   52h T  132   60
  173.   53h T   80   60
  174.   62h G  640  450  16
  175.   63h G  720  540  16
  176.   64h G  800  600  16
  177.  
  178.  
  179.   Other sources claim:
  180.  
  181.   15h T  132   25   2 (8x14)
  182.   16h T  132   44   2 (8x8)
  183.   18h T  132   30   2 (8x)
  184.   1Eh T  132   25  16 (8x8)
  185.   1Fh T  132   25  16 (8x14)
  186.   20h T  132   44  16 (8x8)
  187.   22h T  132   30  16 (8x)
  188.   31h T  100   37   2
  189.   40h G  720  540  16 PL4
  190.   50h G  640  400 256 packed
  191.   51h G  512  480 256 packed    Note: not supported in all Bios'es
  192.   63h G  720  540  16 PL4
  193.   64h G  800  600  16 PL4
  194.   6Ah G  800  600  16 PL4
  195.  
  196.   Mode 50h and 51h use a special system where four pixels are stored at the
  197.   same byte address in plane 0,1,2 and 3 respectively.
  198.  
  199.  
  200.  
  201.  
  202.  
  203. GD5410, 64xx series:
  204.  
  205. 3CEh index 0Ah (R/W):  Enable Extension
  206. bit  0-7  Write ECh to enable extensions, CEh to disable.
  207.           Reads as 1 if enabled, 0 if not.
  208.  
  209. 3CEh index 0Bh (R/W):  Attribute Controller Index (ARX) r/w with toggle
  210. bit  0-4  Attribute Register Index
  211.        5  Enable Video
  212.        7  Toggle ARX to Data
  213.  
  214. 3CEh index 0Ch (R/W):  CR11 bit 7 at Extension
  215. bit    7  Write Protect 3d4h index 0-7.
  216.  
  217. 3CEh index 0Dh (R/W):  CPU Base Address Control                     (not 6410)
  218. bit    0  Enable Page Remapping
  219.        1  Enable 64K Remapping page size if set, 32K if clear
  220.        2  If set use 3CEh index 0Eh for reads and index 0Fh for writes.
  221.           if clear both reads and writes use index 0Eh.
  222.        4  (6440) Enable Linear Addressing
  223.        7  (not 6440) Enable I/O Ext Addr Remapping
  224.  
  225. 3CEh index 0Eh (R/W):  CPU Base Address Mapping Register A          (not 6410)
  226. bit  0-7  Bank number in 4K units. If 3CEh index 0Dh bit 2 is set this
  227.           register is only used for reads, if clear this register is used for
  228.           both reads and writes.
  229.  
  230. 3CEh index 0Fh (R/W):  CPU Base Address Mapping Register B          (not 6410)
  231. bit  0-7  Bank number in 4K units. If 3CEh index 0Dh bit 2 is set this
  232.           register is used for writes.
  233.  
  234. 3CEh index 34h (R/W):  Cursor Location Extension                   (5410 only)
  235. bit  0-3  Cursor Location Address bit 16-19
  236.  
  237. 3CEh index 60h (R/W):  Horizontal Total Extension
  238. bit  0-7  Bit 8 is in 3CEh index 64h bit 5.
  239.  
  240. 3CEh index 61h (R/W):  Horizontal Blank Start Extension
  241. bit  0-7  Bit 8 is in 3CEh index 62h bit 7.
  242.  
  243. 3CEh index 62h (R/W):  Horizontal Blank End Extension
  244. bit  0-4  Horizontal Blank End Extension
  245.        7  Horizontal Blank Start Extension bit 8. Bits 0-7 are in index 61h.
  246.  
  247. 3CEh index 63h (R/W):  Horizontal Retrace Start Extension
  248. bit  0-7  Bit 8 is in 3CEh index 64h bit 6.
  249.  
  250. 3CEh index 64h (R/W):  Horizontal Retrace End Extension
  251. bit  0-4  Horizontal Retrace End Extension
  252.        5  Horizontal Total Extension bit 8. Bits 0-7 are in index 60h.
  253.        6  Horizontal Retrace Start Extension bit 8. Bits 0-7 are in index 63h.
  254.        7  Horizontal Blank End bit 8. Bits 0-7 are in index 62h.
  255.  
  256. 3CEh index 70h (R/W):  Vertical Total Extension
  257. bit  0-7  Bits 8-10 are in index 78h and 79h
  258.  
  259. 3CEh index 71h (R/W):  Vertical Display Enable Extension
  260. bit  0-7  Bits 8-10 are in index 78h and 79h
  261.  
  262. 3CEh index 72h (R/W):  Vertical Blank Start Extension
  263. bit  0-7  Bits 8-10 are in index 78h and 79h.
  264.  
  265. 3CEh index 73h (R/W):  Vertical Blank End Extensions
  266. bit  0-7  Bit 8 is in index 78h
  267.  
  268. 3CEh index 74h (R/W):  Vertical Retrace Start Extension
  269. bit  0-7  Bits 8-10 are in index 78h and 79h.
  270.  
  271. 3CEh index 75h (R/W):  Vertical Retrace End Extension
  272. bit  0-3
  273.  
  274. 3CEh index 78h (R/W):  CR07 Extension
  275. bit    0  Vertical Total bit 8. Bits 0-7 are in index 70h
  276.        1  Vertical Display Enable bit 8. Bits 0-7 are in index 71h
  277.        2  Vertical Retrace Start bit 8. Bits 0-7 are in index 74h
  278.        3  Vertical Blank Start bit 8. Bits 0-7 are in index 72h
  279.        4  Line Compare bit 8.
  280.        5  Vertical Total bit 9
  281.        6  Vertical Display Enable bit 9.
  282.        7  Vertical Retrace Start bit 9
  283.  
  284. 3CEh index 79h (R/W):  Vertical Overflow beyond CR07
  285. bit    0  Vertical Total bit 10
  286.        1  Vertical Display Enable bit 10
  287.      2-3  Vertical Blank Start bit 9-10.
  288.        4  Vertical Retrace Start bit 10
  289.  
  290. 3CEh index 7Ah (R/W):  Coarse Vertical Retrace Skew for Interlaced
  291. bit  0-7  Coarse Vertical Retrace Skew for Interlaced Odd Fields in
  292.           Character Clock Periods.
  293.  
  294. 3CEh index 7Bh (R/W):  Fine Vertical Retrace Skew
  295. bit  0-1  Fine Vertical Retrace Skew for Interlaced Odd Fields in Dot Clock
  296.           Periods
  297.  
  298. 3CEh index 7Ch (R/W):  Start Address Extension
  299. bit  0-3  Screen A Start Address Extension bits 16-19
  300.  
  301. 3CEh index 80h (R/W):  H/V Retrace Polarity Control                 (not 5410)
  302. bit    1  (6440) Interlaced Mode Enable
  303.        2  (6440) Double Character Clock for Horizontal Parameters
  304.        4  Enable Expanded Graphics
  305.        5  H/V Polarity Source Control
  306.        6  Horizontal Retrace Polarity
  307.        7  Vertical Retrace Polarity
  308.  
  309. 3CEh index 81h (R/W):  Display Mode                                 (not 6440)
  310. bit    0  (not 5410) Select LCD Display if set, CRT if clear
  311.        2  (6420,5410) Interlaced Mode Enable
  312.        3  (not 5410) Enable CL-GD6340 Mode
  313.        4  (not 5410) Select Single Scan Panel
  314.        5  (not 5410) Enable AutoMAP
  315.        7  (not 5410) Enable Simulscan
  316.  
  317. 3CEh index 82h (R/W):  Character Clock
  318. bit  0-2  Character Clock Width. 1: 8pixels, 2:4pixels
  319.        3  Disable SR1[0] functionality ??
  320.      5-6  (5410) 0: 2 CRT-clkin, 1: 1, 2: 4
  321.        7  (6440) Enable Internal Divided by 2 (for Pixel Doubling)
  322.  
  323. 3CEh index 83h (R/W):  Write Control
  324. bit    0  CRTC Vertical Parameters Write Protect
  325.            3d4h index 6, 7 (bit 0,2,3,5,7), 9 bit 5, 10h, 11h bit 0-3,
  326.            15h, 16h
  327.        1  (6440) Horizontal Parameters Write Protect
  328.           (not 6440) CRTC Display Timing Effect Write Protect
  329.                      3d4h index 7 (bit 1,6), 9, 0Ah, 0Bh, 12h, 14h
  330.        2  (not 6440) CRTC Vertical Display End Effect Protect
  331.                      3d4h index 12h, 7 (bits 1,6)
  332.        3  (not 6440) CRTC Blank Effect Protect
  333.                      3d4h index 2, 3 bits 0-3, 5 bit 7, 7 bit 3, 9 bit 5,
  334.                       15h, 16h
  335.        4  (not 6440) CRTC Total/Retrace Effect Protect
  336.        6  (not 6440) Attribute Registers Write Protect (3C0h index 0-0Fh).
  337.  
  338. 3CEh index 84h (R/W):  Clock Select                                 (not 6440)
  339. bit    1  (not 5410) Clock In Divide by 2 if set.
  340.      2-5  Clock Select
  341.        7  Select bit 2-3 as clock bit 0-1 rather than 3C2h bit 2-3.
  342.  
  343. 3CEh index 85h (R/W):  Virtual Switch Source                       (5410 only)
  344.      0-3  VGA Internal Switches for Analog Monitor
  345.        4  Enable Virtual Switches
  346.  
  347. 3CEh index 86h (R/W):  CRTC Test
  348. bit  1-3  (5410) CRTC Test Bits
  349.        4  CRTC Outputs Three-State Control
  350.        5  (6412,40) HSYNC, VSYNC Disable if set
  351.  
  352. 3CEh index 87h (R/W):  CRTC Spare Extension      (Rev B only)
  353. bit    1  (6412) PVSYNC Configuration
  354.                   Pin 82:    bit 4:    bit 1:    index 8Fh bit 4:
  355.                   LFS          0         0              0
  356.                   FPVDE        0         0              1
  357.                   VDE*         1         0              x
  358.                   PVSYNC       0         1              x
  359.        3  (6412) Enable Short VSYNC Total
  360.        4  (NOT 5410) VDE*/LFS Configuration on pin 99.
  361.                If set pin 99 is VDE*, if clear pin 99 is LFS
  362.        6  (6412) Enable short HTOT (HDE+7)
  363.        7  (6412) Enable short VTOT (VDE+4)
  364.           (6410,20) Invert VDE* Polarity on pin 99
  365.      6-7  (5410) Interlace Test 0-1
  366.  
  367. 3CEh index 8Fh (R/W):  CRTC BIOS Configuration                      (not 6440)
  368. bit  0-1  Clock Select Pin-out Configuration
  369.        2  (6412) If set SUSPEND* input, if clear FRA8 input
  370.        3  (6412) If set VDCLK I/O output, if clear FPVDCLK
  371.        4  (6412) If set FPVDE output, if clear LFS output
  372.        5  (6412) SUSPEND* pin Configuration. SUSPEND* if set, FRA8 if clear
  373.        6  (6412) Frame Accelerator Control bit. Set if the system power down
  374.                  the Frame Accelerator DRAM
  375.        7  (6412,20) Enable Retrace Line Clocks
  376.  
  377. 3CEh index 90h (R/W):  VMC Control
  378. bit    0  Scan Line Double Control
  379.        1  RAS* Precharge. Extended if clear, normal if set
  380.        2  (5410) DMC2
  381.        3  Display Memory Refresh Control Extension
  382.      5-6  (5410) DMC5-6
  383.        6  (6410 rev B,6420) Power Sequencing Status Bit.
  384. Note: The undefined bits should be set to 0 when writing this register.
  385.  
  386. 3CEh index 91h (R/W):  CRT Circular Buffer Policy Selection
  387. bit  6-7  (R)  Reserved
  388. Note: The undefined bits should be set to 0 when writing this register.
  389.  
  390. 3CEh index 92h (R/W):  Font Control
  391. bit  0-1  Font Control Address Extension
  392.        3  (6410,20) Enable Software Expanded Text
  393.        5  (not 5410) Enable Full Height Cursor
  394.        6  (not 5410) Text Expansion Method Select
  395.        7  (not 5410) Enable Hardware Expanded Text
  396.  
  397. 3CEh index 93h (R/W):  Full Frame-Accelerator Bottom Half Start         (6440)
  398. bit  0-7  Bottom Half Start Address
  399.  
  400. 3CEh index 93h (R/W):  CPU Interface Test Register                      (5410)
  401. bit  6-7  CTR6-7
  402.  
  403. 3CEh index 94h (R/W):  Full Frame-Accelerator Misc. Control 1           (6440)
  404. bit    0  Frame Accelerator Selection. Full if set, Half if clear
  405. Note: The undefined bits should be set to 0 when writing this register.
  406.  
  407. 3CEh index 95h (R/W):  CRTC Circular Buffer Delta and Burst
  408. bit  0-3  Delta number
  409.      4-7  Burst number
  410.  
  411. 3CEh index 96h (R/W):  Display Memory Control Test Register
  412. bit    0  Latch Monitor ID
  413.        1  (6420) Frame Accelerator Three-State control
  414.           (6440,5410) Video Memory Data M1D, M3D Three-State Control
  415.        2  Video Memory Data M0D, M2D Three-State control
  416.        3  Video Memory & Address Three-State control
  417.        4  (5410) Disable Fast-Page Mode
  418. Note: The undefined bits should be set to 0 when writing this register.
  419.  
  420. 3CEh index 97h (R/W):  Monitor Switches Read Back 
  421. bit    0  (6440) 14MHz Clock Source
  422.      3-7  (6440) Reserved for BIOS
  423.      4-7  (not 6440,5410) Panel Type Switches
  424.        7  (5410) Interlace
  425.  
  426. 3CEh index 98h (R/W):  Scratch
  427. bit  0-7
  428.  
  429. 3CEh index 99h (R/W):  Pull Up/Down Configuration
  430. bit    0  BIOS address. C000h if clear, E000h if set
  431.        1  (5410) CPU Bus Type. 0: ISA, 1: MCA
  432.      1-2  (6440) CPU Bus Type. 0: Local Bus, 1: PI bus, 2: ISA bus
  433.        2  (not 6440) Disable VGA address space
  434.        3  Sleep at 46E8h if set, 3C3h if clear
  435.        4  BIOS is 16bit if set, 8bit if clear
  436.        5  (6440) VGA Address space
  437.        6  (6440) Disable ST100 Effect
  438.        7  (6440) CPU clock select/ISA I/O select
  439.  
  440. 3CEh index 9Ah (R/W):  Video Memory Configuration
  441. bit  0-7  (not 6440,5410) Reserved. should be programmed to 0.
  442.      0-2  (6440) Memory Width
  443.      6-7  (5410) RAMDAC Select 0-1
  444.  
  445. 3CEh index 9Bh (R/W):  Miscellaneous Pin Configuration
  446. bit    0  Enable Sequencer Clock (SQCLK) inversion
  447.        1  On Chip Monitor Sense Enable if set, disable if clear
  448.      3-4  (not 6440,5410) INTERNAL/MOD Pin Configuration.
  449.                            0: INTERNAL, 1: MODULATION
  450.      5-6  (not 6440,5410) LLCLK/DE Configuration.
  451.                       0: LLCLK, 1: DE (for GD6340),
  452.                       3: Pins 98/99=PHSYNC/PVSYNC
  453.        7  (6412) Paged BIOS Disable.
  454.                  If set pins 62-64 are TIMER*, PO1 and SSCLK
  455.                  if clear pins 62-64 are BIOS address bit 13-15
  456. Note: The undefined bits should be set to 0 when writing this register.
  457.  
  458. 3CEh index 9Ch (R/W):  PS/2 Monitor ID Read-back
  459. bit  5-7  Monitor ID. 2: 8514, 5: 8503, 6: 8512/8513, 7: no monitor
  460.  
  461. 3CEh index 9Dh (R/W):  Miscellaneous Configuration 2               (6412 only)
  462. bit    0  FPVDCLK Delay. If set delay FPVDCLK by 1/2 Video Clock (VDCLK)
  463.        1  Select OE* Delay. If set OE* is delayed by one Memory Clock (SQCLK)
  464.        6  5v/3v Monitor Sense Select. 5V if set, 3.3V if clear
  465.        7  Select OSC as SQCLK.
  466.           If set SQCLK is derived from OSC, if clear from an input
  467.  
  468. 3CEh index 9Dh (R/W):  Configuration 1 Register                    (5410 only)
  469. bit  0-1  Bus Type
  470.        6  Use External SQCLK Synthesizer
  471.        7  Use External VDCLK Synthesizer
  472.  
  473. 3CEh index 9Eh (R/W):  Frame-Accelerator Even Frame Start Addr          (6440)
  474. bit  0-7  Frame-Accelerator Even Frame Start Address
  475.  
  476. 3CEh index 9Eh (R/W):  Display Memory Configuration High                (5410)
  477. bit  0-2  SQCLK Frequency
  478.      3-4  DRAM Width
  479.      5-7  DRAM Depth
  480.  
  481. 3CEh index 9Fh (R/W):  Frame-Accelerator Odd Frame Start Addr           (6440)
  482. bit  0-7  Frame-Accelerator Odd Frame Start Address
  483.  
  484. 3CEh index 9Fh (R/W):  Display Memory Configuration Low                 (5410)
  485. bit    0  DMCR0
  486.      1-3  Display Memory Bus Width
  487.      4-6  Display Memory Bus Depth
  488.  
  489. 3CEh index A0h (R/W):  Bus Interface Unit Control
  490. bit    0  Disable BIOS ROM
  491.        1  Disable Sleep Mechanism
  492.        2  (not 5410) Enable Write Protect RAMDAC
  493.        3  MEMCS16* Mode Select
  494.        4  Enable 16bit Memory
  495.        5  (6440) Enable 16bit I/O
  496.        6  (5410) Enable 16bit I/O
  497.           (not 5410) Disable CPU Address Scramble
  498.        7  (5410) Enable 16bit Interface in Planar Modes
  499.  
  500. 3CEh index A1h (R/W):  Three-State & Test Control
  501. bit    3  All other Output & I/O pins Three-State Control
  502.        5  If set the CRTC Offset (3d4h index 13h) and Display Start Address
  503.           (3d4h index 0Ch,0Dh).are multiplied with 4.
  504.           Set in extended 256color modes.
  505.        7  (not 5410) Disable I/O Read
  506. Note: The undefined bits should be set to 0 when writing this register.
  507.  
  508. 3CEh index A2h (R/W):  BIOS Page Selection                          (not 5410)
  509. bit  0-2  Select ROM BIOS Page
  510.  
  511. 3CEh index A6h (R/W):  Wait State Controls
  512. bit    0  Disable Memory Write Wait State Control
  513.        1  Disable I/O Read Wait State
  514.        2  Enable 0 Wait State for Memory Write
  515.        3  (not 6440) Disable RAMDAC I/O Wait State
  516.        4  Disable I/O Write Wait State
  517.        6  (not 5410) BIOS Wait-State Control. 0 Wait States if set
  518.        7  (R) Bus width Status Bit. 16bit if set, 8bit if clear
  519.  
  520. 3CEh index A7h (R/W):  General Programmable I/O Port Control        (not 5410)
  521. bit    0  (6440) Output pin PO0 Control
  522.        1  Output pin PO1 control
  523.        2  (6410,20,40) Output pin PO2 Control
  524.        3  (6440) Output pin PO3 Control
  525.        4  (6440) Write Protect 3CEh index 0Dh
  526.        6  (6440) Enable PO[3:0]
  527.  
  528. 3CEh index A9h (R/W):  Bus Interface Unit Cache Control
  529. bit    0  (5410) Enable Read from Write FIFO
  530.        1  Enable Cache Read
  531.        2  (6440,5410) Enable Write Plane-Select Compaction in Write Mode 0
  532.        3  (6410,12,5410) Enable Write-Overwrite Compaction in modes 2,3
  533.        4  (5410) Enable 16bit Peripheral in Planar Modes
  534.      5-6  Internal BIU Timing to control delays
  535.  
  536. 3CEh index AAh (R/W):  Design Revision
  537. bit  0-3  Design Revision
  538.      4-7  Design ID (Major version):
  539.             4:  CL-GD6440
  540.             5:  CL-GD6412
  541.             6:  CL-GD5410
  542.             7:  CL-GD6420
  543.             8:  CL-GD6410
  544.  
  545. 3CEh index ABh (R/W):  Mask Revision                                (not 5410)
  546. bit  0-7
  547.  
  548. 3CEh index AEh (R/W):  Alternate Extension Decode High        (5410,6412 only)
  549. bit  0-7  Bits 8-15 of the value. Bits 0-7 are in index AFh
  550.  
  551. 3CEh index AEh (R/W):  Color Expansion Pixel Mask                  (6440 only)
  552. bit  0-7  
  553.  
  554. 3CEh index AFh (R/W):  Alternate Extension Decode Low         (5410,6412 only)
  555. bit  0-7  Bits 0-7 of the value. Bits 8-15 are in index AEh
  556.  
  557. 3CEh index B0h (R/W):  Color Expansion Control                     (6440 only)
  558. bit    0  Enable Color Expansion
  559.        1  Enable by 8 Address Mode
  560.        2  Write Mode 4/5 Control
  561.        4  Enable Enhanced Writes for 16bit pixels
  562.  
  563. 3CEh index B1h (R/W):  Linear Address Map                          (6440 only)
  564. bit  0-3  Linear Address Map
  565.  
  566. 3CEh index B2h W(R/W):  Foreground Color for Color Expansion       (6440 only)
  567. bit 0-15  Foreground color for color expansion
  568.  
  569. 3CEh index B4h W(R/W):  Background Color for Color Expansion       (6440 only)
  570. bit 0-15
  571.  
  572. 3CEh index BAh (R/W):  Scratch Pad 0
  573. bit  0-7
  574.  
  575. 3CEh index BBh (R/W):  Scratch Pad 1
  576. bit  6-7  Video Memory:  0: 256K, 1: 512K, 2: 768K, 3: 1024K
  577.  
  578. 3CEh index BCh (R/W):  Scratch Pad 2
  579. bit  0-7
  580.  
  581. 3CEh index BDh (R/W):  Scratch Pad 3
  582. bit  0-7
  583.  
  584. 3CEh index BEh (R/W):  Scratch Pad 4
  585. bit  0-7
  586.  
  587. 3CEh index BFh (R/W):  Scratch Pad 5
  588. bit  0-7
  589.  
  590. 3CEh index C0h (R/W):  Attribute and Graphics Control
  591. bit    0  (not 5410) Enable Foreground Enhancement
  592.        1  Bypass Internal Palette
  593.        2  (6412) Enable 4bit Single-Scan Monochrome Panel Support
  594.           (6440) Attribute Emulation
  595.           (5410) Disable 3C0h index 14h
  596.        3  Enable Background Color Enhancement
  597.  
  598. 3CEh index C1h (R/W):  Cursor Attributes
  599. bit    0  Enable Cursor Blinking
  600.      1-2  Cursor Blinking Rate
  601.        3  Cursor Mode. Invert if set, replace if clear
  602.        4  Invert Border Color
  603.        5  (not 5410) Cursor Color Control
  604.  
  605. 3CEh index C2h (R/W):  Graphics Controller Memory Latch 0
  606. bit  0-7
  607.  
  608. 3CEh index C3h (R/W):  Graphics Controller Memory Latch 1
  609. bit  0-7
  610.  
  611. 3CEh index C4h (R/W):  Graphics Controller Memory Latch 2
  612. bit  0-7
  613.  
  614. 3CEh index C5h (R/W):  Graphics Controller Memory Latch 3
  615. bit  0-7
  616.  
  617. 3CEh index C8h (R/W):  DAC Power Control
  618. bit    1  (6410,12,40) Select 16color Extended mode (Packed-pixel)
  619.        2  (6440) Enable 256 Color Modes
  620.        5  Enable Force Blank to RAMDAC
  621.        6  (6440) Grey Scale Data from Attribute
  622. Note: The undefined bits should be set to 0 when writing this register.
  623.  
  624. 3CEh index C9h (R/W):  Graphics and Attribute Test
  625. bit  0-2  (5410) GAT bits 0-2
  626.        3  (6410,12,40,5410) Enable 9dot Font
  627.        4  (not 6440) Three-State Pixel data & VDCLK
  628.        5  (6440) LSB value of Red and Blue and Green
  629.           (5410) Red/Blue LSB
  630.        6  (6440) Select 16bit/pixel green map
  631.           (5410) Green LSB
  632.        7  (6440,5410) Enable True Color
  633.  
  634. 3CEh index D0h (R/W):  Flat Panel Column Offset                     (not 6440)
  635. bit  0-7  Bit 8 is in index D4 bit 0.
  636.  
  637. 3CEh index D1h (R/W):  Flat Panel Horizontal Displayed              (not 6440)
  638. bit  0-7  Bit 8 is in 3CEh index D4h bit 1
  639.  
  640. 3CEh index D2h (R/W):  Flat Panel Row Offset                        (not 6440)
  641. bit  0-7  Bits 8-9 are in 3CEh index D4 bits 2-3
  642.  
  643. 3CEh index D3h (R/W):  Flat Panel Vertical Size                     (not 6440)
  644. bit  0-7  Bits 8-10 are in 3CEh index D4h bit 4-6
  645.  
  646. 3CEh index D4h (R/W):  Flat Panel Overflow                          (not 6440)
  647. bit    0  Column Offset bit 8. Bits 0-7 are in index 60h
  648.        1  Panel Horizontal Displayed bit 8. Bits 0-7 are in index D1h
  649.      2-3  Row Offset Overflow bits 8-9. Bits 0-7 are in index D2h
  650.      4-6  Panel Vertical Size Overflow bits 8-10. Bits 0-7 are in index D3h.
  651.  
  652. 3CEh index D5h (R/W):  Flat Panel Attribute LCD Control             (not 6440)
  653. bit  0-1  9 Dots Text Reduction
  654.        2  (R) Stand-by Mode Status bit
  655.        3  Enable Attribute Emulation
  656.        4  Enable Extra Line Clk
  657.        5  Enable Reverse Video in Graphics Mode
  658.        6  Enable Reverse Video in Text Mode
  659.        7  Enable AutoMAP
  660.  
  661. 3CEh index D6h (R/W):  Flat Panel Grey Scale Offset                 (not 6440)
  662. bit    0  Select Grey Scale offset 4 (default=13)
  663.        1  Power Sequencing Control
  664.        2  Power Sequencing Time Control
  665.        4  (6420 & 6410 rev B) Enable 8bit Plasma Interface
  666.        5  (6420 & 6410 rev B) Enable Intermodulation
  667.        6  Enable Horizontal Stipling
  668.        7  Enable Vertical Stipling
  669.  
  670. 3CEh index D7h (R/W):  Flat Panel Retrace LLCLK Control             (not 6440)
  671. bit  0-4  Retrace LLCLK counter
  672.  
  673. 3CEh index D8h (R/W):  Flat Panel Frame Color                       (not 6440)
  674. bit  0-3  Frame Color
  675.        4  Enable Frame Color
  676.        6  (6410 rev B,12,20) Enable EPSON FPLCLK
  677.  
  678. 3CEh index D9h (R/W):  Flat Panel AC Modulation                     (not 6440)
  679. bit  0-7
  680.  
  681. 3CEh index DAh (R/W):  Flat Panel Display Control                   (not 6440)
  682. bit    0  (6420, 6410 rev B) Force 32 Grey Shades
  683.      1-2  Panel Vertical Alignment Control
  684.      3-4  Panel Size Selection
  685.      5-7  RGB Weight Control
  686.  
  687. 3CEh index DBh (R/W):  Standby Timer Control                        (not 6440)
  688. bit  0-5  Standby Mode Time Interval in minutes
  689.      6-7  Standby Mode. 0: disable, 1: screen save, 2: video memory
  690.  
  691. 3CEh index DCh (R/W):  Flat Panel Color Configuration               (not 6440)
  692. bit    0  9bit Color Panel Select
  693.        1  MOD/FPHDE/P8 pin function control. If set P8 is output,
  694.           if clear MOD is output if bit 0 is clear, FPHDE if set
  695.  
  696. 3CEh index E0h (R/W):  Flat Panel Column Offset                    (6440 only)
  697. bit  0-7
  698.  
  699. 3CEh index E1h (R/W):  Flat Panel Horizontal Displayed Size        (6440 only)
  700. bit  0-7  Bit 8 is in index E4h bit 1.
  701.  
  702. 3CEh index E2h (R/W):  Flat Panel Row Offset                       (6440 only)
  703. bit  0-7  Bits 8-9 are in index E4h bit 2-3
  704.  
  705. 3CEh index E3h (R/W):  Flat Panel Vertical Size                    (6440 only)
  706. bit  0-7  Bits 8-10 are in index E4h bit 4-6
  707.  
  708. 3CEh index E4h (R/W):  Flat Panel Overflow                         (6440 only)
  709. bit    0  Column Offset bit 8. Bits 0-7 are in index E0h
  710.        1  Panel Horizontal Displayed bit 8. Bits 0-7 are in index E1h
  711.      2-3  Row Offset Overflow bits 8-9. Bits 0-7 are in index E2h
  712.      4-6  Panel Vertical Size Overflow bits 8-10. Bits 0-7 are in index E3h
  713.  
  714. 3CEh index E5h (R/W):  Flat Panel Horizontal Centering Offset      (6440 only)
  715. bit  0-7  Bit 8 is in index E7h bit 0
  716.  
  717. 3CEh index E6h (R/W):  Flat Panel Horizontal Centering Offset-9Dot (6440 only)
  718. bit  0-7  Bit 8 is in index E7h bit 1
  719.  
  720. 3CEh index E7h (R/W):  Flat Panel Horizontal Centering Overflow    (6440 only)
  721. bit    0  Flat Panel Horizontal Centering bit 8. Bits 0-7 are in index E5h
  722.        1  Flat Panel Horizontal Centering (9Dot) bit 8. Bits 0-7 are in
  723.           index E6h
  724.        2  Flat Panel Horizontal Size Adjust
  725.  
  726. 3CEh index E8h (R/W):  Flat Panel Pin Configuration                (6440 only)
  727. bit    0  Standby/Suspend Pin Status. If set Standby Timer Status is output on
  728.           pin 152, if clear Suspend Mode Status is output on pin 152.
  729.        1  Enable FPHDE Control
  730.        2  Flat Panel Drive. If set 100%, if clear 60%
  731.        3  GD6440 Core at 3 Volts. If set 5V, if clear 3.3V
  732.  
  733. 3CEh index E9h (R/W):  Flat Panel Type Control                     (6440 only)
  734. bit  0-2  Flat Panel Size Selection. 0: 640x480, 1: 640x400,
  735.             2: 1280x1024/1280x960
  736.        3  Flat Panel Scan Type
  737.      5-6  Extra Line Clock Enable. 0,1: None, 2: 1 extra, 3: 2 extra line
  738.           clocks
  739.  
  740. 3CEh index EAh (R/W):  Flat Panel Power Control                    (6440 only)
  741. bit    0  Power Sequence Status
  742.        1  Standby on Status
  743.        2  Sequencer Flat Panel Power
  744.      3-5  Standby Mode Selection
  745.        6  Enable External Suspend Pin
  746.  
  747. 3CEh index EBh (R/W):  Flat Panel Standby Timer                    (6440 only)
  748. bit  0-7  
  749.  
  750. 3CEh index ECh (R/W):  Flat Panel Misc 1 Control                   (6440 only)
  751. bit  0-1  Vertical Alignment Control. 0: Top, 1: Bottom, 2,3:Center
  752.        2  Enable Horizontal Centering
  753.        3  Grayscale Offset Value
  754.      4-5  Display Type Select. 0: CRT, 1: Flat Panel, 2,3: SimulSCAN
  755.        6  Grayscale Offset Pattern Select
  756.        7  Invert FPVDE
  757.  
  758. 3CEh index EDh (R/W):  Flat Panel Retrace FPCLK                    (6440 only)
  759. bit  0-4  Programmed Burst of Line Clocks
  760.      5-6  Retrace Line Clock Control
  761.        7  Fast Line Clock
  762.  
  763. 3CEh index EEh (R/W):  Flat Panel Test Control                     (6440 only)
  764. bit  0-7  Reserved
  765.  
  766. 3CEh index F0h (R/W):  Flat Panel Clock Control                    (6440 only)
  767. bit  0-3  FPVDCLK Control
  768.      4-5  FPVDCLK Enable Control
  769.        6  Invert FPVDCLK
  770.        7  Invert FPHDE
  771.  
  772. 3CEh index F1h (R/W):  Flat Panel Data Control                     (6440 only)
  773. bit  0-4  Flat Panel Video Data Output Format Control
  774.        5  FPHSYNC/FPVSYNC Polarity Source Control
  775.        6  FPHSYNC Polarity Control
  776.        7  FPVSYNC Polarity Control
  777.  
  778. 3CEh index F2h (R/W):  Flat Panel AC Modulation                    (6440 only)
  779. bit  0-7  
  780.  
  781. 3CEh index F3h (R/W):  Flat Panel FPHSYNC Skew                     (6440 only)
  782. bit  0-6  FPHSYNC Skew
  783.  
  784. 3CEh index F4h (R/W):  Flat Panel FPVSYNC Skew                     (6440 only)
  785. bit  0-4  FPVSYNC Skew
  786.        5  FPVSYNC Width
  787.      6-7  FPHSYNC Width
  788.  
  789. 3CEh index F5h (R/W):  Memory Clock Select Factor                  (6440 only)
  790. bit  0-4  Memory Clock Numerator "N"
  791.      5-7  Memory Clock Denominator "D"
  792.  
  793. 3CEh index F6h (R/W):  CRT Clock Select "N" Factor                 (6440 only)
  794. bit  0-6  CRT Clock Numerator "N"
  795.        7  Clock Source Control
  796.  
  797. 3CEh index F7h (R/W):  CRT Clock Select "D" Factor                 (6440 only)
  798. bit  0-3  CRT Clock Denominator "D"
  799.      4-5  CRT Clock Divide
  800.        6  Memory Clock Invert
  801.        7  CRT Clock Invert
  802.  
  803. 3CEh index F8h (R/W):  Flat Panel Mapping RAM Pointer              (6440 only)
  804. bit  0-5  Pointer to the Mapping RAM for I/O Read/Write
  805.        7  Enable I/O Access of Mapping RAM
  806.  
  807. 3CEh index F9h (R/W):  Flat Panel Mapping RAM Data                 (6440 only)
  808. bit  0-7  Mapping RAM Data
  809.  
  810. 3CEh index FAh (R/W):  Flat Panel Stippling Control                (6440 only)
  811. bit    0  Enable 32 Shades in All Stippling Cases
  812.      1-2  Stippling Select
  813.      3-5  Stippling Bit Select
  814.        6  Enable Inter-modulation
  815.  
  816. 3CEh index FBh (R/W):  Flat Panel Color Control                    (6440 only)
  817. bit    0  Blue Color Weighting
  818.        1  Green Color Weighting
  819.      2-3  Red Color Weighting
  820.        4  Green Data from LUT
  821.        5  Enable Reverse Video in Graphics Modes
  822.        6  Enable Reverse Video in Text Mode
  823.  
  824. 3CEh index FCh (R/W):  Flat Panel Frame Color 1                    (6440 only)
  825. bit  0-3  Frame Color Bits for Red
  826.        4  Enable Frame Color
  827.  
  828. 3CEh index FDh (R/W):  Flat Panel Frame Color 2                    (6440 only)
  829. bit  0-3  Frame Color Bits for Blue
  830.      4-7  Frame Color Bits for Green
  831.  
  832. Video Modes:
  833.  
  834. 002Dh  G   640   400   256  P8
  835. 002Eh  G   640   480   256  P8
  836. 002Fh  G   648   480   256  P8      ;Weird resolution
  837. 0030h  G   800   600   256  P8
  838. 0037h  G  1024   768    16  PL4
  839. 0041h  T   100    50    16  TXT
  840. 0042h  T   100    60    16  TXT
  841. 0044h  T   100    25    16  TXT
  842. 0051h  T   132    50    16  TXT
  843. 0052h  T   132    60    16  TXT
  844. 0053h  T    80    60    16  TXT
  845. 0054h  T   132    25    16  TXT
  846. 0064h  G   800   600    16  PL4
  847. 006Ah  G   800   600    16  PL4
  848.  
  849.  
  850.  
  851.  
  852. GD62xx series:
  853. The 62xx series is very similar to the early 54xx.
  854. The 62xx series can display simultaneously on CRT and LCD.
  855. There are two extra register banks (CX and RX) at 3d4h. How to select ?
  856.  
  857. 3C4h index  2  (R/W):  Map Mask
  858. bit  0-7  Enable writing pixel bits 0-7  ?????
  859. Note: See the VGA section for the normal use of this register
  860.  
  861. 3C4h index  6  (R/W):  Unlock ALL Extensions
  862. bit  0-2,4  Writing 12h to this register enables extensions.
  863.             Read back 0Fh if locked.
  864.             Bits 3,5-7 are ignored on write.
  865.  
  866. 3C4h index  7  (R/W):  Extended Sequencer Mode
  867. bit    0  Enable High-Resolution 256 Color modes if set
  868.      4-6  (R) Configuration switch 0-2 (MD[14:12])
  869.  
  870. 3C4h index  8  (R/W):  Miscellaneous Control
  871. bit  0-2  Switch 1-3 Readback (Panel type, Monitor type, Local bus config).
  872.        3  Select active polarity of input SUSPEND for suspend mode.
  873.          .If set low is true, if clear high is true (default at reset).
  874.        4  Enable IO(60h) read detect to reset backlight timer
  875.        5  Enable IO(60h) read detect to reset standby timer
  876.        6  Disable MSC16* for Display Memory
  877.        7  Select symmetrical DRAM addressing for paged-mode on CRT
  878.           Set when using DRAM 9-bit addressing at 132 col CRT
  879.  
  880. 3C4h index  9  (R/W):  Scratch Register 0
  881. bit    0  Set to center
  882.      2-4  Monitor type.
  883.            0:  31,5kHz           Std VGA. IBM 8512,8503
  884.            1:  31.5, 35.5 kHz    IBM 8514
  885.            2:  31.5, 35.1 kHz    NEC 2A
  886.            3:  31.5 - 35.5 kHz   NEC II
  887.            4:  31.5 - 38 kHz     Multi Freq. NEC 3D
  888.            5:  31.5 - 48 kHz     Sony CPD-1304, NEC 3FG, Nanao 9065S, 9070U
  889.            6:  31.5 - 56.5 kHz   NEC 4D,4FG, Nanao T240i
  890.            7:  31.5 - 64 kHz     NEC 5D,5FG/6FG, Nanao T560i,T660i
  891.        7  Panel frequency
  892.  
  893. 3C4h index 0Ah (R/W):  Scratch Register 1
  894. bit    0  Display mode
  895.        1  Disable expand
  896.        2  Enable 16bit mode.
  897.        4  Attribute emulation
  898.        5  Disable bold font
  899.        6  High refresh
  900.        7  Voltage
  901.  
  902. 3C4h index 0Bh (R/W):  VCLK 0 Numerator Register
  903. bit  0-6  VCLK 0 Numerator bits 0-6
  904.  
  905. 3C4h index 0Ch (R/W):  VCLK 1 Numerator Register
  906. bit  0-6  VCLK 1 Numerator bits 0-6
  907.  
  908. 3C4h index 0Dh (R/W):  VCLK 2 Numerator Register
  909. bit  0-6  VCLK 2 Numerator bits 0-6
  910.  
  911. 3C4h index 0Eh (R/W):  VCLK 3 Numerator Register
  912. bit  0-6  VCLK 3 Numerator bits 0-6
  913.  
  914. 3C4h index 0Fh (R/W):  DRAM Control
  915. bit  0-1  MCLK Select: 0: 50.1 MHz, 1: 44.7 MHz, 2: 25.0 MHz, 3: 37.5 MHz
  916.           Select 25MHz if VCLK is <= 18MHz
  917.        2  RAS* Timing.
  918.               0: Extended (PD on MD[27], RAS* high for 3MCLK, low for 4)
  919.               1: Standard (RAS* high for 2.5MCLK, low for 3.5)
  920.        5  CRT Write Buffer Depth Control
  921.           If set there are 4 16bit levels, if clear one 16bit level.
  922.        7  CRT Refresh disabled if set (LCD mode)
  923.  
  924. 3C4h index 10h (R/W):  HW Cursor X-position
  925. bit  0-7  When this value is written to the register, the upper 3 bits of the
  926.           index register are taken as the low order bits of an 11 bit
  927.           register. This is the horizontal position of the hardware cursor in
  928.           pixels.
  929.  
  930. 3C4h index 11h (R/W):  HW Cursor Y-position7
  931. bit  0-7  When this value is written to the register, the upper 3 bits of the
  932.           index register are taken as the low order bits of an 11 bit
  933.           register. This is the vertical position of the hardware cursor in
  934.           pixels.
  935.  
  936. 3C4h index 12h (R/W):  HW Cursor control
  937. bit    0  Enable the hardware cursor if set
  938.        1  Enable Access to RAMDAC Extended Colors.
  939.           Set to load special color values via 3C8h and 3C9h.
  940.           When this bit is set palette entry 0 accesses the cursor background
  941.           color and entry FFh accesses the cursor foreground color.
  942.  
  943. 3C4h index 13h (R/W):  HW Cursor bitmap address
  944. bit  0-1  Select 1 of 4 32x32 cursors
  945.           The offset in 256 byte units within the last 16KB of video memory
  946.           where the cursor mask and shape bitmaps are stored.
  947.           There are two 128 byte (32x32 bits) bitmaps stored in video memory.
  948.           The appearance of the cursor at each pixel is determined by a
  949.           combination of the corresponding pixels from the first and second
  950.           bitmap:
  951.             1st: 2nd:
  952.              0    0     The original screen pixel is shown (invisible cursor)
  953.              0    1     The pixel is shown in the cursor background color.
  954.              1    0     The pixel is shown as the inverse of the original
  955.                         screen pixel (XOR cursor)
  956.              1    1     The pixel is shown in the cursor foreground color.
  957.  
  958. 3C4h index 14h (R/W):  Scratch-Pad 2
  959. bit  0-7  Reserved
  960.  
  961. 3C4h index 15h (R/W):  Scratch-Pad 3
  962. bit  0-7  Reserved
  963.  
  964. 3C4h index 16h (R/W):  Miscellaneous
  965. bit  0-7  Reserved
  966.  
  967. 3C4h index 19h (R/W):  Scratch-Pad 4
  968. bit  0-7  Reserved
  969.  
  970. 3C4h index 1Ah (R/W):  Miscellaneous
  971. bit    4  Enable 64x64 H/W cursor
  972.        5  Enable Improved cycle latency
  973.        6  Select dual-scan color panel
  974.        7  Select one DRAM refresh per line
  975.  
  976. 3C4h index 1Bh (R/W):  VCLK 0 Denominator & Post
  977. bit    0  VCLK 0 Post Scalar bit. Divide clock by 2 if set
  978.      1-5  VCLK 0 Denominator Data
  979. Note: The clock is (14.31818MHz * numerator (index 0Bh))/Denominator.
  980.       Divide by 2 if the Post Scalar bit is set.
  981.       3C2h bits 2-3 selects between VCLK0, 1, 2 and 3
  982.       The 5420 can not handle frequencies above 75.2 MHz
  983.  
  984. 3C4h index 1Ch (R/W):  VCLK 1 Denominator & Post
  985. bit    0  VCLK 1 Post Scalar bit. Divide clock by 2 if set
  986.      1-5  VCLK 1 Denominator Data
  987. Note: See index 1Bh for the frequency calculation
  988.  
  989. 3C4h index 1Dh (R/W):  VCLK 2 Denominator & Post
  990. bit    0  VCLK 2 Post Scalar bit. Divide clock by 2 if set
  991.      1-5  VCLK 2 Denominator Data
  992. Note: See index 1Bh for the frequency calculation
  993.  
  994. 3C4h index 1Eh (R/W):  VCLK 3 Denominator & Post
  995. bit    0  VCLK 3 Post Scalar bit. Divide clock by 2 if set
  996.      1-5  VCLK 3 Denominator Data
  997. Note: See index 1Bh for the frequency calculation
  998.  
  999. 3C4h index 1Fh (R/W):  BIOS Write Enable and MCLK select
  1000. bit  0-5  MCLK frequency bit 0-5
  1001.  
  1002. 3CEh index  0  (R/W):  Set/Reset
  1003. bit  0-3  Write Mode 5 background color bits 0-3
  1004.      4-7  Write Mode 5 background color bits 4-7
  1005. Note: See the VGA section for the use of this register in write mode 0-3
  1006.  
  1007. 3CEh index  1  (R/W):  Enable Set/Reset
  1008. bit  0-3  Write Mode 4/5 foreground color bits 0-3
  1009.      4-7  Enable SR plane 0-3 or Write Mode 4/5 foreground color bits 0-3
  1010. Note: See the VGA section for the use of this register in write mode 0-3
  1011.  
  1012. 3CEh index  5  (R/W):  Mode
  1013. bit  0-1  Write mode:  See the VGA section for modes 0-3.
  1014.        2  Write mode bit 2 if 3CEh index 0Bh bit 2 is set
  1015.            mode 4:  Foreground write ?
  1016.            mode 5:  Fore and background write
  1017.        3  Enable Read Color Compare
  1018.        4  Enable odd/even (3C4h index 4 bit 2).
  1019.        5  Shift 2 bits per byte
  1020.        6  256 Color Mode
  1021.  
  1022. 3CEh index 09h (R/W):  Offset Register 0
  1023. bit  0-6  4k Primary/Low bank number
  1024.           If 3CEh index 0Bh bit 0 is set references to A000h-A7FFh use this
  1025.           bank register. If clear references to A000h-AFFFh use this bank
  1026.           register.
  1027.  
  1028. 3CEh index 0Ah (R/W):  Offset Register 1
  1029. bit  0-6  4k High bank number
  1030.           If 3CEh index 0Bh bit 0 is set references to A800h-AFFFh use this
  1031.           bank register.
  1032.  
  1033. 3CEh index 0Bh (R/W):  Extension Control
  1034. bit    0  If set references to A000h-A7FFh use 3CEh index 9 as bank register,
  1035.           and references to A800h-AFFFh use 3CEh index 0Ah as bank register.
  1036.           If clear all references to A000h-AFFFh use 3CEh index 9 as bank
  1037.           register.
  1038.        1  Enable BY8 Addressing for 256 color modes
  1039.        2  Enable Extended Write Modes if set (mode 4 and 5)
  1040.  
  1041. 3d4h index 00h (R/W):  Horizontal Total (CX00)
  1042. bit  0-7  Horizontal Total (-5)
  1043. Note: This register is used in 80 column and mode 13h (3C4h index 1 bit 3
  1044.       clear or 3CEh index 5 bit 6 set)
  1045.  
  1046. 3d4h index 01h (R/W):  Horizontal Total (CX01)
  1047. bit  0-7  Horizontal Total (-5)
  1048. Note: This register is used in 50 column modes (3D4h index 1 bit 3 set or 3CEh
  1049.       index 5 bit 6 clear)
  1050.  
  1051. 3d4h index 02h (R/W):  LFS Signal Vertical Counter Value Compare (CX02)
  1052. bit  0-7  Used if autocentering is not selected.
  1053. Note: This register selected for 3C2h bits 2-3 = 3 ??
  1054.  
  1055. 3d4h index 03h (R/W):  LFS Signal Vertical Counter Value Compare (CX03)
  1056. bit  0-7  Used if autocentering is not selected.
  1057. Note: This register selected for 3C2h bits 2-3 = 2 ??
  1058.  
  1059. 3d4h index 04h (R/W):  LFS Signal Vertical Counter Value Compare (CX04)
  1060. bit  0-7  Used if autocentering is not selected.
  1061. Note: This register selected for 3C2h bits 2-3 = 1 ??
  1062.  
  1063. 3d4h index 05h (R/W):  LFS Signal Vertical Counter Value Compare (CX05)
  1064. bit  0-7  Used if autocentering is not selected.
  1065. Note: This register selected for 3C2h bits 2-3 = 0 ??
  1066.  
  1067. 3d4h index 06h (R/W):  LFS Overflow (CX06)
  1068. bit  0-1  Bits 8-9 of the LFS compare for 3C2h bits 2-3 = 3
  1069.      2-3  Bits 8-9 of the LFS compare for 3C2h bits 2-3 = 2
  1070.      4-5  Bits 8-9 of the LFS compare for 3C2h bits 2-3 = 1
  1071.      6-7  Bits 8-9 of the LFS compare for 3C2h bits 2-3 = 0
  1072.  
  1073. 3d4h index 06h (R/W):  Vertical Total (RX06)
  1074. bit  0-7  Vertical Total (-2)
  1075.  
  1076. 3d4h index 07h (R/W):  Color TFT Panel Control Signal (CX07)
  1077. bit    0  If set FPVDCLK is always active, if clear FPVDCLK is gated by
  1078.           display enable
  1079.        1  FPVDCLK is inverted if set
  1080.        2  If set use LLCLK as HSYNC
  1081.        3  If set use LFS as VSYNC
  1082.  
  1083. 3d4h index 07h (R/W):  Vertical Overflow (RX07)
  1084. bit    0  Vertical Total bit 8
  1085.        1  Vertical Displayed bit 8
  1086.        2  Vertical Sync Start bit 8
  1087.        3  Vertical Blank Start bit 8
  1088.        4  Line Compare bit 8
  1089.        5  Vertical Total bit 9
  1090.        6  Vertical Displayed bit 9
  1091.        7  Vertical Sync Start bit 9
  1092.  
  1093. 3d4h index 08h (R/W):  STN Color Panel Data Format (CX08)
  1094. bit    0  If set 8bit data, if clear 16bit
  1095.        1  Set for Dual shift clk STN, clear for single
  1096.        2  Set for testing purposes only
  1097.        3  Set to Shorten LP width, clear to Lengthen LP width
  1098.        4  Set to enable foreground text enhancement
  1099.        5  Set for Single Scan Mono Panels, clear for Dual Scan
  1100.        6  Set for testing purposes only
  1101.        7  Set to boost contrast for Mono Panels
  1102.  
  1103. 3d4h index 09h (R/W):  TFT Panel Data Format (CX09)
  1104. bit  0-1  Data format. 0: 9bit(333), 2: 12bit(444), 1,3: 18bit direct
  1105.      2-4  Shiftclock delay from internal character clock to TFT hsync(LLCLK)
  1106.           signal
  1107.  
  1108. 3d4h index 0Ah (R/W):  TFT Panel HSYNC Position Control (CX0A)
  1109. bit  0-7  Horizontal counter to generate TFT panel VSYNC signal.
  1110.           Set in multiples of 8 VCLKs (80 column character clocks)
  1111.  
  1112. 3d4h index 0Bh (R/W):  Panel Adjustment Control (CX0B)             (6235 only)
  1113. bit  0-4  Number of LLCLKs between upper and lower panel halfs
  1114.      5-6  Offset adjustment for gray-scale shading
  1115.  
  1116. 3d4h index 10h (R/W):  Vertical Sync Start (RX10)
  1117. bit  0-7  VSYNC Start
  1118.  
  1119. 3d4h index 11h (R/W):  Vertical Sync End (RX11)
  1120. bit  0-3  VSYNC End.
  1121.        4  Clear Vertical Sync Interrupt
  1122.        5  Enable Vertical Sync Interrupt
  1123.        6  Select 5 refresh cycles
  1124.        7  Write protect index 0-7.
  1125.  
  1126. 3d4h index 15h (R/W):  Vertical Blank Start (RX15)
  1127. bit  0-7  Vertical Blank Start
  1128.  
  1129. 3d4h index 16h (R/W):  Vertical Blank End
  1130. bit  0-7  Vertical Blank End
  1131.  
  1132. 3d4h index 19h (R/W):  Interlace End
  1133. bit  0-7  Ending Horizontal Character Count for Odd field VSYNC.
  1134.           Typically half the horizontal total
  1135.  
  1136. 3d4h index 1Ah (R/W):  Miscellaneous Control
  1137. bit    0  Enable Interlace sync/video data in Graphics mode or interlace only
  1138.           in Text mode. Set if an interlaced mode.
  1139.        1  Enable Double-Buffered Display Start Address
  1140.  
  1141. 3d4h index 1Bh (R/W):  Extended Display Control
  1142. bit    0  Display Start Address bit 16. Bit 0-15 are in 3d4h index Ch-Dh.
  1143.        1  Enable Extended Address Wrap. Set to enable access to video memory
  1144.           beyond 128K (16bit memory) or 256K (32bit memory)
  1145.        5  Set RAMDAC blanking=display enable signal (no border)
  1146.        6  Select Text mode Fast-Page (132 color text)
  1147.        7  Disable Cursor blink in Text Mode
  1148.  
  1149. 3d4h index 1Ch (R/W):  Flat-Panel Interface
  1150. bit    0  Invert LFS signal
  1151.        1  Invert LLCLK signal
  1152.        2  Enable MCLK power-down during suspend mode
  1153.        3  Protect CRTC for LCD timing:
  1154.             3d4h index 0,1,6,7(bits 0,2,5,7), 10h and 11h
  1155.        5  Enable extra LLCLK. Used for adjusting 242 line dual panel
  1156.      6-7  Flat-Panel type. 0: Dual Mono, 1: Plasma/EL, 2: STN color,
  1157.            3: TFT color
  1158.  
  1159. 3d4h index 1Dh (R/W):  Flat Panel Display Control
  1160. bit    0  Enable Auto Center
  1161.        1  Enable Auto Expand:  3C2h bit 6-7: 1: 400/200 lines, 2: 350, 3: 480.
  1162.        2  Enable VGA access to reset Backlight Timer
  1163.        3  Enable input ACTi to reset Backlight Timer
  1164.        4  Suspend mode Clock source. If set use OSC, if clear use pin 32KHz.
  1165.        5  Enable VGA access to reset Standby Timer
  1166.        6  Enable input ACTi to reset Standby Timer
  1167.        7  Enable access to LCD timing register at CRTC alternate index if set
  1168.  
  1169. 3d4h index 1Eh (R/W):  Flat Panel Shading
  1170. bit    0  Enable Planar Graphics Mode Dithering
  1171.        1  Enable Text mode Contrast Enhancement
  1172.      2-3  # of shades for Flat Pane:
  1173.           Mono:   0: 16, 1: 64, 2: 128, 3:256
  1174.           Color:  0: 4K, 1-3: 256K
  1175.        4  Reverse Video Graphics Modes
  1176.        5  Reverse Video Text Modes
  1177.      6-7  Shade Mapping.
  1178.            0: 18bit LUT output to 64 shades with NTSC weighting
  1179.            1: green LUT output (6 bit to 64 shades).
  1180.            2: Display data before Attribute Controller to 64 shades
  1181.            3: Attribute Controller output, 6bitrs to 64 shades
  1182.  
  1183. 3d4h index 1Fh (R/W):  Flat Panel MOD control
  1184. bit  0-6  If bit 7 is set LLCLK = (this value) + 180h
  1185.           if clear this is the number of scan lines after which the MOD pin
  1186.           will change polarity.
  1187.        7  Modulation select. Set for internal Modulation, clear for external
  1188.  
  1189. 3d4h index 20h (R/W):  Power Management
  1190. bit    0  Text Mode Shading Control. If set the text shades are derived the
  1191.           same way as the graphics, if clear the text shades are derived
  1192.           directly from the FG/BG data.
  1193.      1-2  Select Refresh Rate. 0: 8ms, 2: 64ms, 2: self refresh, 3: no refresh
  1194.        3  Activate Suspend Mode (timer override)
  1195.        4  Activate Standby Mode (timer override)
  1196.        5  Enable LCD mode if set
  1197.        6  Enable CRT mode if set
  1198.        7  set pin STANDBY to 'activate' output
  1199.  
  1200. 3d4h index 21h (R/W):  Power Down Timer Control
  1201. bit  0-3  Standby Mode Timer Control. 0: disable timer, 1-15: minutes
  1202.      4-7  Backlight Timer Control (FPBack)
  1203.  
  1204. 3d4h index 23h (R/W):  Suspend Mode Input Switch Debounce Timer
  1205. bit    0  FPVcc output state (if bit1 set)
  1206.        1  FPVcc control override
  1207.        2  FPBack output state (if bit3 set)
  1208.        3  FPBack control override
  1209.      4-7  Time for input SUSPEND to remain active before entering suspend
  1210.           mode. 0: disable timer checking, 1-15: seconds
  1211.  
  1212. 3d4h index 25h (R/W):  Part Status Register
  1213. bit  0-7  Part Status. Used for factory testing only.
  1214.  
  1215. 3d4h index 27h (R):  Part ID register
  1216. bit  0-1  Revision Level
  1217.        3  Set to 1 ???
  1218.      6-7  Device Identifier.
  1219.             0: CL-GD6205    (C9h  rev -BL)
  1220.             1: CL-GD6235    (89h  rev -BK)
  1221.             2: CL-GD6215    (48h)
  1222.             3: CL-GD6225    (09h  rev -BK)
  1223. Note: One source claims the 5428 has ID 24h & Rev 1  I.e. code. 91h
  1224. Note: I've seen one chip marked as 5422-80, which returns 94h i.e. a 5424.
  1225.  
  1226. 3d4h index 29h (R/W):  Configuration Read Back
  1227. bit    0  Bus Type Select. 0: Local Bus, 1: ISA bus
  1228.      1-2  Local Bus Type
  1229.        3  DRAM Type Select. 0: Dual CAS DRAM, 1: Dual write enable DRAM
  1230.        4  Active NPD (no power down) input
  1231.        5  Power up/down cycling activity
  1232.  
  1233.  
  1234. GD5402, 542x and 543x series:
  1235.  
  1236. 3C4h index  2  (R/W):  Map Mask
  1237. bit  0-7  Enable writing pixel bits 0-7  ?????
  1238. Note: See the VGA section for the normal use of this register
  1239.  
  1240. 3C4h index  6  (R/W):  Unlock ALL Extensions
  1241. bit  0-2,4  Writing 12h to this register enables extensions.
  1242.             Read back 0Fh if locked.
  1243.             Bits 3,5-7 are ignored on write.
  1244.  
  1245. 3C4h index  7  (R/W):  Extended Sequencer Mode
  1246. bit    0  Enable High-Resolution 256 Color modes if set
  1247.      1-2  (542x,02) Select CRTC Character Clock Divider
  1248.      1-3  (543x) Select CRTC Character Clock Divider.
  1249.              0: Normal operation
  1250.              1: Clock/2 for 16bit pixels
  1251.              2: Clock/3 for 24bit pixels
  1252.              3: (5426-3x only) 16bit pixel data at Pixel Rate
  1253.              4: (543x only) 32bit pixel data at Pixel Rate
  1254.      4-7  (5422-3x) Select 1M Video Memory Mapping.
  1255.             The address in 1MB units the Video Memory is mapped at (0=no
  1256.             mapping)
  1257.  
  1258. 3C4h index  8  (R/W):  EEPROM Control
  1259. bit    0  "CS" out to EEPROM
  1260.        1  Enable EEPROM data input 
  1261.        2  "SK" to EEPROM thru ESYNC (if bit 4 is set)
  1262.        3  "DI" to EEPROM thru EVIDEO (if bit 4 is set)
  1263.        4  Enable EEPROM Data and Sk. If set ESYNC/EVIDEO* are outputs,
  1264.           if clear inputs
  1265.        5  Latch ESYNC/EVIDEO*
  1266.        6  Disable MEMCS16* for display memory
  1267.        7  (R) EEPROM Input Data
  1268.  
  1269. 3C4h index  9  (R/W):  Scratch Register 0
  1270. bit  2-4  Monitor type.
  1271.            0:  31,5kHz           Std VGA. IBM 8512,8503
  1272.            1:  31.5, 35.5 kHz    IBM 8514
  1273.            2:  31.5, 35.1 kHz    NEC 2A
  1274.            3:  31.5 - 35.5 kHz   NEC II
  1275.            4:  31.5 - 38 kHz     Multi Freq. NEC 3D
  1276.            5:  31.5 - 48 kHz     Sony CPD-1304, NEC 3FG, Nanao 9065S, 9070U
  1277.            6:  31.5 - 56.5 kHz   NEC 4D,4FG, Nanao T240i
  1278.            7:  31.5 - 64 kHz     NEC 5D,5FG/6FG, Nanao T560i,T660i
  1279.  
  1280. 3C4h index 0Ah (R/W):  Scratch Register 1
  1281. bit  0-1  (5402) Display Memory. 0: 256K, 1: 512K, 2: 1M
  1282.      3-4  (54xx) Video memory. 0=256K, 1=512K, 2=1024K, 3=2048K
  1283. Note: Video memory should be determined from this register rather than
  1284.       index 0Fh
  1285.  
  1286. 3C4h index 0Bh (R/W):  VCLK 0 Numerator Register
  1287. bit  0-6  VCLK 0 Numerator bits 0-6
  1288.  
  1289. 3C4h index 0Ch (R/W):  VCLK 1 Numerator Register
  1290. bit  0-6  VCLK 1 Numerator bits 0-6
  1291.  
  1292. 3C4h index 0Dh (R/W):  VCLK 2 Numerator Register
  1293. bit  0-6  VCLK 2 Numerator bits 0-6
  1294.  
  1295. 3C4h index 0Eh (R/W):  VCLK 3 Numerator Register
  1296. bit  0-6  VCLK 3 Numerator bits 0-6
  1297.  
  1298. 3C4h index 0Fh (R/W):  DRAM Control
  1299. bit  0-1  (542x) MCLK Select: 0: 50.1 MHz, 1: 44.7 MHz, 2: 41.2 MHz,
  1300.                   3: 37.6 MHz
  1301.        0  (543x) (R) Disable DAC
  1302.        1  (543x) MCLK Timing. 0: 50.11363MHz, 1: 41.16477MHz
  1303.        2  RAS* Timing.
  1304.               0: Extended (PD on MD[27], RAS* high for 3MCLK, low for 4)
  1305.               1: Standard (RAS* high for 2.5MCLK, low for 3.5)
  1306.      3-4  (54xx) DRAM Data Width.
  1307.              (542x) 0: 8bit (256K), 1: 16bit (512K), 2: 32bit (1M/2M)
  1308.              (543x) 2: 32bit, 3:64 bit
  1309.        5  (5422-3x) CRT FIFO Depth Control
  1310.        6  (542x) Disable CRTC FIFO Fast-Page detection Mode
  1311.           (543x) CPU Write Buffer Control
  1312.        7  (5426-28) DRAM Bank Select. 0: 4 512Kx8, 1: 4 256Kx16
  1313.                     Set to enable access to memory beyond 1MB ??
  1314.           (543x)  DRAM Bank Switch Control
  1315.  
  1316. 3C4h index 10h (R/W):  HW Cursor X-position
  1317. bit  0-7  When this value is written to the register, the upper 3 bits of the
  1318.           index register are taken as the low order bits of an 11 bit
  1319.           register. This is the horizontal position of the hardware cursor in
  1320.           pixels.
  1321.  
  1322. 3C4h index 11h (R/W):  HW Cursor Y-position7
  1323. bit  0-7  When this value is written to the register, the upper 3 bits of the
  1324.           index register are taken as the low order bits of an 11 bit
  1325.           register. This is the vertical position of the hardware cursor in
  1326.           pixels.
  1327.  
  1328. 3C4h index 12h (R/W):  HW Cursor control
  1329. bit    0  Enable the hardware cursor if set
  1330.        1  Enable Access to RAMDAC Extended Colors.
  1331.           Set to load special color values via 3C8h and 3C9h.
  1332.           When this bit is set palette entry 0 accesses the cursor background
  1333.           color and entry FFh accesses the cursor foreground color.
  1334.        2  (5422-3x) If set select 64x64 cursor, if clear 32x32.
  1335.        7  (5424-3x) Overscan Color Protect
  1336.  
  1337. 3C4h index 13h (R/W):  HW Cursor bitmap address
  1338. bit  0-5  Select 1 of 64 32x32 cursors 
  1339.      2-5  (5422-3x) Select 1 of 16 64x64 cursors (if index 12h bit 2 is set)
  1340.           The offset in 256 byte units within the last 16KB of video memory
  1341.           where the cursor mask and shape bitmaps are stored.
  1342.           There are two 128 byte (32x32 bits) bitmaps stored in video memory.
  1343.           The appearance of the cursor at each pixel is determined by a
  1344.           combination of the corresponding pixels from the first and second
  1345.           bitmap:
  1346.             1st: 2nd:
  1347.              0    0     The original screen pixel is shown (invisible cursor)
  1348.              0    1     The pixel is shown in the cursor background color.
  1349.              1    0     The pixel is shown as the inverse of the original
  1350.                         screen pixel (XOR cursor)
  1351.              1    1     The pixel is shown in the cursor foreground color.
  1352.  
  1353. 3C4h index 14h (R/W):  Scratch-Pad Register 2                   (5426-3x only)
  1354. bit  0-7
  1355.  
  1356. 3C4h index 15h (R/W):  Scratch-Pad Register 3                   (5426-3x only)
  1357. bit  0-7
  1358.  
  1359. 3C4h index 16h (R/W):  Performance Tuning                       (5424-3x only)
  1360. bit  0-3  FIFO Demand Threshold
  1361.      4-5  (5424-28) RDY# delay for memory write bits 0-1. 0: 1, 1,2: 2, 3: 4
  1362.        4  (543x)  LRDY# Delay for Memory Cycles
  1363.        5  (543x)  Readback of CF6
  1364.      6-7  (5424-28) RDY# delay for I/O bits 0-1. 0,1: 1  2,3: 2
  1365.           (543x)  LRDY# Delay for I/O Cycles
  1366.  
  1367. 3C4h index 17h (R/W):  Configuration Readback and Extended Control (543x only)
  1368. bit    0  Shadow DAC Writes on Local Bus
  1369.        1  Power Down Palette Memory
  1370.        2  Enable Memory-Mapped I/O
  1371.      3-5  (R) System Bus Select MD[50:48] ??
  1372.        7  Disable DRAM Refresh
  1373.  
  1374. 3C4h index 18h (R/W):  Signature Generator Control              (5422-3x only)
  1375. bit    0  Enable/Status Signal Generator
  1376.        1  Reset Signature Generator. Set to reset to an initial, defined
  1377.           condition. Clear to allow the Signal Generator to run.
  1378.      2-4  Select Pixel Bus. The bit to input to the Signal Generator.
  1379.            0: bit 0  ... 7: bit 7
  1380.        5  Enable Data Generator
  1381.        6  Disable DCLK/Pixel Bus Drivers. ** For testing only **
  1382.        7  Disable MCLK Driver.  ** For Testing only **
  1383.  
  1384. 3C4h index 19h W(R/W):  Signature Generator Result              (5422-3x only)
  1385. bit 0-15  Signal Generator Result
  1386.  
  1387. 3C4h index 1Bh (R/W):  VCLK 0 Denominator & Post
  1388. bit    0  VCLK 0 Post Scalar bit. Divide clock by 2 if set
  1389.      1-5  VCLK 0 Denominator Data
  1390. Note: The clock is (14.31818MHz * numerator (index 0Bh))/Denominator.
  1391.       Divide by 2 if the Post Scalar bit is set.
  1392.       3C2h bits 2-3 selects between VCLK0, 1, 2 and 3
  1393.       The 5420 can not handle frequencies above 75.2 MHz
  1394.  
  1395. 3C4h index 1Ch (R/W):  VCLK 1 Denominator & Post
  1396. bit    0  VCLK 1 Post Scalar bit. Divide clock by 2 if set
  1397.      1-5  VCLK 1 Denominator Data
  1398. Note: See index 1Bh for the frequency calculation
  1399.  
  1400. 3C4h index 1Dh (R/W):  VCLK 2 Denominator & Post
  1401. bit    0  VCLK 2 Post Scalar bit. Divide clock by 2 if set
  1402.      1-5  VCLK 2 Denominator Data
  1403. Note: See index 1Bh for the frequency calculation
  1404.  
  1405. 3C4h index 1Eh (R/W):  VCLK 3 Denominator & Post
  1406. bit    0  VCLK 3 Post Scalar bit. Divide clock by 2 if set
  1407.      1-5  VCLK 3 Denominator Data
  1408. Note: See index 1Bh for the frequency calculation
  1409.  
  1410. 3C4h index 1Fh (R/W):  BIOS Write Enable and MCLK select        (5424-3x only)
  1411. bit  0-5  MCLK frequency bit 0-5
  1412.        6  (543x) Use MCLK as VCLK if set.
  1413.        7  Enable BIOS write
  1414.  
  1415. 3CEh index  0  (R/W):  Set/Reset
  1416. bit  0-3  Write Mode 5 background color bits 0-3
  1417.      4-7  Write Mode 5 background color bits 4-7
  1418. Note: See the VGA section for the use of this register in write mode 0-3
  1419.  
  1420. 3CEh index  1  (R/W):  Enable Set/Reset
  1421. bit  0-3  Write Mode 4/5 foreground color bits 0-3
  1422.      4-7  Enable SR plane 0-3 or Write Mode 4/5 foreground color bits 0-3
  1423. Note: See the VGA section for the use of this register in write mode 0-3
  1424.  
  1425. 3CEh index  5  (R/W):  Mode
  1426. bit  0-1  (index 0Bh bit 2 clear) Write mode nits 0-1
  1427.      0-2  (index 0Bh bit 2 set) Write mode bit 0-2
  1428.            See the VGA section for modes 0-3.
  1429.            mode 4:  Foreground write ?
  1430.            mode 5:  Fore and background write
  1431.        3  Enable Read Color Compare
  1432.        4  Enable odd/even (3C4h index 4 bit 2).
  1433.        5  Shift 2 bits per byte
  1434.        6  256 Color Mode
  1435.  
  1436. 3CEh index 09h (R/W):  Offset Register 0
  1437. bit  0-7  4K Primary/Low bank number.
  1438.           If 3CEh index 0Bh bit 0 is set references to A000h-A7FFh use this
  1439.           bank register. If clear references to A000h-AFFFh use this bank
  1440.           register. (5426-3x) If index 0Bh bit 5 is set this register is in
  1441.           units of 16KB, rather than 4KB
  1442.  
  1443. 3CEh index 0Ah (R/W):  Offset Register 1
  1444. bit  0-7  4K High bank number.
  1445.           If 3CEh index 0Bh bit 0 is set references to A800h-AFFFh use this
  1446.           bank register. (5426-3x) If index 0Bh bit 5 is set this register is
  1447.           in units of 16KB, rather than 4KB
  1448.  
  1449.  
  1450. 3CEh index 0Bh (R/W):  Extension Control
  1451. bit    0  If set references to A000h-A7FFh use 3CEh index 9 as bank register,
  1452.           and references to A800h-AFFFh use 3CEh index 0Ah as bank register.
  1453.           If clear all references to A000h-AFFFh use 3CEh index 9 as bank
  1454.           register.
  1455.        1  Enable BY8 Addressing for 256 color modes
  1456.        2  Enable Extended Write Modes if set (mode 4 and 5)
  1457.        3  Enable 8byte memory read Data Latch
  1458.        4  Enable Enhanced Writes for 16bit pixels (if bit 2 is set)
  1459.        5  (5426-3x) Offset Granularity.
  1460.           If set the bank registers are in 16K rather than 4K steps.
  1461.  
  1462. 3CEh index 0Ch (R/W):  Color Key Compare                        (5424-3x only)
  1463. bit  0-7  Color Key Compare bits 0-7
  1464.  
  1465. 3CEh index 0Dh (R/W):  Color Key Compare Mask                   (5424-3x only)
  1466. bit  0-7  Color Key Compare Key Mask 0-7
  1467.  
  1468. 3CEh index 0Eh (R/W):  Miscellaneous Control                       (543x only)
  1469. bit    0  DCLK Output Divide by 2
  1470.        1  Static HSYNC
  1471.        2  Static VSYNC
  1472.  
  1473. 3CEh index 0Fh (R/W:  Display Compression Control                  (543x only)
  1474. bit    0  Enable Compression
  1475.        1  Horizontal Compression
  1476.      2-4  Vertical Compression
  1477.  
  1478. 3CEh index 10h (R/W):  16bit Pixel Background Color High Byte   (5422-3x only)
  1479. bit  0-7  Extended BackGround color bits 8-15 in write mode 5.
  1480.           This data sent to planes 1/3, data from 3CEh index 0 sent to 2/4
  1481.  
  1482. 3CEh index 11h (R/W):  16bit Pixel Foreground Color High Byte   (5422-3x only)
  1483. bit  0-7  Extended ForeGround color bits 8-15 in write mode 4/5.
  1484.           This data sent to planes 1/3, data from 3CEh index 1 sent to 2/4
  1485.  
  1486. 3CEh index 12h (R/W):  Background Color Byte 2                     (543x only)
  1487. bit  0-7  Extended BackGround color bits 16-23 in write mode 5.
  1488.  
  1489. 3CEh index 13h (R/W):  Foreground Color Byte 2                     (543x only)
  1490. bit  0-7  Extended ForeGround color bits 16-23 in write mode 4/5.
  1491.  
  1492. 3CEh index 14h (R/W):  Background Color Byte 3                     (543x only)
  1493. bit  0-7  Extended BackGround color bits 24-31 in write mode 5.
  1494.  
  1495. 3CEh index 15h (R/W):  Foreground Color Byte 3                     (543x only)
  1496. bit  0-7  Extended ForeGround color bits 24-31 in write mode 4/5.
  1497.  
  1498. 3CEh index 20h W(R/W):  BLT Width                               (5426-3x only)
  1499. bit 0-10  (5426-28) Number of pixels across in the BLIT area.
  1500.     0-12  (543x)    do
  1501.  
  1502. 3CEh index 22h W(R/W):  BLT Height                              (5426-3x only)
  1503. bit  0-9  (5426-28) Number of lines in the BLIT area.
  1504.     0-10  (543x)    do
  1505.  
  1506. 3CEh index 24h W(R/W):  BLT Destination Pitch                   (5426-3x only)
  1507. bit 0-11  (5426-28) Number of bytes in a scanline at the destination.
  1508.     0-12  (543x)    do
  1509.  
  1510. 3CEh index 26h W(R/W):  BLT Source Pitch                        (5426-3x only)
  1511. bit 0-11  (5426-28) Number of bytes in a scanline at the source.
  1512.     0-12  (543x)    do
  1513.  
  1514. 3CEh index 28h 3(R/W):  BLT Destination Start                   (5426-3x only)
  1515. bit 0-20  (5426-28) Destination address of the BLIT.
  1516.     0-21  (543x)    do
  1517.  
  1518. 3CEh index 2Ch 3(R/W):  BLT Source Start                        (5426-3x only)
  1519. bit 0-20  (5426-28) Source address of the BLIT.
  1520.     0-21  (543x)    do
  1521.  
  1522. 3CEh index 2Fh (R/W):  Write Mask Destination                      (543x only)
  1523. bit  0-2  Write Mask
  1524.        7  Disable X-Y Offset Indexing
  1525.  
  1526. 3CEh index 30h (R/W):  BLT Mode                                 (5426-3x only)
  1527. bit    0  BLT Direction. Set to decrement addresses during BitBLT operations,
  1528.           clear to increment.
  1529.        1  BLT Destination. Set if system memory, clear if display memory.
  1530.        2  BLT Source. Set if system memory, clear if display memory.
  1531.        3  Enable Color Expand with Transparency Compare
  1532.        4  (5426-28) Color Expand/Transparency Width
  1533.      4-5  (543x)    do
  1534.        6  Enable 8x8 Pattern Copy
  1535.        7  Enable Color Expand
  1536.  
  1537. 3CEh index 31h (R/W):  BLT Start/Status                         (5426-3x only)
  1538. bit    0  (R) BLT Status.  Set if busy
  1539.        1  Set to start BLT operation, clear to suspend
  1540.        2  BLT Reset
  1541.        3  (R) BLT Progress Status
  1542.  
  1543. 3CEh index 32h (R/W):  BLT Raster Operation (ROP)               (5426-3x only)
  1544. bit  0-7  BLT 2-operand Raster Operation.
  1545.             00h  0
  1546.             05h  And
  1547.             06h  Destination
  1548.             09h  Source And Not Destination
  1549.             0Bh  Not Destination
  1550.             0Dh  Copy from source
  1551.             0Eh  1
  1552.             50h  Not Source And Destination
  1553.             59h  Xor
  1554.             6Dh  Or
  1555.             90h  Nor
  1556.             95h  XNor
  1557.             ADh  Source Or Not Destination
  1558.             D0h  Not Source
  1559.             D6h  Not Source Or Destination
  1560.             DAh  NAnd
  1561.  
  1562. 3CEh index 33h (R/W):  BLT Reserved                                (543x only)
  1563.  
  1564. 3CEh index 34h W(R/W): BLT Trans Color                          (5426/28 only)
  1565. bit 0-15  BLT Transparency Color
  1566.  
  1567. 3CEh index 38h W(R/W): BLT Trans Mask                           (5426/28 only)
  1568. bit 0-15  BLT Transparency Color Mask
  1569.  
  1570. 3d4h index 19h (R/W):  Interlace End
  1571. bit  0-7  Ending Horizontal Character Count for Odd field VSYNC.
  1572.           Typically half the horizontal total
  1573.  
  1574. 3d4h index 1Ah (R/W):  Miscellaneous Control
  1575. bit    0  Enable Interlace sync/video data in Graphics mode or interlace only
  1576.           in Text mode. Set if an interlaced mode.
  1577.        1  Enable Double-Buffered Display Start Address
  1578.      2-3  Overlay/DAC Mode Switching Control
  1579.             0:  Normal Operation
  1580.             1:  with EVIDEO*
  1581.             2:  with EVIDEO* and Color Key (5424-3x only)
  1582.             3:  with Color Key
  1583.      4-5  Horizontal Blank End Overflow bits 6-7
  1584.      6-7  Vertical Blank End Overflow bits 8-9
  1585.  
  1586. 3d4h index 1Bh (R/W):  Extended Display Control
  1587. bit    0  Display Start Address bit 16. Bit 0-15 are in 3d4h index Ch-Dh.
  1588.        1  Enable Extended Address Wrap. Set to enable access to video memory
  1589.           beyond 128K (16bit memory) or 256K (32bit memory)
  1590.        2  (5420-3x) Display Start Address bit 17
  1591.        3  (5426-3x) Display Start Address bit 18
  1592.        4  Bit 8 of the CRTC Offset register (3d4h index 13h) ?.
  1593.        5  Blanking Control
  1594.        6  Select Text mode Fast-Page (132 color text)
  1595.        7  (5426-3x) Enable Blank End Extensions
  1596.  
  1597. 3d4h index 1Ch (R/W):  Sync Adjust and Genlock                     (543x only)
  1598. bit  0-2  Horizontal Sync Start Adjust
  1599.      3-5  Horizontal Total Adjust
  1600.        6  Enable HSYNC GENLOCK
  1601.        7  Enable VSYNC GENLOCK
  1602.  
  1603. 3d4h index 1Dh (R/W):  Overlay Extended Control                    (543x only)
  1604. bit    0  Enable Alpha Overlay
  1605.      1-2  DAC Mode Switching
  1606.        3  Overlay Video Clocking Mode
  1607.      4-5  Color Key Compare type
  1608.        7  Extended Display Start Address bit 19.
  1609.  
  1610. 3d4h index 25h (R/W):  Part Status Register                         (not 5402)
  1611. bit  0-7  Part Status
  1612.  
  1613. 3d4h index 27h (R):  Part ID register
  1614. bit  0-1  Revision Level
  1615.      2-7  (54xx) Device Identifier:
  1616.                   06h: Acumos AVGA2 ??
  1617.                   22h: Depends on revision Level:
  1618.                        CL-GD5402        Rev=0  (88h)
  1619.                        CL-GD5402 rev 1  Rev=1  (89h)
  1620.                        CL-GD5420        Rev=2  (8Ah)
  1621.                        CL-GD5420 rev 1  Rev=3  (8Bh)
  1622.                   23h: CL-GD5422           (8Ch-8Fh)
  1623.                   24h: CL-GD5426           (90h-93h)
  1624.                   25h: CL-GD5424           (94h-97h)
  1625.                   26h: CL-GD5426           (98h-9Bh)
  1626.                   29h: CL-GD543x           (A4h-A7h)
  1627. Note: One source claims the 5428 has ID 24h & Rev 1  I.e. code. 91h
  1628. Note: I've seen one chip marked as 5422-80, which returns 94h i.e. a 5424.
  1629.  
  1630.  
  1631.   Memory locations:
  1632.  
  1633.   $C000:$8  1 byte   Offset of Model string in BIOS.
  1634.  
  1635.  
  1636.  
  1637.  
  1638.  
  1639.   ID Cirrus VGA:
  1640.  
  1641.  
  1642.   (* First test for Cirrus 54xx *)
  1643.  
  1644.   old:=rdinx($3C4,6);
  1645.   wrinx($3C4,6,0);
  1646.   if rdinx($3C4,6)=$F then
  1647.   begin
  1648.     wrinx($3c4,6,$12);
  1649.     if (rdinx($3C4,6)=$12) and testinx2($3C4,$1E,$3F) then
  1650.     begin
  1651.       SubVers:=rdinx($3d4,$27);
  1652.       if testinx($3CE,9) then
  1653.         case SubVers of
  1654.               $88:name:='Cirrus CL-GD5402';
  1655.               $89:name:='Cirrus CL-GD5402 r1';
  1656.               $8A:name:='Cirrus CL-GD5420';
  1657.               $8B:name:='Cirrus CL-GD5420 r1';
  1658.          $8C..$8F:name:='Cirrus CL-GD5422';
  1659.          $90..$93:name:='Cirrus CL-GD5426';
  1660.          $94..$97:name:='Cirrus CL-GD5424';
  1661.          $98..$9B:name:='Cirrus CL-GD5428';
  1662.          $A4..$A7:name:='Cirrus CL-GD543x';
  1663.         else UNK('Cirrus54',x);
  1664.         end
  1665.       else if testinx($3C4,$19) then
  1666.         case SubVers shr 6 of
  1667.           0:name:='Cirrus CL-GD6205';
  1668.           1:name:='Cirrus CL-GD6235';
  1669.           2:name:='Cirrus CL-GD6215';
  1670.           3:name:='Cirrus CL-GD6225';
  1671.         end
  1672.       else name:='Cirrus AVGA2 (5402)';
  1673.     end;
  1674.   end
  1675.   else wrinx($3C4,6,old);
  1676.  
  1677.  
  1678.   (* Now test for 64xx *)
  1679.  
  1680.   old:=rdinx($3CE,$A);
  1681.   wrinx($3CE,$A,$CE);
  1682.   if rdinx($3CE,$A)=0 then
  1683.   begin
  1684.     wrinx($3CE,$A,$EC);
  1685.     if rdinx($3CE,$A)=1 then
  1686.     begin
  1687.       SubVers:=rdinx($3CE,$AA);
  1688.       case SubVers shr 4 of
  1689.         4:name:='Cirrus CL-GD6440';
  1690.         5:name:='Cirrus CL-GD6412';
  1691.         6:name:='Cirrus CL-GD5410';
  1692.         7:name:='Cirrus CL-GD6420';
  1693.         8:name:='Cirrus CL-GD6410';
  1694.       else UNK('Cirrus64')
  1695.       end;
  1696.     end;
  1697.   end;
  1698.   wrinx($3CE,$A,old);
  1699.  
  1700.   (* Now test for 5/600 *)
  1701.  
  1702.   old6:=rdinx($3C4,6);
  1703.   old:=rdinx(base,$C);
  1704.   outp(base+1,0);
  1705.   SubVers:=rdinx($3d4,$1F);
  1706.   wrinx($3C4,6,(eagle shl 4)+(eagle shr 4));
  1707.   if inp($3C5)=0 then
  1708.   begin
  1709.     outp($3C5,SubVers);
  1710.     if inp($3C5)=1 then
  1711.       case SubVers of
  1712.         $EC:Cirrus 510/520;
  1713.         $CA:Cirrus 610/620;
  1714.         $EA:Cirrus Video7 OEM;
  1715.       else UNK(Cirrus)
  1716.       end;
  1717.   end;
  1718.   wrinx(base,$C,old);
  1719.   wrinx($3C4,6,old6);
  1720.  
  1721.  
  1722.  
  1723.   Modes for the GD 5320:
  1724.  
  1725.   18h T  132   25   2
  1726.   19h T  132   34   2
  1727.   1Ah T  132   44   2
  1728.   1Ch T  132   25  16
  1729.   1Dh T  132   43  16
  1730.   1Eh T  132   44  16
  1731.   23h T  132   25  16
  1732.   24h T  132   28  16
  1733.   25h G  640  480  16  PL4
  1734.   29h G  800  600  16  PL4
  1735.   2Dh G  640  350 256  P8
  1736.   60h T  132   25
  1737.   61h G  640  400  16  PL4
  1738.   61h T  132   50              HUH ??
  1739.   62h G  640  450  16  PL4
  1740.   70h G  360  480 256  P8
  1741.   71h G  528  400 256  P8
  1742.   72h G  528  480 256  P8
  1743.   74h G  320  240 256  P8
  1744.   75h G  640  400 256  P8
  1745.  
  1746.  
  1747.   Modes for the GD 54xx:
  1748.  
  1749.   14h T  132   25  16 (8x16)
  1750.   54h T  132   43  16 (8x8)
  1751.   55h T  132   25  16 (8x14)
  1752.   56h T  132   43   2           (5402 only)
  1753.   57h T  132   25   2           (5402 only)
  1754.   58h G  800  600  16  PL4
  1755.   59h G  800  600   2           (5402 only)
  1756.   5Ch G  800  600 256  P8
  1757.   5Dh G 1024  768  16  PL4
  1758.   5Eh G  640  400 256  P8   (5402 only)
  1759.   5Fh G  640  480 256  P8
  1760.   60h G 1024  768 256  P8
  1761.   64h G  640  480 64K  P16
  1762.   65h G  800  600 64K  P16
  1763.   66h G  640  480 32K  P15
  1764.   67h G  800  600 32K  P15
  1765.   6Ah G  800  600  16  PL4
  1766.   6Ch G 1280 1024  16  PL4
  1767.   6Dh G 1280 1024 256  P8
  1768.   6Fh G  320  200 64K  P16
  1769.   70h G  320  200 16M  P24
  1770.   71h G  640  480 16M  P24
  1771.   74h G 1024  768 64K  P16
  1772.  
  1773.  
  1774. -- BIOS extensions --
  1775. ----------1012-80----------------------------------
  1776. INT 10 - VIDEO Cirrus Logic - Get Chip ID
  1777.         AH = 12h
  1778.         BL = 80h
  1779. Return: AL = Chip ID:
  1780.                2   CL-GD 510/610
  1781.                3   CL-GD 610/620
  1782.                4   CL-GD 5320
  1783.                5   CL-GD 6410
  1784.                6   CL-GD 5410
  1785.                7   CL-GD 6420
  1786.                8   CL-GD 6412
  1787.                9   CL-GD 6416
  1788.               10h  CL-GD 5401
  1789.               11h  CL-GD 5402
  1790.               12h  CL-GD 5420
  1791.               13h  CL-GD 5422
  1792.               14h  CL-GD 5424
  1793.               15h  CL-GD 5426
  1794.               16h  CL-GD 5420 rev 1 ??
  1795.               17h  CL-GD 5402 rev 1 ??
  1796.               18h  CL-GD 5428
  1797.               20h  CL-GD 6205
  1798.               21h  CL-GD 6215
  1799.               22h  CL-GD 6225
  1800.               30h  CL-GD 5432
  1801.               31h  CL-GD 5434
  1802.               40h  CL-GD 6440
  1803.               41h  CL-GD 6450
  1804.         BL = Silicon Revision number (bit 7 set if not available)
  1805.         BH = bit 2 set if using CL-GD 6340 LCD interface 
  1806. ----------1012-81---------------------------------------
  1807. INT 10 - VIDEO - Cirrus Logic - Get BIOS Version
  1808.         AH = 12h
  1809.         BL = 81h
  1810. Return: AH = Major Version
  1811.         AL = Minor Version
  1812. ----------1012-82---------------------------------------
  1813. INT 10 - VIDEO - Cirrus Logic - GET DESIGN REVISION CODE
  1814.         AH = 12h
  1815.         BL = 82h
  1816. Return: AL = Chip Revision
  1817.         AH = ??
  1818. ----------1012-85---------------------------------------
  1819. INT 10 - VIDEO - Cirrus Logic - Get Memory
  1820.         AH = 12h
  1821.         BL = 85h
  1822. Return: AL = Video Memory in 64K units
  1823. --------V-1012--BL89-------------------------
  1824. INT 10 - Cirrus Logic BIOS v3.02 - LCD panel - EN/DISABLE REVERSE VIDEO MODE
  1825.         AH = 12h
  1826.         BL = 89h
  1827.         AL = new state (00h enabled, 01h disabled)
  1828. --------V-1012--BL8A-------------------------
  1829. INT 10 - Cirrus Logic BIOS v3.02 - LCD panel - SET FRAME COLOR
  1830.         AH = 12h
  1831.         BL = 8Ah
  1832.         AL = new grey-scale color (00h = black to 0Fh = white)
  1833. --------V-1012--BL8B-------------------------
  1834. INT 10 - Cirrus Logic BIOS v3.02 - LCD panel - ENABLE/DISABLE BOLD MODE
  1835.         AH = 12h
  1836.         BL = 8Bh
  1837.         AL = new state (00h enabled, 01h disabled)
  1838. --------V-1012--BL8C-------------------------
  1839. INT 10 - Cirrus Logic BIOS v3.02 - LCD panel - SET AUTOMAP/EMULATE ATTRIBUTES
  1840.         AH = 12h
  1841.         BL = 8Ch
  1842.         AL = new state
  1843.              00h enable automap
  1844.              01h disable automap and emulate attributes
  1845. --------V-1012--BL8F-------------------------
  1846. INT 10 - Cirrus Logic BIOS v3.02 - LCD panel - ENABLE/DISABLE EXPAND MODE
  1847.         AH = 12h
  1848.         BL = 8Fh
  1849.         AL = new state (00h enabled, 01h disabled)
  1850. Note: when expand mode is enabled, the vertical dimension is enlarged to
  1851.       full screen
  1852. --------V-1012--BL90-------------------------
  1853. INT 10 - Cirrus Logic BIOS v3.02 - LCD panel - SET CENTERING MODE
  1854.         AH = 12h
  1855.         BL = 90h
  1856.         AL = new position
  1857.               00h centered
  1858.               01h from top
  1859.               02h from bottom
  1860.               03h from top
  1861. --------V-1012--BL91-------------------------
  1862. INT 10 - Cirrus Logic BIOS v3.02 - LCD panel - SET 720-DOT FIXUP MODE
  1863.         AH = 12h
  1864.         BL = 91h
  1865.         AL = new mode
  1866.               00h display MGA mode from left of screen (default)
  1867.               01h display MGA from right
  1868.               02h skip every ninth pixel
  1869.               03h OR every 8th and 9th pixel
  1870. --------V-1012--BL92-------------------------
  1871. INT 10 - Cirrus Logic BIOS v3.02 - LCD panel - SWITCH DISPLAY
  1872.         AH = 12h
  1873.         BL = 92h
  1874.         AL = new display (00h LCD, 01h external monitor)
  1875. Note: the deselected display is disabled
  1876. ----------1012-93---------------------------------------
  1877. INT 10 - VIDEO - Cirrus Logic - FORCE 8bit OR 16bit OPERATION
  1878.         AH = 12h
  1879.         BL = 93h
  1880.         AL = New I/O width (00h = 16bits, 01h = 8bits).
  1881. --------V-1012--BL94-------------------------
  1882. INT 10 - Cirrus Logic BIOS v3.02 - POWER CONSERVATION
  1883.         AH = 12h
  1884.         BL = 94h
  1885.         AL = new state (00h wake up monitor, 01h shut down display)
  1886. Note: AL=01h is reported not to work properly on the LCD panel
  1887. ----------1012-9A---------------------------------------
  1888. INT 10 - VIDEO - Cirrus Logic - GET USER OPTIONS
  1889.         AH = 12h
  1890.         BL = 9Ah
  1891. Return: AX = Options Word 1:
  1892.              Bit 2-4  Monitor type
  1893.                  5-6  Maximum Vertical Resolution
  1894.                   10  Force 8bit operation
  1895.                   14  Vertical Refresh Frequency at 640x480
  1896.         CX = Options Word 2:
  1897.              Bit 4-5  Vertical Refresh Frequency at 1280x1024
  1898.                11-12  Vertical Refresh Frequency at 800x600
  1899.                13-15  Vertical Refresh Frequency at 1024x768
  1900. ----------1012-A0---------------------------------------
  1901. INT 10 - VIDEO - Cirrus Logic - GET VIDEO MODE AVAILABILITY
  1902.         AH = 12h
  1903.         AL = Video mode number
  1904.         BL = A0h
  1905. Return: AH = Bit 0: Video mode supported
  1906.         BX = Offset of BIOS subrutine to fixup standard video parameters.
  1907.              (Call subrutine with DS:SI and ES:DI as returned by this call)
  1908.         DS:SI -> Standard Video Parameters or FFFFh:FFFFh
  1909.         ES:DI -> Supplemental Video Parameters or FFFFh:FFFFh
  1910. ----------1012-A1---------------------------------------
  1911. INT 10 - VIDEO - Cirrus Logic - READ MONITOR TYPE AND ID FROM 15PIN CONNECTOR
  1912.         AH = 12h
  1913.         BL = A1h
  1914. Return: BH = Monitor ID:
  1915.                00h-08h  Reserved
  1916.                    09h  IBM 8604/8507
  1917.                    0Ah  IBM 8514
  1918.                    0Bh  IBM 8515
  1919.                    0Dh  IBM 8503
  1920.                    0Eh  IBM 8512/8513
  1921.                    0Fh  no monitor
  1922.         BL = Monitor Type. 00h: Color, 01h: Grayscale, 02h: Display
  1923. ----------1012-A2---------------------------------------
  1924. INT 10 - VIDEO - Cirrus Logic - SET MONITOR HORIZONTAL RETRACE FREQUENCY
  1925.         AH = 12h
  1926.         BL = A2h
  1927.         AL = Monitor Type
  1928.                00h  Standard VGA
  1929.                01h  8514-compatible (31.5 + 35.5 kHz)
  1930.                02h  SuperVGA (31.5 - 35.1 kHz)
  1931.                03h  Extended SuperVGA (31.5 - 35.5 kHz)
  1932.                04h  multi-frequency (31.5 - 37.8 kHz)
  1933.                05h  extended multi-frequency (31.5 - 48-0 kHz)
  1934.                06h  super multi-frequency (31.5 - 56.0 kHz)
  1935.                07h  extended super multi-frequency (31.5 - 64.0 kHz)
  1936. ----------1012-A3---------------------------------------
  1937. INT 10 - VIDEO - Cirrus Logic - SET VGA REFRESH
  1938.         AH = 12h
  1939.         BL = A3h
  1940.         AL = refresh rate for 640x480 (00h normal, 01h high)
  1941. ----------1012-A4---------------------------------------
  1942. INT 10 - VIDEO - Cirrus Logic - SET MONITOR TYPE
  1943.         AH = 12h
  1944.         BL = A4h
  1945.         AL = Bits 0-3  Maximum Vertical Resolution
  1946.                          0: 480, 1: 600, 2: 768, 3: 1024
  1947.                   4-7  Vertical Refresh at 640x480:
  1948.                          0: 60Hz, 1: 72Hz
  1949.         BH = Bits 0-3  Vertical Refresh at 800x600:
  1950.                          0: 56Hz, 1: 60Hz, 2: 72Hz
  1951.                   4-7  Vertical Refresh at 1024x768:
  1952.                          0: 87Hz i-laced, 1: 60Hz, 2: 70Hz, 3: 72Hz, 4: 76Hz
  1953.         CH = Bits 4-7  Vertical Refresh at 1280x1024:
  1954.                          0: 87Hz i-laced, 1: 60Hz, 2: 70Hz
  1955.  
  1956. Many other functions exist in the range BL = 80h - A3h
  1957.