home *** CD-ROM | disk | FTP | other *** search
/ CD Actual 8 / CDACTUAL8.iso / docs / mini / xfree86- < prev    next >
Encoding:
Text File  |  1996-07-11  |  9.5 KB  |  275 lines

  1.   Linux XFree-to-XInside mini-HOWTO
  2.   by Marco Melgazzi, s64912@athena.polito.it
  3.   version 1.0 / 1996 May
  4.  
  5.   How to convert an XFree86 modeline into an XInside one
  6.  
  7.   1.  Introduction
  8.  
  9.   During the past few months I've seen a lot of posts in comp.os.linux.x
  10.   asking how to convert video modes between XFree86 and one of its
  11.   commercial alternatives: XInside.
  12.  
  13.   I had evaluated before the product and had this evaluation version
  14.   still floating on my hard disk: since I like problem solving, I've
  15.   decided to give it a try and, after a couple of hours of fiddling and
  16.   calculating, I came up with an informative article that was promptly
  17.   posted.
  18.  
  19.   The discussions about how to convert suddendly vanished and I received
  20.   1 (one) mail thanking me for the article so, since maybe somebody else
  21.   could need this information in the future, I decided to transform that
  22.   post in the mini-HOWTO you are reading.
  23.  
  24.   Let me state something first: I do NOT work for XInside and I only had
  25.   access to the evaluation 1.2 version for Linux. Fiddling with monitor
  26.   timings can be hazardous and, for this reason, I absolutely make no
  27.   guarantees. If it works for you , fine, if you blow up your computer I
  28.   shall not be held responsible for it.
  29.  
  30.   As you may have noticed from may name, I'm not a native speaker of
  31.   English so you will probably find some errors here and there, I
  32.   apologize for them and I ask you to please avoid flooding my mailbox
  33.   with language-related flames. Thanks !
  34.  
  35.   2.  Why should I need it ?
  36.  
  37.   I think that the Xinside policy of not giving you an utility to tweak
  38.   your video modes ( like xvidtune ) and/or to import your existing
  39.   XFree ones in the evaluation ( and AFAIK commercial ) version is
  40.   incomprehensible.  I've spent about three hours putting this together
  41.   ( hint: I've compared the VESA 1024x768@70Hz entry in the two
  42.   formats... and, besides, I'm nearly an electronic engineer ;-) while
  43.   an Xinside programmer could have written it in a fraction of this
  44.   time...
  45.  
  46.   I haven't downloaded the 1.3 evaluation version and I really hope they
  47.   have fixed this. Well, if they have, this mini-HOWTO could be
  48.   considered useless but, alas, if you read it you will learn something
  49.   more about how everything works...
  50.  
  51.   3.  Let's go
  52.  
  53.   Let's say that you have your oh-so-tweaked XFree86 mode and you want
  54.   to evaluate Xinside in the same conditions: we wil use my 'normal'
  55.   video mode as an example and I will explain what you will have to do
  56.   to convert it.
  57.  
  58.   An Xfree86 entry looks like this:
  59.  
  60.        Modeline "blahblah" DOTCLK  A B C D  a b c d
  61.  
  62.   Every one of the A-B and 1-4 numbers has a meaning: RTFM !  Anyway you
  63.   don't need to know the theory behind all this to do a succesful
  64.   conversion...
  65.  
  66.   My modeline in /usr/lib/X11/XF86Config for example is:
  67.  
  68.        Modeline "1168x876" 105  1168 1256 1544 1640  876 877 891 900
  69.                             |     |    |    |    |    |   |   |   |
  70.                          DOT_CLK  A    B    C    D    a   b   c   d
  71.  
  72.   In Xinside you have to add an entry in the Xtimings file wich should
  73.   be located in etc/ ( from now on we suppose you are in the top Xaccel
  74.   directory, or /usr/X11/lib/X11/AcceleratedX )
  75.  
  76.   !    Somewhere in the file, put here the name you want
  77.  
  78.   [PREADJUSTED_TIMING]
  79.       PreadjustedTimingName = "1168x876 @ 72Hz";
  80.  
  81.   !
  82.   !    These four are obvious
  83.   !
  84.       HorPixel          = 1168;         // pixels
  85.       VerPixel          = 876;          // lines
  86.       PixelWidthRatio   = 4;
  87.       PixelHeightRatio  = 3;
  88.  
  89.   !
  90.   !   hsync: DOT_CLK / D * 1000 [KHz]
  91.   !
  92.   !   hsync = 105 / 1640 * 1000 = 64.024 KHz
  93.   !
  94.   !   vsync: ( 1 / (( D / DOT_CLK ) * d) ) * 1,000,000 [Hz]
  95.   !
  96.   !   vsync: ( 1 / (( 1640 / 105 ) * 900) ) * 1,000,000
  97.   !           ( 1 / 14057.1428571 ) * 1,000,000 = 71.138 Hz
  98.   !
  99.  
  100.       HorFrequency      = 64.180;        // kHz
  101.       VerFrequency      = 71.138;        // Hz
  102.  
  103.   !   Obvious
  104.  
  105.       ScanType          = NONINTERLACED;
  106.  
  107.   !
  108.   !   Put here the +/-hsync +/-vsync XFree86 options
  109.   !
  110.       HorSyncPolarity   = POSITIVE;
  111.       VerSyncPolarity   = POSITIVE;
  112.  
  113.   !   Shouldn't change
  114.  
  115.       CharacterWidth    = 8;             // pixels
  116.  
  117.   !   DOT_CLK here
  118.  
  119.       PixelClock        = 105.000;       // MHz
  120.   !
  121.   !
  122.   !   horizontal timings section: [usec]
  123.   !
  124.       HorTotalTime  = D / DOT_CLK                  = 15.619;
  125.       HorAddrTime   = A / DOT_CLK                  = 11.124;
  126.       HorBlankStart = A / DOT_CLK                  = 11.124;
  127.       HorBlankTime  = HorTotalTime - HorBlankStart =  4.495;
  128.       HorSyncStart  = B / DOT_CLK                  = 11.962;
  129.       HorSyncTime   = C / DOT_CLK - HorSyncStart   =  2.743;
  130.  
  131.    !
  132.    !  vertical timings section:    [msec]
  133.    !
  134.  
  135.       VerTotalTime  = ( HorTotalTime * d ) / 1000  = 14.057;
  136.       VerAddrTime   = ( HorTotalTime * a ) / 1000  = 13.682;
  137.       VerBlankStart = ( HorTotalTime * a ) / 1000  = 13.682;
  138.       VerBlankTime  = VerTotalTime - VerBlankStart =  0.375;
  139.       VerSyncStart  = ( HorTotalTime * b ) / 1000  = 13.698;
  140.       VerSyncTime   = ( HorTotalTime * ( c - b ) ) / 1000
  141.                                                    = 0.219
  142.    ! Finished !
  143.  
  144.   Now you have to put this newly created mode in the files shown below
  145.   in the appropriate place.
  146.  
  147.   4.  Fixing up things
  148.  
  149.   In the excerpts shown below the -> sign tells you what was modified:
  150.   do NOT include it in your files!
  151.  
  152.   Monitor entry ( mine is monitors/mfreq/mfreq64.vda)
  153.  
  154.            [ESTABLISHED_TIMINGS]
  155.                "640x480 @ 60Hz",
  156.                "640x480 @ 72Hz",
  157.                "640x480 @ 75Hz",
  158.                "800x600 @ 56Hz",
  159.                "800x600 @ 60Hz",
  160.                "800x600 @ 72Hz",
  161.                "800x600 @ 75Hz",
  162.                "1024x768 Interlaced",
  163.                "1024x768 @ 60Hz",
  164.                "1024x768 @ 70Hz",
  165.                "1024x768 @ 75Hz",
  166.            "1152x900 Interlaced",
  167.                "1152x900 @ 60Hz",
  168.                "1152x900 @ 67Hz",
  169.        ->      "1168x876 @ 72Hz",
  170.                "1280x1024 Interlaced",
  171.                "1280x1024 @ 60Hz",
  172.            "1600x1200 Interlaced";
  173.  
  174.   Board info file ( mine is boards/s3/764-2.xqa , I wonder why they have
  175.   nearly all the Hercules boards but not MINE: Terminator 64/Dram )
  176.  
  177.   [VISUAL]
  178.       BitsPerPixel   = 8;
  179.       MemoryModel    = Packed;
  180.       ColorModel     = Indexed;
  181.       BitsRGB        = 6;
  182.       NumberOfColors = 256;
  183.  
  184.       [RESOLUTIONS]
  185.       640x480,
  186.       800x600,
  187.       1024x768,
  188.   ->  1168x876,
  189.       1152x900,
  190.       1280x1024
  191.  
  192.       [DESKTOPS]
  193.       640x480,
  194.       800x600,
  195.       1024x768,
  196.       1152x900,
  197.   ->  1168x876,
  198.       1280x1024,
  199.       1600x1200
  200.  
  201.   If the dot clock is low enough ( NOT in this case for my board ) you
  202.   can put the entry even in the 16bpp and 32bpp sec- tions.
  203.  
  204.   The /etc/Xaccel.ini will look something like this
  205.  
  206.        --------------------------------------------------------------
  207.            Board   = "s3/764-2.xqa";
  208.            Monitor = "mfreq/mfreq64.vda";
  209.            Depth   = 8;
  210.        ->  Desktop = 1168x876;
  211.  
  212.            [RESOLUTIONS]
  213.        ->      1168x876,
  214.                1024x768;
  215.  
  216.   The actual Xinside mode entry in etc/Xtimings
  217.  
  218.   --------------------------------------------------------------
  219.   [PREADJUSTED_TIMING]
  220.       PreadjustedTimingName = "1168x876 @ 72Hz";
  221.  
  222.       HorPixel          = 1168;          // pixels
  223.       VerPixel          = 876;           // lines
  224.       PixelWidthRatio   = 4;
  225.       PixelHeightRatio  = 3;
  226.       HorFrequency      = 64.180;        // kHz
  227.       VerFrequency      = 71.138;        // Hz
  228.       ScanType          = NONINTERLACED;
  229.       HorSyncPolarity   = POSITIVE;
  230.       VerSyncPolarity   = POSITIVE;
  231.       CharacterWidth    = 8;             // pixels
  232.       PixelClock        = 105.000;       // MHz
  233.       HorTotalTime      = 15.619;        // (usec) =  205 chars
  234.       HorAddrTime       = 11.124;        // (usec) =  146 chars
  235.       HorBlankStart     = 11.124;        // (usec) =  146 chars
  236.       HorBlankTime      =  4.495;        // (usec) =   59 chars
  237.       HorSyncStart      = 11.962;        // (usec) =  157 chars
  238.       HorSyncTime       =  2.743;        // (usec) =   36 chars
  239.       VerTotalTime      = 14.057;        // (msec) =  900 lines
  240.       VerAddrTime       = 13.682;        // (msec) =  876 lines
  241.       VerBlankStart     = 13.682;        // (msec) =  876 lines
  242.       VerBlankTime      =  0.375;        // (msec) =   24 lines
  243.       VerSyncStart      = 13.698;        // (msec) =  877 lines
  244.       VerSyncTime       =  0.219;        // (msec) =   14 lines
  245.  
  246.   You can check your conversion by running the vgaset program with no
  247.   parameters while running the Xinside serrver: it will output an XFree-
  248.   like line and, if everything went OK, this line will be equal to the
  249.   line you started from ( except if b and c are equal, I haven't been
  250.   able to reproduce this situation in Xinside: the best case was c=b+1
  251.   ).
  252.  
  253.   5.  The end...
  254.  
  255.   That's all folks ! I hope this will be useful to you. I don't know if
  256.   I'll buy Xinside: it's quite good and the text speed is really
  257.   unbelievable compared to XFree ( try to move xteddy over an xterm
  258.   window to understand what I mean ) but I'm only a student and I don't
  259.   have a lot of money to spend...
  260.  
  261.   Of course, if somebody at XInside thinks that this mini-HOWTO is worth
  262.   some support, I wouldn't really mind an 1.3 complete server to 'test'.
  263.  
  264.   6.  copyright/legalese
  265.  
  266.   (c)opyright 1996 by Marco Melgazzi (s64912@athena.polito.it) - the GPL
  267.   (Gnu Public License) applies. To obtain a copy of the GPL write to the
  268.   Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139,
  269.   USA.
  270.  
  271.   Trademarks are owned by their owners. There is no warranty on the
  272.   accuracy and/or the usefulness of the information given in this
  273.   document.
  274.  
  275.