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

  1. !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
  2. !!!!                                                               !!!! 
  3. !!!!   NOTE: The ET4000 register layout changed stepping from      !!!!
  4. !!!!         svgalib 0.98 to 0.99. See  8. Problems  below first   !!!!
  5. !!!!                                                               !!!! 
  6. !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
  7.  
  8. [this README for the ET4000 registers was provided by Hartmut Schirmer]
  9.  
  10. 1. Basics of ET4000 cards 
  11. 2. How to configure SVGALIB
  12. 3. Creating card dependent register values
  13. 4. Defining new modes
  14. 5. Redefining standard modes
  15. 6. Available examples
  16. 7. ET4000/W32 support
  17. 8. Problems
  18. 9. Using dynamic loading with other cards
  19.  
  20.  
  21. 1. Basics of ET4000 cards 
  22. -------------------------
  23.  
  24. Basicly all ET4000 cards are equal, some are even more equal ...
  25.  
  26. The Chipset is well documented (by Tseng Labs and eg. the vgadoc2.zip)
  27. and all graphics functions can be used the same way on different cards
  28. (including the ET4000/W32 based ones). There are three important points
  29. to be kept in mind :
  30.  
  31.   a.) amount of available, the organisation and timing of video memory
  32.   b.) type and capabilities of the DAC
  33.   c.) available oscillator frequencies
  34.  
  35. SVGALIB will check the available video memory during startup. This
  36. should work on all DRAM cards. If there are any problems concerning
  37. VRAM equipped cards, please tell us about.
  38.  
  39. By now we found is no reliable way to detect the memory organisation/
  40. timing and the DAC type/capabilities. Most modern card use a frequency
  41. synthizier and provide the following pixel frequencies (in MHz):
  42.  
  43.     50.350 56.644 65.0 72.0 80.0 89.8 63.0 75.0
  44.  
  45. Checking older ET4000 cards we found a wide spread range of available
  46. frequencies. Since the video timing is based on the pixel frequency,
  47. the required register values are card dependent.
  48.  
  49. 2. How to configure SVGALIB
  50. ---------------------------
  51.  
  52. SVGALIB has a somewhat 'standard' registers set that may work with
  53. modern ET4000 cards. If SVGALIB fails on your machine or you have
  54. a HiColor dac, you need to configure your SVGALIB.
  55.  
  56. The SVGALIB may use hard linked or dynamical linked register values.
  57. If you use hard linked values, the binary will be smaller and start
  58. up faster but might fail on other machines.
  59.  
  60. Compiling the SVGALIB with DYNAMIC defined (see config.h) will set 
  61. up dynamic register loading. Otherwise the value from 
  62.            svgalib/et4000.regs 
  63. will be hard linked.
  64.  
  65. The dynamic configuration will be read from 
  66.         /usr/local/lib/libvga.et4000
  67. which is an ASCII file (see config.h for exact naming). If you have
  68. a working et4000.regs for your system just copy this file to
  69. /usr/local/lib/libvga.et4000 or link /usr/local/lib/libvga.et4000 
  70. to your svgalib/et4000.regs file.
  71.  
  72. The actual scanner/parser will handle the following entries:
  73.  
  74.   #define DAC_TYPE <integer>      /* Overwrite the DAC detection        */
  75.   #define <MODE1>  <MODE2>        /* Enable MODE1 using MODE2 registers */
  76.                   /* eg. 64K modes like 32K modes       */
  77.   #define <MODE>   DISABLE_MODE   /* do not use MODE (eg. from vgadrv)  */
  78.   char <MODE><strg>[..] = { <integer>,<integer>,... }; /* register definition */
  79.  
  80. with
  81.  
  82.   <MODE>    ::= 'g'<decimal>x<decimal>x<color><ignored>
  83.   <integer> ::= <decimal>|<hex>
  84.   <hex>     ::= '0x'<hexdigit>{<hexdigit>}
  85.   <decimal> ::= ['+'|'-']<digit>{<digit>}
  86.   <hexdigit>::= <digit>|'a..f'|'A..F'
  87.   <digit>   ::= '0..9'
  88.   <color>   ::= '2'|'16'|'256'|'32k'|'32K'|'64k'|'64K'|'16M'
  89.   <strg>    ::= <empty>|[(<aplha>|'_'){<digit>|<alpha>|'_'}]
  90.   <alpha>   ::= 'a..z'|'A..Z'
  91.  
  92. C style comments will be skipped. See et4000 subdirectory for
  93. examples.
  94.  
  95.  
  96. 3. Creating card dependent register values
  97. ------------------------------------------
  98.  
  99. You may create a et4000.regs on your own with the tseng3.exe.
  100. Just boot MS-DOG and start
  101.  
  102.   tseng3 et4000.reg
  103.  
  104. The tseng3.exe will measure the video timing for each available mode.
  105. Check the et4000.regs file against your monitor documentation and
  106. disable all non conformant modes, eg.
  107.  
  108.     #define g1024x768x256_regs DISABLE_MODE
  109.     /*
  110.     static unsigned char g1024x768x256_regs[71] = {
  111.       ...
  112.     };
  113.     */
  114.  
  115. will disable the 1024x768x256 mode. You *mustn't* disable the
  116. 640x480x256 mode!
  117.  
  118. Your et4000.regs must define the following symbols (register values
  119. or #define ... DISABLE_MODE) for hard linking :
  120.  
  121.   g320x200x32K_regs,  g640x400x256_regs, g640x480x256_regs,
  122.   g640x480x32K_regs,  g640x480x16M_regs, g800x600x16_regs,
  123.   g800x600x256_regs,  g800x600x32K_regs, g1024x768x16_regs,
  124.   g1024x768x256_regs, g1280x1024x16_regs
  125.  
  126. and all 64K modes handled like 32K modes by the driver :
  127.  
  128.   #define g320x200x64K_regs g320x200x32K_regs
  129.   #define g640x480x64K_regs g640x480x32K_regs
  130.   #define g800x600x64K_regs g800x600x32K_regs
  131.  
  132. You may omit every unusable mode in  /usr/lib/libvga.et4000 .
  133.  
  134.  
  135. 4. Defining new modes
  136. ---------------------
  137.  
  138. All standard SVGALIB modes may be selected by the mode constants 
  139. defined in vga.h (eg. G320x200x16). You may define new modes on
  140. your own. Just use dynamic register loading and add the register
  141. definition of the new mode. Your program may determine the related 
  142. modenumber by checking the vga_getmodeinfo(1..vga_lastmodenumber()).
  143.  
  144. Most ET4000 cards provide 640x350 and 640x400 graphics modes. The
  145. tseng3.exe generates the related register sets. You may also use
  146. dumpreg from an X window to grab you favourite X graphics mode.
  147. The X mode normaly isn't usable directly. See cardex.w32 for an
  148. example and et4000.c for a brief description of et4000 registers.
  149.   
  150.  
  151. 5. Redefining standard modes
  152. ----------------------------
  153.  
  154. Using dynamic register loading you may redefine any standard VGA 
  155. mode except of TEXT and 640x480x16. Just add the ET4000 specific
  156. register set to /usr/local/lib/et4000.regs.
  157.  
  158.  
  159. 6. Available examples
  160. ---------------------
  161.  
  162. In the et4000 subdir you'll find some sample register sets :
  163.  
  164.   cardex.w32    Cardex ET4000/W32 card, Music TrueColor DAC
  165.   speedstar+    SpeedSTAR PLUS card, Normal DAC
  166.   morse.kp1024    Morse KP1024 card, Normal DAC
  167.   et4000.old1    unknown older et4000 card, normal DAC
  168.   boca        BOCA register set from svgalib 0.81
  169.  
  170.  
  171. 7. ET4000/W32 support
  172. ---------------------
  173.  
  174. The actual driver seems to be ET4000/W32 compatible. Tell us about
  175. any problems (and solutions). If you've got any information about
  176. the ET4000/W32 blitter, we would be pleased to receive it.
  177.  
  178.  
  179. 8. Problems
  180. -----------
  181.  
  182. As mentioned before, the DAC detection isn't very reliable. vgatest
  183. should print equal screens in 256 color and HiColor/TrueColor modes.
  184. You may have to edit your libvga.et4000 register file by hand to setup
  185. the correct DAC.
  186. The tseng3 may fail due to incompatible mode numbering. You might use
  187. a VESA driver (eg. tlivesa.com from VPIC 6.0) or edit and recompile
  188. the tseng3.exe.
  189. Newer ET4000 chipsets (eg. W32 and W32i) allow up to 32 clock 
  190. frequencies. Two additional register values were added just before the
  191. old extened register value. The new registers are CRTC/30h and CRTC/31h.
  192. The old register set had 71 values, the new growed to 73.
  193. You may update your old register set by hand :
  194.    - run the dumpreg program, remember the first two values from last
  195.      data line.
  196.    - edit your libvga :
  197.        for each mode 
  198.          change the number of register values from 71 to 73
  199.          add the values from dumreg output at front of last data line
  200.    - run vgatest to check the new register set
  201.  
  202.  
  203. 9. Using dynamic loading with other cards
  204. -----------------------------------------
  205.  
  206. The dynamical register loading may be used in other drivers.
  207. Since hard linked register values work fine for Cirrus and Trident
  208. cards, we didn't include this feature.
  209.  
  210.