home *** CD-ROM | disk | FTP | other *** search
/ Collection of Hack-Phreak Scene Programs / cleanhpvac.zip / cleanhpvac / PCGPEV10.ZIP / CAT.TXT < prev    next >
Text File  |  1994-05-10  |  7KB  |  164 lines

  1.  
  2.           ┌──────────────────────────────────────────────────┐
  3.           │ Programming the Chips And Technologies SVGA Chip │
  4.           └──────────────────────────────────────────────────┘
  5.  
  6.                  Written for the PC-GPE by Mark Feldman
  7.               e-mail address : u914097@student.canberra.edu.au
  8.                                myndale@cairo.anu.edu.au
  9.  
  10.                   Please read the file SVGINTRO.TXT
  11.               (Graphics/SVGA/Intro PC-GPE menu option)
  12.  
  13.              ┌───────────────────────────────────────────┐
  14.              │      THIS FILE MAY NOT BE DISTRIBUTED     │
  15.              │ SEPARATE TO THE ENTIRE PC-GPE COLLECTION. │
  16.              └───────────────────────────────────────────┘
  17.  
  18.  
  19. ┌────────────┬───────────────────────────────────────────────────────────────
  20. │ Disclaimer │
  21. └────────────┘
  22.  
  23. I assume no responsibility whatsoever for any effect that this file, the
  24. information contained therein or the use thereof has on you, your sanity,
  25. computer, spouse, children, pets or anything else related to you or your
  26. existance. No warranty is provided nor implied with this information.
  27.  
  28. ┌────────────┬───────────────────────────────────────────────────────────────
  29. │ Setup mode │
  30. └────────────┘
  31.  
  32. To modify some of the CAT's internal SVGA registers the card must be placed
  33. into setup mode. This is done by writing the value 1Eh to port 46E8h. To
  34. exit setup mode write the value 0Eh to port 46E8h.
  35.  
  36. ┌─────────────────────┬──────────────────────────────────────────────────────
  37. │ Enabling Extensions │
  38. └─────────────────────┘
  39.  
  40. The CAT's extended registers are normally locked and must be enabled before
  41. you attempt to modify them. To enable them, you must enter setup mode,
  42. write the value 80h to port 103h and exit setup mode. To disable them
  43. you must enter setup mode, write the value 00h to port 103h and exit
  44. setup mode.
  45.  
  46. ┌──────────────────────────┬─────────────────────────────────────────────────
  47. │ Identifying the CAT Chip │
  48. └──────────────────────────┘
  49.  
  50. Detecting the presence of a CAT chip can be done by entering setup mode,
  51. checking that the value returned from reading port 104h is A5h and then
  52. exiting setup mode.
  53.  
  54. ┌────────────────────────────────────────────────┬───────────────────────────
  55. │ Identifying which CAT Chip and Revision Number │
  56. └────────────────────────────────────────────────┘
  57.  
  58. The CAT chip type and revision number can be determined by enabling
  59. extensions, reading the value of register 0 and disabling extensions.
  60. The top 4 bits (4-7) are the chip id and the lower 4 are the version
  61. number.
  62.  
  63.                      ┌───────────────────────────────┐
  64.                      │ Chip ID      Chip             │
  65.                      ├───────────────────────────────┤
  66.                      │    1         82c451 or 82c452 │
  67.                      │    2         82c455           │
  68.                      │    3         82c453           │
  69.                      │    5         82c456           │
  70.                      └───────────────────────────────┘
  71.  
  72.  
  73. The 82c451 and 82c452 can be distinguished by attempting to modify
  74. register 3Ah (Graphics Cursor Color 1, make sure you set it back to what it
  75. was). If the register exists the chip is an 82c452.
  76.  
  77. Alternatively the chip ID can be determined using the Get Controller
  78. Information BIOS call (see below).
  79.  
  80. ┌────────────────────────────┬───────────────────────────────────────────────
  81. │ CAT Graphics Display Modes │
  82. └────────────────────────────┘
  83.  
  84.         ┌───────────────────────────────────────────────────┐
  85.         │ Mode    Resolution   Colors          Chip         │
  86.         ├───────────────────────────────────────────────────┤
  87.         │ 25h     640x480      16              451/452/453  │
  88.         │ 6Ah     800x600      16              451/452/453  │
  89.         │ 70h     800x600      16              451/452/453  │
  90.         │ 71h     960x720      16              452          │
  91.         │ 72h     1024x768     16              452/453      │
  92.         │ 78h     640x400      256             451/452/453  │
  93.         │ 79h     640x480      256             452/453      │
  94.         │ 7Ah     768x576      256             452          │
  95.         │ 7Ch     800x600      256             453          │
  96.         │ 7Eh     1024x768     256             453          │
  97.         └───────────────────────────────────────────────────┘
  98.  
  99. ┌────────────────────────┬───────────────────────────────────────────────────
  100. │ The CAT Display Memory │
  101. └────────────────────────┘
  102.  
  103. The following registers can only be modified while the extended registers
  104. are enabled (See Enabling Extensions above).
  105.  
  106. The 451, 455 and 456 are always in single-paging mode and have 4 64K
  107. banks. To switch to a bank you must first enable access to extended memory
  108. with the following procedure:
  109.  
  110. Port[$3D6] := $0B;
  111. Port[$3D6] := Port[$3D6] and $FD;
  112.  
  113. Selecting a bank can be done with the following procedure:
  114.  
  115. Port[$3D6] := $0B;
  116. Port[$3D7] := bank_number;
  117.  
  118. where bank_number = 0 - 3. Each bank is 64K long and has a 86K granularity.
  119.  
  120. The 452 and 453 banks have a 16K granularity, so if you want 64K granularity
  121. you must multiply the bank number by 4 before writing it to the registers :
  122.  
  123. Port[$3D6] := $10;
  124. Port[$3D7] := bank_number Shl 2;  { = bank_numer * 4 }
  125.  
  126. The 452 and 453 allow duel paging. The 64K host address space is split in
  127. two, one low area A000:0000-7FFFh and a high area A000:8000-FFFFh. This
  128. mode can be enabled with the following procedure:
  129.  
  130. Port[$3D6] := $10;
  131. Port[$3D6] := Port[$3D6] or 2;
  132.  
  133. In this mode each bank also has a granularity of 16K. The lower bank is
  134. selected with the same procedure for setting the bank in single-paging
  135. mode. The upper bank is selected with the following call:
  136.  
  137. Port[$3D6] := $11;
  138. Port[$3D7] := bank_number Shl 2;  { = bank_numer * 4 }
  139.  
  140. None of the CAT chips allow you to select one bank for reading and
  141. another for writing.
  142.  
  143. ┌──────────────────────────────────────────┬─────────────────────────────────
  144. │ CAT Get Controller Information BIOS Call │
  145. └──────────────────────────────────────────┘
  146.  
  147. Int 10h
  148. Inputs :
  149.     AH = 5Fh            Extended VGA Control
  150.     AL = 00h            Get Controller Information
  151.  
  152. Returns:
  153. AL = 5Fh                Extended VGA control function supported
  154. BL = Chip type          bits 7-4 contain the chip type number
  155.                             0 = 82c451
  156.                             1 = 82c452
  157.                             2 = 82c455
  158.                             ? = 82c453
  159.                         bits 3-0 contain the revision number
  160. BH = Memory Size        Video memory size
  161.                           0 = 256k
  162.                           1 = 512k
  163.                           2 = 1M
  164.