home *** CD-ROM | disk | FTP | other *** search
/ Il CD di internet / CD.iso / SOURCE / D / SVGALIB / _SVGALIB.TAR / usr / doc / svgalib / mach32 / README.mach32 < prev   
Encoding:
Text File  |  1995-01-18  |  18.8 KB  |  384 lines

  1. A few comments about the Mach32 driver.
  2.  
  3. Warning I got a few reports about AST systems with onboard Mach32.
  4. They do feature an incompatible EEPROM setup, but I think I got around
  5. that. Nevertheless on none of the systems I heard of , svgalib-mach32 works.
  6. Since original ATI Mach32 demos and tools don't works as well I've to claim
  7. that the Mach32 on these AST systems does not conform to ATI's Mach32 docs.
  8. I have no idea and docs on how to make these work, sorry. If you find
  9. patches how to make svgalib-mach32 run on your AST on motherboard Mach32
  10. tell me, I'll happily include them. Otherwise, sorry I tried allready
  11. everything I could think off but to no avail.
  12.  
  13. [HH: If is there is a problem with the particular card you have, compile
  14. and run the utility in the Mach32/ directory that reports all information
  15. stored in the EEPROM of the card.  Send the output to Michael.  This is
  16. also useful if you need a lot of options (e.g. clocks on new models?) to
  17. get it to work so that this can be done automatically in future versions.]
  18.  
  19. WARNING! The Mach32 driver needs to know correct clock frequencies for graceful
  20. DAC configuration.  Wrong clocks may damage your card!  However this version
  21. contains code for automatic clock detection.  Since clock detection is time
  22. critical, please do it on a completely idle system.  Then put the printed
  23. out clocks line in your libvga.config.  The driver can do this for you too.
  24. After that you can restart whatever svgalib program you used and you are
  25. set.  If you already put a clocks line in your config by hand, comment it
  26. out to have the driver check your clocks.
  27.  
  28. Since clock probing is time critical, values differ from time to time, you
  29. may try it multiple times and see which values seem to be most exact.  You
  30. can also compare them with the standard clock chips for Mach32 cards in
  31. README.config
  32.  
  33. Some statements are copied from Xfree86.  The clock detection code is almost
  34. just copied.  So I repeat here the copyright statements for these parts:
  35.  
  36. Copyright 1992 by Orest Zborowski <obz@Kodak.com>
  37. Copyright 1993 by David Wexelblat <dwex@goblin.org>
  38.  
  39. Permission to use, copy, modify, distribute, and sell this software and its
  40. documentation for any purpose is hereby granted without fee, provided that
  41. the above copyright notice appear in all copies and that both that
  42. copyright notice and this permission notice appear in supporting
  43. documentation, and that the names of Orest Zborowski and David Wexelblat 
  44. not be used in advertising or publicity pertaining to distribution of 
  45. the software without specific, written prior permission.  Orest Zborowski
  46. and David Wexelblat make no representations about the suitability of this 
  47. software for any purpose.  It is provided "as is" without express or 
  48. implied warranty.
  49.  
  50. OREST ZBOROWSKI AND DAVID WEXELBLAT DISCLAIMS ALL WARRANTIES WITH REGARD 
  51. TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND 
  52. FITNESS, IN NO EVENT SHALL OREST ZBOROWSKI OR DAVID WEXELBLAT BE LIABLE 
  53. FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES 
  54. WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN 
  55. ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF 
  56. OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
  57.  
  58. Copyright 1990,91 by Thomas Roell, Dinkelscherben, Germany.
  59. Copyright 1993 by Kevin E. Martin, Chapel Hill, North Carolina.
  60.  
  61. Permission to use, copy, modify, distribute, and sell this software and its
  62. documentation for any purpose is hereby granted without fee, provided that
  63. the above copyright notice appear in all copies and that both that
  64. copyright notice and this permission notice appear in supporting
  65. documentation, and that the name of Thomas Roell not be used in
  66. advertising or publicity pertaining to distribution of the software without
  67. specific, written prior permission.  Thomas Roell makes no representations
  68. about the suitability of this software for any purpose.  It is provided
  69. "as is" without express or implied warranty.
  70.  
  71. THOMAS ROELL, KEVIN E. MARTIN, AND RICKARD E. FAITH DISCLAIM ALL
  72. WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED
  73. WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL THE AUTHORS
  74. BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY
  75. DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER
  76. IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
  77. OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
  78.  
  79. Author:  Thomas Roell, roell@informatik.tu-muenchen.de
  80.  
  81. Rewritten for the 8514/A by Kevin E. Martin (martin@cs.unc.edu)
  82. Modified for the Mach-8 by Rickard E. Faith (faith@cs.unc.edu)
  83. Rewritten for the Mach32 by Kevin E. Martin (martin@cs.unc.edu)
  84.  
  85. And here is my own copyright:
  86.  
  87. This driver is free software; you can redistribute it and/or
  88. modify it without any restrictions. This library is distributed
  89. in the hope that it will be useful, but without any warranty.
  90.  
  91. Copyright 1994 by Michael Weller
  92.  
  93. Email addresses as of this writing:
  94.  
  95. eowmob@exp-math.uni-essen.de mat42b@aixrs1.hrz.uni-essen.de
  96. eowmob@pollux.exp-math.uni-essen.de
  97.  
  98. MICHAEL WELLER DISCLAIMS ALL WARRANTIES WITH REGARD
  99. TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND
  100. FITNESS, IN NO EVENT SHALL MICHAEL WELLER BE LIABLE
  101. FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
  102. WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
  103. ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
  104. OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
  105.  
  106. Anyway the driver should allow you to use any of the graph-modes
  107. your Mach32 card supports.  Note that there is no support for
  108. <8bpp modes and that I won't ever implement that because I don't see
  109. any reason for doing so.  All standard VGA-modes are of course 
  110. supported.. (by using of the standard VGA driver routines).
  111.  
  112. If you configured your Mach32 for a memory aperture and it is
  113. at least as big as the memory of your card (that is, not a 1MB
  114. memory aperture for a 2MB card) support for linear frame buffer
  115. access of svgalib is given.
  116.  
  117. Auto detection of the Mach32 seems not to work on all cards.  That's
  118. really strange since I got the code from the X people.  It should be OK
  119. regardless of my docs.  Well, I fixed that (hopefully).  Actually
  120. the bug was found by Daniel Lee Jackson (djackson@ichips.intel.com).
  121. (Thanks again.. It was so silly...  I would have never found it)
  122. If you still have problems just put a chipset Mach32 in your config file.
  123.  
  124. Note that at least my VRAM card seems to be peculiar about logical
  125. linewidths.  From my experience a multiple of 64 pels is needed.
  126. Your mileage may vary.  Use the config file options to adjust it
  127. and tell me if your card needs a different value.  Include the name and
  128. model number of the card and what the correct numbers should be.  This
  129. is so that I can correct the autoconfig driver.
  130.  
  131. If some svgalib application has problems, note that you can
  132. force the logical linewidth to the default value from the
  133. configfile.  Probably this will lead to glitches in some 800x600
  134. resolutions.  You can inhibit these resolutions from the configfile
  135. as well.  Apropos glitches, I found no guidelines as to what clockrates
  136. to use due to memory restrictions.  I adjusted the driver, so that
  137. I get a stable pic in all resolutions.  However sometimes the screen
  138. is disturbed by heavy video memory accesses.  If you don't like that,
  139. reduce the clocks used with the maxclock16 or maxclock24 command, resp.
  140. This may of course lead to none of the predefined modes being used.
  141. Then you can try to define your own mode via the define command.
  142.  
  143. If you get some flicker or heavy noise on your screen, some fine tuning may
  144. be needed.  My docs didn't give me hints as to what each card can stand.
  145. Especially DRAM cards may give problems (I've VRAM).  In that case, use the
  146. fine tuning config commands and send me your results along with the output
  147. of Mach32info.  Then I can include them in my next release.
  148.  
  149. Fine-tuning commands:
  150.  
  151. First you should think about the maxclock commands to reduce pixel clocks
  152. used for each mode depth.
  153.  
  154. Especially important for DRAM cards is the video FIFO depth used to queue
  155. memory values for writing to the screen.  Here is a command to set this
  156. value for the 8bpp modes:
  157.  
  158. vfifo8 number
  159.  
  160. where number is 0-15.  The default is 6 now.
  161.  
  162. Since vfifo is of some impact to the speed of the card, tell me the
  163. lowest setting that satisfies your card.
  164.  
  165. For 16/24/32 modes, there are non-zero values preset from internal tables and
  166. the EEPROM, however you can enforce minimal vfifo values with:
  167.  
  168. vfifo16 number
  169. vfifo24 number
  170. vfifo32 number
  171.  
  172. blank number
  173.  
  174. where number is 4*pixel_delay+blank_adjust.
  175. where pixel_delay and blank_adjust are 0..3.  Pixel_delay delays pixels
  176. before they are sent to the DAC and blank_adjust adjusts the blank pulse
  177. for type 2 DAC's.  blank should be set correctly for each DAC type
  178. automatically.  So use it only as a last resort.
  179.  
  180. latch number
  181.  
  182. where number is the sum of one or more of:
  183.  
  184.   128: VRAM serial delay latch enable, DRAM latch bits 63:0 enable.
  185.  4096: Latch video memory data.
  186.  8192: Memory data delay latch enable for data bits 63:0
  187. 16384: Memory full clock pulse enable
  188.  
  189. Default is to switch all settings on. (they are on on my card by default anyway..)
  190.  
  191. Note that these commands may vanish again once they are no longer needed for
  192. debugging purposes.
  193.  
  194. There is no 320x200 mode in the EEPROM of the Mach32 at all, however
  195. I defined one in the default config file for you.  This is the best
  196. thing I could get up on my card/screen.  Note that it will probably
  197. have big borders on your screen, and black lines in between the lines.
  198. This is because of the lack of low clocks <16 on the Mach32 and the
  199. lack of a line doubling mode as VGA has.  The Mach32 is not intended
  200. for such low resolutions.  If you find a better mode or have an idea
  201. please let me know.
  202.  
  203. Ah yes, and apropos EEPROM, I figured out how to read out the Mach32
  204. EEPROM.  I did it by disassembling the BIOS routine mentioned in the
  205. docs.  I then redid it in C.  The driver will use everything it finds
  206. there.
  207.  
  208. Use the Mach32 install tools (they should have reached you together with
  209. your Mach32 VGA card) to setup your card/monitor combo correctly.
  210. The monitor setting from the config file (or default of 35kHz or something)
  211. will be obeyed by the driver anyway (for safety!).
  212.  
  213. As you probably know already, accessing the EEPROM causes some screen
  214. flickering.  If this annoys you (or even worse your monitor) have a look
  215. at the mach32eeprom command.  This allows you to put the data from the
  216. EEPROM into a file and which can be read whenever it is required.
  217. Give a filename where the EEPROM contents are once
  218. saved and then just read out.
  219.  
  220. Don't even think about changing the contents of the file.  (There is
  221. an easyly faked checksum in it.)  Anyway the driver ensures (hopefully)
  222. that no damage can be caused.
  223.  
  224. This is also true for clock probing (in fact at a much higher impact)
  225. Probed clocks have to be given in the libvga.config file. The driver is
  226. able to do the clock probing and saving in the config file itself
  227. (usually).
  228.  
  229. Also if some mode is not well aligned on your screen or you don't like
  230. it's sync frequency, consider using the Mach32 install utility (setup for
  231. custom monitor) and set one up interactively.  If there is no valid faster
  232. (higher VSYNC) standard mode given in the EEPROM the driver will use
  233. that mode.. you will find that this is fun compared with calculating video
  234. timings for Xconfig / svgalib.config. 
  235.  
  236. However the install utility does restrict the maximum pixel depth for
  237. custom modes sometimes unneeded hard and the driver obeys that
  238. (Hmm.. actually it should be smart enough to decide itself which pixel
  239. depth it can use in that mode..).
  240. Since usually the standard modes are only slightly shifted to one side
  241. a file with the config commands representing the standard modes is given
  242. in mach32 mach32.std-modes. You can use these as a starting point.
  243.  
  244. But here are some real problems:
  245.  
  246. EEPROM woes:
  247. I got 2 reports of people having problems with incorrect EEPROM checksums.
  248. Both had motherboards with onboard Mach32 VGA's from AST.  I guessed a checksum
  249. algorithm from those reports and put this in the code in addition to the
  250. standard ATI style.  Still I got a report of someone whose EEPROM was completely
  251. empty.  If you have problems with checksums send me the output of Mach32 and
  252. I'll see what I can do.
  253.  
  254. By default svgalib writes a complaining message and ignores the contents.
  255. You can have svgalib ignore the checksum and contents with the config command:
  256.  
  257. mach32eeprom ignore
  258.  
  259. Then you can decide to use the partial info that is still in it.  Use:
  260.  
  261. mach32eeprom ignore usetimings
  262.  
  263. To use the videomodes that are defined in the EEPROM (if none better are
  264. known by the driver).  This is usually safe, because the driver knows
  265. which modes are safe for your hardware (if clocks, monitor and dac are
  266. configured correctly).  You can also allow the driver to use the
  267. configuration for the linear frame buffer in the EEPROM:
  268.  
  269. mach32eeprom ignore useaperture         (or)
  270. mach32eeprom ignore usetimings useaperture
  271.  
  272. However I discourage this because the driver will enable what the EEPROM
  273. says about the aperture.  Use mach32info to check this is safe.  It may be
  274. better to use 'setuplinear' to set up a 4MB aperture at a free address range.
  275.  
  276. Due to poor design, Xfree86 insists on setting up the aperture itself.  It
  277. doesn't reset the original settings at a VC switch once it runs.  You
  278. should not start X for the first time after a boot as long as an svgalib
  279. application is running.  This will result in pre X values being restored at a VC
  280. switch by svgalib.  If you use svgalib and XF86_Mach32 together, run X first or
  281. at least do not start it while any svgalib appl. is still running.  After X was
  282. started once you can use svgalib and X in all combinations w/o any problems.  Xfree
  283. uses whatever address is given in MEM_CFG for a 4MB aperture.  This is IMHO
  284. a dangerous bug as some systems may work only with a 1MB aperture.
  285.  
  286. However, usage of a correct EEPROM circumvents any such problems. If you
  287. cannot use that, use mach32info to find the address in MEM_CFG.  Then, IF
  288. IT IS A SENSEABLE SETTING FOR YOUR SYSTEM, enable an 4MB aperture at that
  289. address with 'setuplinear'.  ENSURE THAT NO OTHER CARD OR MEMORY USES THE
  290. ADDRESS RANGE YOU CHOOSE.
  291.  
  292. This version now has support for all accelerator functions of svgalib.
  293. However they were intended for use with the cirrus chips.  It may happen
  294. that at runtime they find they cannot emulate the function actually
  295. requested.  Then you should disable the corresponding blit function
  296. (at least for that application) with the blit config command.
  297.  
  298. Data transfer between the host and the Mach32 is normally via I/O.  This
  299. proved to be pretty slow.  If a big enough aperture is available, a simple
  300. memory copy is used instead.  This is usually much faster.  You can change
  301. which method is used with the blit command.  This I/O option affects only
  302. 'imageblt'.  The other functions are incredible fast.
  303.  
  304. For type 2 DACS, there is support for 8 bit per color (instead of the normal 6)
  305. in the RGB triple in the color lookup table of the 256 color modes.  This
  306. can be enabled by an application, if it supports it.  The 'testaccel'
  307. demo uses it if supported by your hardware.
  308.  
  309. Type 1 and 4 Dacs need different clock frequencies for high colormodes.
  310. For 32K/64K colormodes the frequencies have to be doubled and for
  311. 16M colors (type 4 only) they have to be tripled.  I followed the ATI scheme
  312. and did this internally.  However this means that for 32K/64K you can use
  313. only clocks for which the doubled frequencies can be generated as well.
  314.  
  315. This is no hard restriction as the 16 clocks of the Mach32 can be divided by 2.
  316. Thus if you setup some mode yourself try to use the divided clocks.
  317. It is some restriction for 16M colors.  ATI themself only support 25MHz
  318. (640x480) here by use of a 75MHz clock.  Depending on your clock chip other
  319. values may be usable as well.  Even the doubled/tripled clocks have to be less
  320. than the magic 80 MHz.  However the driver does all this himself.  It may just
  321. happen that some of the predefined or one of your handmade mode-timings
  322. can't be used because the clock that is used cannot be doubled/tripled.
  323. Even though there is already some tolerance in the driver you may fix that by
  324. slighty changing the clock values that you set with the clocks command.  But
  325. note that this will as well affect the ability of the driver to calculate
  326. video timings and thus it ability to check the monitor and DAC safety
  327. restrictions.
  328.  
  329. I heard about a bug in some ATI chipsets returning wrong memory amounts
  330. configs. (But cannot confirm that)
  331.  
  332. Note that you can enforce correct identification from the config file.
  333. Have a look at mach32.h for correct values.
  334.  
  335. Some programs (that set the correct flag) will show a
  336.  
  337. Using Mach32 #0 (#1M at #2M (#3), #4K mem, DAC #5)
  338.  
  339. line.  This will show up in testlinear.. etc.. but will probably scroll
  340. away when you use vgatest.
  341.  
  342. In this line:
  343. "#0" is the version of the driver (as of my counting, not the svgalib
  344.      version).
  345. "#1" is the size of the memory aperture.  It can be 1 or 4 (1 will lead
  346.      to not using the linear aperture if your card has more than 1MB
  347.      memory, however applications can still use the 1MB aperture and page 
  348.      the video memory through it in 1MB steps).  "#1" can also be "no"
  349.      if no aperture is setup at all.
  350. "#2" is the base address of the aperture in MB.
  351. "#3" is "autodetect" if the aperture was setup this way already when the
  352.      program started.  It is "setup" when the the setting was enforced with a
  353.      setuplinear config command.  It is "EEPROM" when no aperture was detected
  354.      but parameters to set it up were found in the EEPROM.
  355. "#4" is the amount of memory the card reported to have.
  356. "#5" is the type of the DAC (0-5 are known) that was detected.
  357. If #4, #5 and/or the chipset were enforced with "chipset" from the config-file
  358. or the appropriate application function call a "forced" will be appended to
  359. the line.
  360.  
  361. A final word: I have an ATI ULTRA PRO/2MB/EISA with a Type 2 DAC.
  362. My monitor is an EIZO F550i-M.  Everything I tried worked on it like
  363. a charm.  However I couldn't try it with other machines myself and esp.
  364. other DAC's.  Fortunately the Type 2 DAC is the worst to code.  So I
  365. will probably have gotten the other DAC's right.  But please be warned!
  366.  
  367. I did my very best to code the driver to support the other DAC's by
  368. just reading the docs.  BUT I CAN'T DEFINITELY GIVE ANY GUARANTEE FOR
  369. IT TO WORK OR EVEN NOT DAMAGING YOUR HARDWARE.  SO PLEASE BE CAREFUL!
  370.  
  371. Note that you will have to set the environment variable SVGALIB_MACH32
  372. to ILLTRYIT if your DAC is not type 0, 2 or 4.  This will of course change
  373. if no one with DAC not equal 0, 2 or 4 has serious problems.  If you have
  374. a different DAC, making patches to support your card will be much more
  375. helpful instead of just complaining.
  376. If you have a different DAC that works well tell me as well sucht that I
  377. can remove the need for SVGALIB_MACH32 in the next release.
  378.  
  379. Thank you for your audience and wishes you will enjoy this driver,
  380.  
  381. Michael Weller
  382.  
  383. eowmob@exp-math.uni-essen.de
  384.