
            Windows NT/2000/XP tweak package for The Star Commander



  1. Introduction

  This package helps The Star Commander with accessing Commodore drives  under
Windows NT 4.0, Windows 2000 and Windows XP. As  for  other  features  of  the
Commander, they should be working fine, without any tweaking. Note  that  this
applies to version 0.82 and above of the Commander - in earlier  releases,  no
special care was taken to make them work under Windows NT.



  2. Installation

  There are two drivers that  you  can  try:  "giveio"  and  "userport".  Both
drivers have their own small disadvantages; see the important notes.

  The step-by-step guide below for the "giveio" driver is for Windows NT - you
will find the same options at more or less different  places  in  Windows 2000
and Windows XP. Currently, there's no proper guide for either Windows 2000  or
Windows XP. If you have made one, please, contact me.

  Installing the "giveio" driver under Windows NT:

  1. Make sure you have administrator privileges. Without that, you  won't  be
     able to install the "giveio" driver.
  2. Unzip giveio.sys from directio.zip and copy it into the Windows NT driver
     directory "%windir%\system32\drivers". Unzip loaddrv.exe from loaddrv.zip
     and run it.
  3. Into LoadDrv's input line, type in the full path of giveio.sys and  press
     the "Install" button. You should get "Operation was successful". If  not,
     you messed up something, goto step  1.  If  so,  from  then  on,  Control
     Panel's Devices list will also show the new "giveio" device.
  4. Either in LoadDrv or in Control Panel/Devices, press the "Start"  button.
     This launches the "giveio" driver.
     To have the "giveio" driver start when the operating system boots up,  in
     Control Panel/Devices, press the "Startup" button, the "Automatic"  radio
     button and then the "OK" button.
  5. Launch a new Command Prompt and type in the  "debug \\.\giveio"  command.
     You will get a "File not found" error message but never mind. Exit  debug
     with the "q" command. Now you can access all hardware ports from  this  -
     and only this - command prompt.
     Beware, if you switch the command prompt into full screen mode  and  back
     again into windowed mode then you won't be able to  access  the  hardware
     ports anymore. This is a confirmed bug in the  Windows NT  video  driver.
     Goto step 5.
  6. To get rid of the "giveio" device, launch LoadDrv, type in the full  path
     of giveio.sys and press the "Remove" button. If it's still  running,  you
     won't be able to remove it; press "Stop" first. Now you  may  delete  the
     file from "%windir%\system32\drivers".

  Installing the "userport" driver under Windows NT/2000/XP:

  1. Make sure you have administrator privileges. Without that, you  won't  be
     able to use the "userport" driver.
  2. Unzip userport.exe and  userport.sys  from  userport.zip  into  the  same
     directory and run userport.exe.
  3. Into the "Through \\.UserPort Grant List" table, add the  following  port
     address intervals: "40-43" and "61-61". Also, add the port address(es) of
     your parallel  port(s).  Standard  parallel  ports  are  at  "0278-027B",
     "0378-037B" and "03BC-03BF"; if you  have  your  parallel  port  at  some
     non-standard address, add that instead.
     If you don't know the port address of your parallel  port  then  you  may
     find it out with a hardware test program or the configuration software of
     the parallel port itself. Alternatively, you might  enable  all  standard
     addresses and see if that works.
  4. Start the "userport" driver with the "Start" button. If  you  reconfigure
     the ports allowed when the driver is already running, press the  "Update"
     button to send this information to the driver.
  5. Launch a new Command Prompt and type in the "debug \\.\userport" command.
     You will get a "File not found" error message but never mind. Exit  debug
     with the "q" command. Now you can access all hardware ports from  this  -
     and only this - command prompt.
     Beware, if you switch the command prompt into full screen mode  and  back
     again into windowed mode then you won't be able to  access  the  hardware
     ports anymore. This is a confirmed bug in the  Windows NT  video  driver.
     Goto step 5.
  6. To get rid of the "userport" driver, launch userport.exe  and  press  the
     "Stop" button. Now you may delete the files.



  3. Configuration

  Before trying to access the Commodore drives,  check  these  things  in  the
