Cirrus Logic  CL-GD 500/600

   CL-GD 510/520
   CL-GD 610/620

   CL-GD 5422        Upto 1MB, 1024x768x256.     Very different from 5/6xx series
                     This is sometimes called AVGA3 any relation to AcuMos ??




 3C4h index  6  (W):
 bit 0-7  Writing ("Eagle ID" rol 4) will disable extensions.
          "Eagle ID" will enable.
          Reading will return 0 if last write was to disable,
          1 if it was to enable

 3C4h index 80h (R/W): Miscellaneous Control 1

 3C4h index 81h (R/W): Graphics Position 1

 3C4h index 82h (R/W): Graphics Position 2

 3C4h index 83h (R/W): Attribute Controller Index

 3C4h index 84h (R/W): Write Control

 3C4h index 85h (R/W): Timing Control

 3C4h index 86h (R/W): Bandwidth Control

 3C4h index 87h (R/W): Miscellaneous Control 2

 3C4h index 88h (R/W): Horizontal Sync skew

 3C4h index 89h (R/W): CGA, HGC Font Control

 3C4h index 8Ah (R/W): Reserved

 3C4h index 8Bh (R/W): Screen B preset row scan

 3C4h index 8Ch (R/W): Screen B start address high

 3C4h index 8Dh (R/W): Screen B start address low

 3C4h index 8Eh (R): Version Code

 3C4h index 8Fh (R): Version Code

 3C4h index 90h (R/W): Vertical Retrace Start

 3C4h index 91h (R/W): Vertical Retrace End

 3C4h index 92h (R/W): Lightpen High

 3C4h index 93h (R/W): Lightpen Low

 3C4h index 94h (R/W): Pointer Pattern Address High

 3C4h index 95h (R/W): Cursor Height Adjust

 3C4h index 96h (R/W): Caret Width

 3C4h index 97h (R/W): Caret Height

 3C4h index 98h (R/W): Caret Horizontal Position High

 3C4h index 99h (R/W): Caret Horizontal Position Low

 3C4h index 9Ah (R/W): Caret Vertical Position High

 3C4h index 9Bh (R/W): Caret Vertical Position Low

 3C4h index 9Ch (R/W): Pointer Horizontal Position High

 3C4h index 9Dh (R/W): Pointer Horizontal Position Low

 3C4h index 9Eh (R/W): Pointer Vertical Position High

 3C4h index 9Fh (R/W): Pointer Vertical Position Low

 3C4h index A0h (R/W): Graphics Controller Memory Latch 0

 3C4h index A1h (R/W): Graphics Controller Memory Latch 1

 3C4h index A2h (R/W): Graphics Controller Memory Latch 2

 3C4h index A3h (R/W): Graphics Controller Memory Latch 3

 3C4h index A4h (R/W): Clock Select

 3C4h index A5h (R/W): Cursor (Caret and pointer) Attribute

 3C4h index A6h (R/W): Internal Switch Source

 3C4h index A7h (R/W): Status Switch Control

 3C4h index A8h (R/W): NMI Mask 1

 3C4h index A9h (R/W): NMI Mask 2

 3C4h index AAh (R/W): Reserved

 3C4h index ABh (R):   NMI Status 1

 3C4h index ACh (R):   NMI Status 2

 3C4h index ADh (R/W): 256 Color mode Page Control

 3C4h index AEh (R):   NMI data cache (Four 24 bit words

 3C4h index AFh (R/W): Active Adapter State

 3C4h index B0h..BFh (R/W): Scratch Registers

 3C4h index C0h..FFh (R/W): Reserved

 3d4h index  Ch (R/W): Screen A start address Hi
 Must be cleared before the Eagle ID Register (3d4h index 1Fh) can be read.

 3d4h index 1Fh (R):  Eagle ID register
 bit 0-7  Eagle ID.  Used for test of 3C4h index 6.
          ECh for CL-GD 510/520, CAh for 610/620. EAh for Video7 boards.



GD5422 series:

 3C4h index  6  (R/W)
 bit 0-7  Writing 12h to this register seems to enable extensions.
          Unlike earlier Cirrus Chips the value can be read from the register.

 3C4h index  7  (R/W):
 bit 0-2  Memory mode. 1=256 colors, 3=15/16 bit RGB, 5=24bit RGB

 3C4h index  8  (R/W):

 3C4h index  9  (R/W):
 bit 2-4  Monitor type. 0=Std VGA

 3C4h index 0Ah (R/W):

 3C4h index 0Bh (R/W):

 3C4h index 0Ch (R/W):

 3C4h index 0Dh (R/W):

 3C4h index 0Eh (R/W):

 3C4h index 0Fh (R/W):
 bit 3-4  Video memory. 0=256K, 1=512K, 2=1MB.
       5  Set if 256 or more colors ?

 3C4h index 10h (R/W):

 3C4h index 11h (R/W):

 3C4h index 12h (R/W):

 3C4h index 13h (R/W):

 3C4h index 18h (R/W):

 3C4h index 19h (R/W):

 3C4h index 1Ah (R/W):

 3C4h index 1Bh (R/W):

 3C4h index 1Ch (R/W):

 3C4h index 1Dh (R/W):

 3C4h index 1Eh (R/W):

 3CEh index 09h (R/W):
 bit 0-7  4K Primary bank number.

 3CEh index 0Ah (R/W):
 bit 0-7  4K bank number  (How do you enable this second bank register,
                           and how does it work ?).

 3CEh index 0Bh (R/W):

 3CEh index 10h (R/W):

 3CEh index 11h (R/W):

 3CEh index 12h (R/W):

 3d4h index 19h (R/W):

 3d4h index 1Ah (R/W):
 bit   0  Set if an interlaced mode.

 3d4h index 1Bh (R/W):
 bit   0  Display Start Address bit 16. Bit 0-15 are in 3d4h index Ch-Dh.
       2  Display Start Address bit 17
       4  Bit 8 of the CRTC Offset register (3d4h index 13h) ?.

 3d4h index 27h (R):  Chip ID
 bit 0-7  8Ah (type2), 8Ch-8Fh (type3), 90h-93h (type5) or 94h-97h (type4).

 Memory locations:

 $C000:$6  2 bytes  'CL'  if Cirrus Bios



 ID Cirrus VGA:

 old:=rdinx(base,12);
 outp(base+1,0);
 eagle:=rdinx(base,$1f);
 wrinx($3c4,6,(eagle shl 4)+(eagle shr 4));
 if inp($3c5)=0 then
 begin
   outp($3c5,eagle);
   if inp($3c5)=1 then
     case eagle of
       $EC:Cirrus 510/520;
       $CA:Cirrus 610/620;
       $EA:Cirrus Video7 OEM;
     end;
 end;
 wrinx(base,12,old);


 Video Modes:

 15h T  132   25   2 (8x14)
 16h T  132   44   2 (8x8)
 18h T  132   30   2 (8x)
 1Eh T  132   25  16 (8x8)
 1Fh T  132   25  16 (8x14)
 20h T  132   44  16 (8x8)
 22h T  132   30  16 (8x)
 31h T  100   37   2
 40h G  720  540  16 planar
 50h G  640  400 256 packed
 51h G  512  480 256 packed    Note: not supported in all Bios'es
 63h G  720  540  16 planar
 64h G  800  600  16 planar
 6Ah G  800  600  16 planar


 Modes for the GD 5320:

 61h G  640  400  16 planar
 62h G  640  450  16 planar
 70h G  360  480 256 packed
 71h G  528  400 256 packed
 72h G  528  480 256 packed
 74h G  320  240 256 packed
 75h G  640  400 256 packed

 Mode 50h and 51h use a special system where four pixels are stored at the
 same byte address in plane 0,1,2 and 3 respectively.


 Modes for the GD 5422:

 14h T  132   25  16 (8x16)
 54h T  132   43  16 (8x8)
 55h T  132   25  16 (8x14)
 58h G  800  600  16 planar
 5Ch G  800  600 256 packed
 5Dh G 1024  768  16 planar
 5Fh G  640  480 256 packed
 60h G 1024  768 256 packed
 64h G  640  480 64K Sierra 16bit
 65h G  800  600 64K Sierra 16bit
 66h G  640  480 32K Sierra 15bit
 67h G  800  600 32K Sierra 15bit
 6Ah G  800  600  16 planar
 6Ch G 1280 1024  16 planar
 6Fh G  320  200 64K Sierra 16bit
 70h G  320  200 16M RGB
 71h G  640  480 16M RG