
            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/2000/XP.



  2. Installation

  There are two drivers that you can try: GiveIO and  UserPort.  Versions  1.x
of both drivers have their own small disadvantages; see the  important  notes.
For Windows 2000/XP and newer motherboards, it is  recommended  that  you  try
UserPort 2.0 first.

  All drivers have been included in their original form as well as  a  package
with some hacks.  In  hacked  packages,  mostly  MinGW  compatibility  and  an
installation batch have been added; see HACK.TXT in each package for details.

  1. Make sure you have administrator privileges. Without that, you  won't  be
     able to install drivers.

  2. Unzip the driver package.

  3. Install the driver.

     A) Automatic installation with LoadDrv 2.0:

        - Copy install.bat from the driver package and unzip LoadDrv from  the
          LoadDrv 2.0 package,  both  into  the  directory  where  the  driver
          (GiveIO.sys or UserPort.sys) resides.

        - Run install.bat without any command line parameter. You  should  see
          messages about the driver being installed and started. If errors are
          reported about stopping and/or removing  (the  previously  installed
          copy of) the driver, you can safely ignore them.

     B) Manual installation with LoadDrv 1.0:

        - Copy the driver  into  the  central  driver  directory  of  Windows:
          "%windir%\system32\drivers"  ("%windir%"  indicates  the   directory
          where you have installed Windows, e.g. "C:\WINDOWS").

        - Unzip LoadDrv.exe from the LoadDrv 1.0 package and run it. Into  its
          input line, type in the full path of the driver  (the  copy  in  the
          Windows driver directory) and press the "Install" button. You should
          get "Operation was successful". From then on,
          - Windows NT 4.0: Control Panel's Devices list, or
          - Windows  2000/XP:  Device  Manager  (open  Control   Panel,   then
            Administrative Tools, then Computer Management)
          will also show the new device.

     C) Manual installation with software included (only UserPort):

        - Copy the driver into the central driver directory of Windows.

        - Run UserPort.exe and press the "Start" button. This also starts  the
          driver.

  4. Configure the driver (UserPort only).

     - Run UserPort.exe. Into the
       - UserPort 1.x: "Through \\.UserPort Grant List" table,
       - UserPort 2.0: "All User Mode Processes Grant List" table,
       add the following port address intervals:
       - "40-43" and "61-61" (hardware timer ports),
       - port address(es) of your parallel port(s).

       The parallel port address doesn't have to be added if you configure the
       Commander to access Commodore drives via the OpenCBM driver.

       Standard parallel ports are at the intervals  "0278-027B",  "0378-037B"
       and "03BC-03BF"; if you have your parallel port  at  some  non-standard
       address, add that interval instead. If you don't know the port  address
       of your parallel port then you may find it out in the BIOS setup,  with
       a hardware test program or  with  the  configuration  software  of  the
       parallel port itself. Alternatively, enable all standard addresses  and
       see if that works.

       When using UserPort 1.1 or higher with an ECP parallel  port,  you  can
       add the interval of the extra ECP registers at base address + $0400  to
       base  address  +  $0402;  for  standard  parallel  ports,  "0678-067A",
       "0778-077A" and "07BC-07BE".

       Make sure to enter only those port address intervals that you  actually
       use. If you enter lots of intervals, the UserPort driver  may  "forget"
       some of them.

     - If you reconfigure the driver when  it's  already  running,  press  the
       "Update" button to send the new configuration settings to the driver.

  5. Configure the parallel port (Windows XP only).

     You can experiment with the following, if other changes don't help:

     - Enable the detection of the parallel port for DOS programs.  In  Device
       Manager, open the "Ports (COM & LPT)" subtree in the device tree to the
       right, find the parallel port, open its "Properties" window and, in the
       "Port Settings" tab, check the "Enable legacy Plug and Play  detection"
       option and press the "OK" button.

     - Change the interrupt settings of the parallel port. In the "Properties"
       window of the parallel port, go the "Port Settings"  tab  and  try  all
       values for "Filter Resource Method". For the OpenCBM driver,  "Use  any
       interrupt assigned to the port" is required.

     - Disable the parallel port. Press the right mouse button on the entry of
       the parallel port in Device Manager and select the "Disable" item  from
       the list. However, this will hide the parallel port from the Commander,
       too, so you will get an error message that the parallel port  does  not
       exist. Specify the address of the parallel port manually, in one of the
       custom port slots, instead.

  6. Start the driver.

     A) Automatic startup with LoadDrv 2.0:

        The batch file starts the driver automatically.

     B) Manual  with LoadDrv 1.0:

        Run LoadDrv. Into its input line, type in the full path of the  driver
        (the copy in the Windows driver directory)  and  press  the  "Install"
        button. You should get "Operation was successful".

     C) Manual startup start with software included with the driver  (UserPort
        only):

        Run UserPort.exe and press the "Start" button.

     D) Manual startup with GUI software of the operating system:

        - Windows NT 4.0: In Control Panel's Devices list, or
        - Windows   2000/XP:   in   Services   (open   Control   Panel,   then
          Administrative Tools, then Computer Management),
        find the driver and press the "Start" button.

     E) Manual startup with console software of the operating system:

        - Run "net start <driver name>" from the command line.

  7. Run the DOS software that accesses the hardware ports.

     A) The Commander and some other programs are aware  of  being  run  under
        Windows NT/2000/XP and are able to use the driver automatically.

     B) If the program is not aware of the driver  then  activate  the  driver
        manually:

        - Run "debug \\.\<driver name>" from the command line. 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.

        - Under Windows 4.0, 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. Repeat the previous step.

  8. If needed, configure the driver to be started when the  operating  system
     boots up. Do this only if you  made  sure  that  the  driver  is  working
     properly!

     - Windows NT 4.0: In Control Panel's Devices list, find the driver, press
       the "Startup" button, the "Automatic" radio button and  then  the  "OK"
       button.

     - Windows 2000/XP: Go to Device Manager and make  sure  that  non-Plug  &
       Play drivers are also shown: in  the  "View"  menu,  enable  the  "Show
       hidden devices" options. Open the "Non-Plug and Play Drivers"  subtree,
       find  the  driver,  open  its  "Properties"  window,  set   "Type"   to
       "Automatic" in the "Driver" tab and press the "OK" button.

  9. Uninstall the driver, if you don't need it anymore.

     A) Automatic uninstallation with LoadDrv 2.0:

        - Unzip install.bat from the  driver  package  and  LoadDrv  from  the
          LoadDrv 2.0 package into the same directory.

        - Run install.bat with the "-u" command line parameter. You should see
          messages about the driver being stopped and deleted.

     B) Manual uninstallation with LoadDrv 1.0:

        Run LoadDrv.exe. Into its input line, type in the  full  path  of  the
        driver (the copy in  the  Windows  driver  directory)  and  press  the
        "Remove" button. If the driver is running, you won't be able to remove
        it; press the "Stop" button and try again.  Now  you  may  delete  the
        driver.

     C) Manual installation with software included with the  driver  (UserPort
        only):

        Run UserPort.exe and press the "Stop" button. Now you may  delete  the
        driver.

     D) Manual uninstallation with GUI software of the operating system:

        - Windows NT 4.0: In Control Panel's Devices list, or
        - Windows 2000/XP: in Services,
        find the driver and press the "Stop" button. Now you  may  delete  the
        driver.

     E) Manual uninstallation with console software of the operating system:

        Run "net stop <driver name>" from the command line. Now you may delete
        the driver.



  3. Configuration

  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.

  See the "Usage" section in the Commander documentation for  further  details
