i740clk v121 - program i740 video card clock

x Purpose

  Purpose of i740clk utility is to program clock of Intel i740 video card.
  Utility was designed to work with SVGATextMode for linux and dos.
  It works in linux, dos and windows.

x Installation

  . Build i740clk, if included executable can't be run on your system.
    Linux-libc5 and dos16 executables included.
  . Copy it to appropriate place (for example, usr/sbin in linux).
  . Add lines from textconf.i740 to the end of your TextConfig or textconf.
  . Comment out all previous uncommented lines with "Chipset", "Clocks",
    "ClockProg" etc.
  . Modify path to i740clk in the "ClockProg" line.
  . Read other comments in textconf.i740.
  . Read following sections in this file.

x Supported clocks

  Now i740 clock programming is done with table lookup. Real version must use
  some mathematics for programming any frequency. Currently following clock
  frequencies are supported:

  Freq    Source of clock values
  ------  -------------------------------------
   31.50  standard win95 driver  640 x 480 75Hz
   36.00  standard win95 driver  640 x 480 85Hz
   40.00  standard win95 driver  800 x 600 60Hz
   49.50  standard win95 driver  800 x 600 75Hz
   56.25  standard win95 driver  800 x 600 85Hz
   65.00  standard win95 driver 1024 x 768 60Hz
   78.75  standard win95 driver 1024 x 768 75Hz
   94.50  standard win95 driver 1024 x 768 85Hz
  108.00  standard win95 driver 1280 x1024 60Hz
   32.04  custom clock
   32.99  custom clock
   34.00  custom clock
   34.95  custom clock
   36.99  custom clock
  ------  -------------------------------------

  Other frequencies can be added. You can try to pick up clock values in the
  source code manually and check resulting frequency with grabmode. Or you
  can set appropriate video mode, read registers 0xc8,0xc9,0xcb from ports
  0x3d6/0x3d7, and then insert register values to the source code.

x Compatibility

  It works:
  . in linux; works with dosemu and XFree86 (XBF-i740).
  . in dos, including dosemu's dos.
  . in windows 95 fullscreen and windowed console; mode must be reset after
    switching console from windowed to fullscreen mode (also read section
    about i740tclk.vxd).

x Support driver for windows i740tclk.vxd

  Official Intel i740 windows 95 driver does not restore textmode clock
  registers after switching from windowed to fullscreen mode. Mode must be
  reset, or special driver i740tclk.vxd can be used.

  Driver i740tclk.vxd must be placed to windows\system directory. System.ini
  must have line "device=i740tclk.vxd" in [386Enh] section. After resetting
  video mode, i740clk utility notifies i740tclk driver about new refresh clock
  values. Driver remembers clock registers for all windows virtual machines,
  and restores correct values after switching to fullscreen text mode.

  Drivers for non-Intel cards with i740 chipset can use other techniques for
  saving and restoring video settings. So i740tclk.vxd can be unnecessary, or
  can not work on such video cards.

x About Intel

  I have no i740 specifications, and I don't signed any agreements with Intel.

  As I was very interested to set SVGATextMode to work with my i740 card,
  I started to play with i740 registers. After some time I found registers,
  which control clock, grabbed their values in the standard modes, and
  wrote i740clk.

  Why Intel closes interfaces to their card, I don't know. XFree86 driver is
  only in the binary form. SVGATextMode has now temporary solution with this
  program. When and whether svgalib will support i740, I don't know. If
  someone wants to start to write i740 driver for svgalib, please let me know.
  I have no time to make it, but I can provide minimal starting information,
  like participating register list etc.

x About Intel i740 card

  In SVGATextMode documentation we can read:

     "The worst card of all (Trident), works perfectly up to 45 MHz, and at 50
      MHz it's already in "phase 3" (the science fiction intro). That should
      give you an idea of what to expect."

  Well, what you will say about card, that works perfectly only up to 32Mhz?

  Generally, it does not support any 132xYY mode with VESA BIOS driver. And
  SVGATextMode can't set any 132xYY mode. Some modes with clocks 32, 36, 40Mhz
  works, but some don't. And windows 95 driver changes some card parameters
  (maybe memory clock speed), so upper DacSpeed even lowers. If I can set
  100x33 64Hz 36Mhz mode in linux and dos, then in windows 95 dos session I
  can set only 100x33 58Hz 32Mhz mode.

  Well, this card and monitor (Samsung SyncMaster 500p 15") supports 640x480
  at 110Hz, 1024x768 at 85Hz. Clock frequency 108Mhz works perfectly in
  1280x1024 mode. But in the text mode it's strange. Now I call my card
  Extreme3D/Sluggish2D.

  Warning: I am not sure that I set all appropriate settings. I program clock
  in text modes with the same clock values as in graphics modes. Clock values
  are correct and can be checked with grabmode. Maybe some parameter, like
  memory clock, must be modified for correct work in text modes. Maybe some
  strange memory is installed in my card, and in other card situation can be
  better. If you have other results with your card, or know how to change
  memory clock, please let me know.

x Author

  i740clk (C) 1998,1999 Alexander Lokhan'ko <anl@mailandnews.com>,
  <alex@eunet.lt>.
  You are free to use and distribute this utility and its source code.
  I am not responsible for any damage caused by use of this utility.

x History

  . 25.11.98 v100: program misc register and clock 3d6/3d7:c8,c9,ca,cb
                   registers
  . 26.11.98 v110: additional low-level clocks 32,33,34,35 Mhz
                   documentation
  . 08.12.98 v111: additional low-level clock 37 Mhz
  . 13.02.99 v120: notify i740tclk.vxd under windows for correctly restoring
                   of fullscreen text mode clocks
  . 20.09.99 v121: fix notifying i740tclk.vxd under pure dos