Commander:

  1. You must be using version 0.82 or above of the Commander.  If  you  don't
     have it or are not sure about it, visit the homepage first.
  2. In the Commander's 'Transfer options'  menu,  switch  'Transfer mode'  to
     'Warp'.
  3. Disable 'Manual timeouts'.
  4. Enable 'Force async transfer', otherwise you will get nothing  else  than
     timeouts or lockups.
  5. Check if 'Serial interface' and, if  using  a  parallel  cable  as  well,
     'Parallel interface' show the correct parallel port.  Even  if  you  have
     only one parallel port, it is not necessarily called "LPT1"  in  the  DOS
     shell of Windows NT!
  6. Press the 'Recalibrate' button, to have  the  'Delay value'  recalculated
     for operation under the new circumstances.

  If it still doesn't work, see the 'Troubleshooting' section in SC.TXT. Also,
first, make sure that the same setup - except for the parallel  port  and  the
delay value - works under plain DOS. You may want to create a  DOS  boot  disk
and boot your machine with it if you don't have DOS  installed  on  your  hard
disk.

  If you managed to make it work, try again without installation step  5.  The
Commander automatically calls both "giveio" and "userport", before each access
to the Commodore drive, when running under Windows NT so you don't need to  do
it manually, with the help of the debug command. It also means that  switching
into full screen mode and then back to windowed mode shouldn't be a problem.



  4. Important notes

  Don't expect miracles! Some of the communication  between  the  PC  and  the
Commodore drive is done with the original C64 KERNAL  protocol  which  is  not
designed for multi-tasking systems. You shouldn't be surprised  at  occasional
timeouts or lockups at the beginning or the end of disk operations.  For  this
reason, it is recommended that you copy disks only and  avoid  copying  files.
Also, if your system is heavily loaded, the Commander may lose  the  handshake
with the Commodore drive, even during a disk copy.

  If you have the "giveio" driver installed all the time, note that it  allows
DOS programs to access all hardware ports - unlike the "userport" driver  that
only allows the ports you added manually. Some DOS programs  may  behave  very
strangely as they are not used to being run under Windows NT  and  neither  is
Windows NT used to DOS programs  that  access  the  hardware  ports  directly,
without any filtering.

  If you have the "userport" driver installed,  all  parallel  ports  will  be
detected as ECP ports. The reason for this is that the extra registers of  ECP
ports are above the address $0400 (base port + $0400, to  be  exact)  and  the
"userport" driver doesn't allow you to enable these. So,  the  Commander  will
read garbage from the extra registers and get confused.

  This tweak, with both the "giveio" and  the  "userport"  drivers,  has  been
successfully  tested  under  Windows NT 4.0  (English,  Service  Pack  5)  and
Windows 2000 Advanced Server (Hungarian, no Service  Pack)  and  a  few  users
reported success with the "userport" driver under Windows XP, as well.



  5. Thanks to

  Thanks go to:

  - Hugh Allen and Lance Lyon for calling my attention to these possibilities,
  - Tomas Franzon for the UserPort package,
  - Dale Roberts for the DirectIO package and
  - Paula Tomlinson for the LoadDrv package



  6. Related Net resources

  You can download the latest version of this package from  The Star Commander
homepage:

  http://sta.c64.org/sc.html



  7. Reporting problems, ideas and wishes

  Please, share your - good or bad - experiences  with  me  at  "sta@c64.org".
Opinions, ideas about making this tweak easier to do or about  enhancing  this
documentation are also welcome. This includes a proper step-by-step guide  for
the "giveio" driver under English Windows 2000 and Windows XP so contact me if
you have made one. Before complaining, please, make sure you've read  all  the
documentations and tried everything. Thanks and good luck.



  31st March, 2002                              Joe Forster/STA