on accessing Commodore drives under a multi-tasking system. When  encountering
problems, see the "Troubleshooting" section, as well. Also, make sure that the
same setup - except for the parallel port(s) and the delay value - works under
real 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.



  4. Important notes

  The GiveIO driver doesn't work well under Windows 2000  and  XP;  for  those
operating systems, use the UserPort driver instead. Similarly,  UserPort  does
not support Windows NT very well; you may get better results with  the  GiveIO
driver instead.

  Do not have both drivers installed and enabled at the same time as they  can
interfere with each other. If you find out which driver works better  on  your
particular system then use that one and disable or uninstall the other.

  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 neither are they used to  being  run  under  Windows NT,  nor  is
Windows NT used to DOS programs  that  access  the  hardware  ports  directly,
without any filtering.

  If you have the UserPort 1.0 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 address + $0400, to be exact) and  the
UserPort 1.0 driver doesn't allow you to enable these. So, the Commander  will
read garbage from the extra registers and get confused. This also  means  that
parallel ports with non-standard addresses above  the  address  $0400  -  e.g.
parallel ports on additional PCI cards - will not work with version 1.0 of the
UserPort driver.

  This tweak, with  both  the  GiveIO  and  the  UserPort  drivers,  has  been
successfully tested under Windows NT 4.0 (English, Service  Pack  5),  Windows
2000 Advanced Server (Hungarian, no Service Pack) and Windows XP  Professional
(English, Service Packs 1 & 2).



  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

  - Paula Tomlinson and Chris Liechti for the LoadDrv package

  - Timo Hilden, Lantos Zoltn and  Nicolas  Welte  for  reporting  fixes  for
    Windows XP



  6. Related Net resources

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

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

  or The Star Commander beta page:

  http://sta.c64.org/scbeta.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. Before complaining, please, make  sure  you've
read all the documentations and tried everything! Thanks and good luck.

  Joe Forster/STA
  11th January, 2010
