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

  1.  
  2.                 ┌────────────────────────────────────┐
  3.                 │ Programming the Paradise 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. ┌──────────────┬─────────────────────────────────────────────────────────────
  30. │ Introduction │
  31. └──────────────┘
  32.  
  33. Western Digital have made a series of Paradise chips, the PVGA1A, WD90C00
  34. and WD90C11. Each chip is fully compatible with it's predecessors. There
  35. is also a WD90C10 which is a stripped down version of the WD90C00 used for
  36. motherboard VGA implementations and does not support 256 color modes higher
  37. that 320x200; this chip will not be discussed here.
  38.  
  39. ┌─────────────────────┬──────────────────────────────────────────────────────
  40. │ Paradise Extensions │
  41. └─────────────────────┘
  42.  
  43. To modify any of the Paradise extended registers you must enable the
  44. extensions. Disable them once you are done.
  45.  
  46. To enable extensions:
  47.  
  48. PortW[$3CE] := $050F; { Extensions on             }
  49. PortW[$3D4] := $8529; { Unlock PR10-PR17          }
  50. PortW[$3C4] := $4806; { Unlock extended sequencer }
  51.  
  52. To disable extensions :
  53.  
  54. PortW[$3CE] := $000F; { Extensions off          }
  55. PortW[$3D4] := $0029; { Lock PR10-PR17          }
  56. PortW[$3C4] := $0006; { Lock extended sequencer }
  57.  
  58. ┌────────────────────────────────────┬─────────────────────────────────────────
  59. │ Identifying the Paradise SVGA Chip │
  60. └────────────────────────────────────┘
  61.  
  62. To identify if a Paradise SVGA chip is present read the 4 bytes at memory
  63. address C000:007D. These bytes should be the string "VGA=".
  64.  
  65.                 ┌──────────────────────────────┐
  66.                 │  Memory Address   Value      │
  67.                 ├──────────────────────────────┤
  68.                 │  C000:007Dh        86d ('V') │
  69.                 │  C000:007Eh        71d ('G') │
  70.                 │  C000:007Fh        65d ('A') │
  71.                 │  C000:0080h        61d ('=') │
  72.                 └──────────────────────────────┘
  73.  
  74. ┌────────────────────────────────────────────┬───────────────────────────────
  75. │ Identifying which Paradise Chip is Present │
  76. └────────────────────────────────────────────┘
  77.  
  78. The Paradise chip present can be determined by trying to access selected
  79. registers. The following pseudo-code will determine the chip id:
  80.  
  81. var old_value : byte;
  82.  
  83. Enable Extensions
  84.  
  85. { Test for a PVGA1A }
  86. Port[$3D4] := $2B
  87. old_value := Port[$3D5]
  88. Port[$3D5] := $AA
  89. if Port[$3D5] <> $AA then
  90.   begin
  91.     chip is a PVGA1A
  92.     Port[$3D5] := old_value
  93.     return
  94.   end
  95. Port[$3D5] := old_value
  96.  
  97. { Distinguish between WD90C00 and WD90C10 }
  98. Port[$3C4] := $12
  99. old_value := Port[$3C5]
  100. Port[$3C5] := old_value and $BF
  101. if (Port[$3C5] and $40) <> 0 then
  102.   begin
  103.     chip is a WD90C00
  104.     return
  105.   end
  106. Port[$3C5] := old_value or $40
  107. if (Port[$3C5] and $40) = 0 then
  108.   begin
  109.     chip is a WD90C00
  110.     Port[$3C5] := old_value
  111.     return
  112.   end
  113. Port[$3C5] := old_value
  114.  
  115. { Distinguish between WD90C10 and WD90C11 }
  116. Port[$3C4] := $10
  117. old_value := Port[$3C5]
  118. Port[$3C5] := old_value and $FB
  119. if (Port[$3C5] and $04) <> 0 then
  120.   begin
  121.     chip is a WD90C10
  122.     Port[$3C5] := old_value
  123.     return
  124.   end
  125. Port[$3C5] := old_value or $04
  126. if (Port[$3C5] and $04) = 0 then
  127.   begin
  128.     chip is a WD90C10
  129.     Port[$3C5] := old_value
  130.     return
  131.   end
  132.  
  133. { We made it this far so it's a WD90C11 }
  134. chip is a WD90C11
  135. Port[$3C5] := old_value
  136.  
  137. ┌─────────────────────────────────┬──────────────────────────────────────────
  138. │ Paradise Graphics Display Modes │
  139. └─────────────────────────────────┘
  140.  
  141.         ┌─────────────────────────────────────────────────────────┐
  142.         │ Mode     Resolution       Colors    Chips               │
  143.         ├─────────────────────────────────────────────────────────┤
  144.         │ 58h      800x600          16        pVGA1, WDC90cxx     │
  145.         │ 59h      800x600          2         pVGA1, WDC90cxx     │
  146.         │ 5Eh      640x400          256       pVGA1, WDC90cxx     │
  147.         │ 5Fh      640x480          256       pVGA1, WD90cxx      │
  148.         │ 5Ah      1024x768         2         WD90cxx             │
  149.         │ 5Bh      1024x768         4         WD90cxx             │
  150.         │ 5Dh      1024x768         16        WD90cxx, c11 (512K) │
  151.         │ 5Ch      800x600          256       WD90c11 (512K)      │
  152.         └─────────────────────────────────────────────────────────┘
  153.  
  154. ┌─────────────────────────┬──────────────────────────────────────────────────
  155. │ Paradise Display Memory │
  156. └─────────────────────────┘
  157.  
  158. Remember, extensions must be enabled before any of the following procedures
  159. are called.
  160.  
  161. The Paradise can work in either single-paging mode, duel-paging mode or
  162. read/write mode. There are two registers used to select banks in each of
  163. the Paradise bank selection modes:
  164.  
  165.           PR0A Address Offset A
  166.           Index : 09h at port 3CEh
  167.           Read/Write at port 3CFh
  168.           ┌───┬───┬───┬───┬───┬───┬───┬───┐
  169.           │ 7 │ 6 │ 5 │ 4 │ 3 │ 2 │ 1 │ 0 │
  170.           └───┴───┴───┴───┴───┴───┴───┴───┘
  171.                 └───────────┬───────────┘
  172.                            Bank
  173.  
  174.           PR0B Address Offset A
  175.           Index : 0Ah at port 3CEh
  176.           Read/Write at port 3CFh
  177.           ┌───┬───┬───┬───┬───┬───┬───┬───┐
  178.           │ 7 │ 6 │ 5 │ 4 │ 3 │ 2 │ 1 │ 0 │
  179.           └───┴───┴───┴───┴───┴───┴───┴───┘
  180.                 └───────────┬───────────┘
  181.                            Bank
  182.  
  183. There are 128 banks and the bank granularity is 4k, so if you want a bank
  184. granularity of 64k you must multiply the bank number by 16.
  185.  
  186.  
  187. Single Paging Mode
  188. ──────────────────
  189.  
  190. In single paging mode PR0A is set to map a bank to host memory at
  191. A000:0000-FFFFh. The bank is used for both reading and writing operations.
  192. To set up for single paging mode use the following procedure:
  193.  
  194. Port[$3C4] := $11;                 { Disable read/write mode }
  195. Port[$3C5] := Port[$3C5] and $7F;
  196. Port[$3CE] := $0B;                 { Disable PR0B            }
  197. Port[$3CF] := Port[$3CF] and $F7;
  198.  
  199. To set a 64k bank number in single paging mode use the following procedure:
  200.  
  201. PortW[$3CE] := bank_number Shl 12 + $09;
  202.  
  203.  
  204. Duel Paging Mode
  205. ────────────────
  206.  
  207. In duel paging mode PR0A is set to map a bank to host memory at
  208. A000:0000-7FFFh and PR0B is set to map a bank to host memory at
  209. A000:8000-FFFFh. Each bank is used for both reading and writing operations.
  210.  
  211. To set up for duel paging mode use the following procedure:
  212.  
  213. Port[$3C4] := $11;                 { Disable read/write mode }
  214. Port[$3C5] := Port[$3C5] and $7F;
  215. Port[$3CE] := $0B;                 { Enable PR0B             }
  216. Port[$3CF] := Port[$3CF] or $80;
  217.  
  218. To set the lower bank use the same procedure as given for single-paging
  219. mode. The upper bank can be set with the following procedure:
  220.  
  221. PortW[$3CE] := bank_number Shl 12 + $0A;
  222.  
  223.  
  224. Read/Write Paging Mode
  225. ──────────────────────
  226.  
  227. In read/write paging mode PR0A is used to map a bank at A000:0000-FFFFh for
  228. read operations and PR0B is used to map a bank at A000:0000-FFFFh for write
  229. operations. To set up for read/write paging mode use the following procedure:
  230.  
  231. Port[$3C4] := $11;                 { Enable read/write mode }
  232. Port[$3C5] := Port[$3C5] or $80;
  233. Port[$3CE] := $0B;                 { Enable PR0B             }
  234. Port[$3CF] := Port[$3CF] or $80;
  235.  
  236. Setting PR0A and PR0B is the same as for duel paging mode.
  237.  
  238.