Program : k6clk* sets the power-now soft-multiplier for the k6-2+ and k6-3+.

Author  : Uart.

Files : k6clk.exe,      8,336 bytes, 10-22-2000.
      : k6clkw.exe,     8,400 bytes, 10-22-2000.
      : k6clkini.com,      21 bytes, 10-22-2000.
      : k6clkwin.exe, 178,688 bytes, 10-22-2000.
      : k6ckptch.exe,  14,440 bytes, 10-22-2000.

Limitations : Probably only suitable for Dos, Win95, Win98 and 98SE.
              Don't load emm386.exe (in config.sys) if using this software.


Description :

- k6clk.exe is a stand alone DOS version of the program. It can be run
  from autoexec.bat when starting windows but can't run from within Windows.

- k6clkw.exe is a command line version of the program that can be run in
  either DOS (autoexec.bat) or in Windows. This version however is not
  "stand alone" and requires the file "k6clkini.com" to be loaded before it
  can be run.

- k6clkwin.exe is a graphical (gui) version of the program and can be run
  in Windows only. This version also requires that "k6clkini.com" be loaded
  (typically during autoexec.bat) before it can run.

- k6clkini.com is a dos mode program (eg autoexec.bat when starting windows)
  that must be run BEFORE either k6clkw.exe or k6clkwin.exe can be run.

- k6ckptch.exe is an optional patch program that allows you to change the
  IO (Input/Output) address resources used by both k6clkw and k6clkwin.
  The patch program will target the three files, k6clkini.com, k6clkw.exe
  and k6clkwin.exe. Note that the stand alone DOS version k6clk.exe does not
  require any IO resources and is not affected by this patch.

  By default the I/O address space used by these programs is 0xFFF0...0xFFFF
  That is the I/O base address is 0xFFF0. k6ckptch.exe lets you select a
  different base address if you want. Unless the default range conflicts with
  your hardware then there is no reason to run this patch.



Usage :

-  k6clk.exe
  "k6clk <mult>" (without quotes) where <mult> is a number and one of either
   2, 3, 3.5, 4, 4.5, 5, 5.5 or 6, sets the cpu clock multiplier.

  "k6clk =" (without quotes) reports the current (soft) clock multiplier
   setting. Note that the multiplier can not be reported unless it has
   previously been software set. Initial hardware multiplier settings are
   not reported.

- k6clkini.com is run without any parameters. It is typicaly run from
  autoexec.bat at start up. It does not make any changes to the clock
  multiplier but simply enables the Power-Now hardware so that either
  k6clkw.exe and/or k6clkwin.exe can change the multiplier later.

- k6clkw.exe has identical syntax to k6clk.exe. The only difference is that
  k6clkw requires k6clkini.com to have been previously loaded and that k6clkw
  can be run from within windows.

- k6clkwin.exe launches the gui version. You may launch from a command prompt
  if you like though you would typically launch it from a windows shortcut.
  The program accepts one or two optional numerical command line parameters.

  If you specify one number such as "k6clkwin 4.5" (either in the command line
  or in the shortcut) then that number will be the highest multiplier setting
  that the gui version will allow you to select. In the above example the
  5.0", "5.5" and "6.0" radio buttons would be inactive (greyed out). This is
  useful if you wish to prevent settings that would crash your computer from
  being applied.

  If you specify two numbers in the commmand line (or shortcut) such as
  "k6clkwin 5.5 5" then the first number is treated as the maximum allowed
  multiplier value and the second parameter is the initial mulitplier value.
  In the above example the program will immediately set the multiplier to
  5.0 and also make 5.5 the highest possible setting by disabling the radio
  buttons for 6.0x.


- k6ckptch.exe
  Only run this if you have a clash with the default I/O mapping of 0xFFF0
  for the Power-Now base address.

  To run the patch simply copy the patch file (k6ckptch.exe) and the three
  target files to a single directory then run the patch program without
  any parameters. The program will prompt you for a new Base I/O address,
  patch the three target files and produce a log file (k6ckptch.log) with
  all the details. The three target files are k6clkini.com, k6clkw.exe and
  k6clkwin.exe. It is preferable to let these three be patched all at the
  same time.

  Note that the original files are not modified but a patched copy is made
  of each.


Misc Issues.

- Current multiplier reporting.
  The software can not report the current multipler value unless the current
  multiplier value was software set. If you booted with hardware selected
  multipier (as is normally the case) then the software won't initially
  be able to report the correct multipler. Once you make a software setting
  however the reporting will then be correct from then on, even if you
  exit the program and restart it (as many times as you like).

  There are three valid work arounds for this problem.

  1. Do nothing. As long as you know what's happening you can do nothing
     and just accept that the software will report the initial muliplier
     setting as 4.5x regardless of what it's true (hardware set) value is.
     The reason why it reports 4.5x is because the power-now field is set to
     zero at reset and the mult-code 000 just happens to correspond to 4.5x

 2. Alternatively you can just set the initial mult using either k6clk.exe or
    k6clkw.exe in autoexec.bat. That way when you run the software under
    windows it can report the correct mult setting even before changes are
    made.

    Be aware that if you use k6clkw.exe in autoexec.bat then it must appear
    AFTER k6clkini.com and if you use k6clk.exe then it must be run BEFORE
    k6clkini.com.  The reason for this is because the stand-alone k6clk.exe
    un-does some of the required initializations that k6clkini.com sets up.
    This is to do with opening and closing the Power-now I/O  resources as
    explained in the next section.

 3. The third option is to use a "sentinel" file to indicate to the software
    that no software multiplier has yet been set. Each of k6clk, k6clkw and
    k6clkwin test for the existence of a file called "c:\k6clk000.tmp" when
    they are invoked. If this file exists then they assume that the currently
    read multiplier is invalid. Each of the above three programs clears this
    sentinal file when an actual soft-multipier setting is made.

    If either k6clk (=) or k6clkw (=) detects the sentinal file they will
    report  "not yet set" to requests for the present multiplier setting.

    If k6clkwin detects the sentinel file it will initially leave all radio
    buttons unchecked and the bar graph empty, indicating that it does not
    yet know the multiplier setting.

    To use the sentinal file simply create the file "c:\k6clk000.tmp" from
    within autoexec.bat. For example "echo xxx > c:\k6clk000.tmp" is
    the recommended way. Note that the contents of this file are totally
    unimportant and only the presence or absence of the file is detected.
    You do not need to create this sentinel file if you don't want to, the
    program will not report any errors if it is not present.


- I/O resources issue.
  The reason why the windows versions require I/O resources is because the
  Model Specific Registers (MSR's) that access the Power-Now hardware are
  NOT accessible to programs with "normal user privileges" under windows.
  For this reason the Power-Now hardware must remain I/O mapped for the
  entire Windows session to make possible the control from normal user
  programs (instead of dedicated drivers).

  If you had a choice then you would not do it this way. Nice programs (like
  the stand-alone DOS version) close down the Power-Now I/O space when they
  are finished to guarantee that no conflict can occur (even if you have an
  actual hardware I/O device in the same address space, it's no problem).

  k6clkini.com on the other hand deliberately opens up the Power-Now I/O space
  and leaves it open so that k6clkw and k6clkwin can access it as required.

  Be aware that while this should cause absolutely no problems as long as the
  chosen I/O space (see k6ckptch) is unused, it does leave open the small
  possibility of some errant I/O writes affecting the Power-Now hardware
  and sending your cpu speed crazy-date.
