Readme.win32
Win32 V4PCI Driver
Created 7/9/01 by David Rowe
www.voicetronix.com.au

A) Notes
--------

1. This initial version of the driver supports only the OpenLine4 card, 
   not (at this stage) the ISA VPB4 and VPB8L cards.  A unified version
   is coming soon!  The binary versions of the drivers for the ISA cards
   can be downloaded from the Voicetronix site.

2. It was compiled and tested under using Microsoft Visual C 6.0.

3. Projects for only a few of the unit tests (UTs) have been provided,
   as I found it tedious to create a project for each UT - can any one
   help me here with a Windows make file? (e.g. the Linux Makefile makes 
   all of the UTs) Thanks :-) !

4. Not all of the UTs will run under both Win32 and Linux unmodified.

5. Pre-compiled binary files for the driver are provided (libvpb.dll, 
   libvpb.lib, plxapi.dll) - there is no need to recompile the Win32 
   driver if you do not want to.  

6. QUICKSTART - complete Sections B) and C).

7. To run the "echo" unit test, cd to win32\libvpb, then type
   (quotes included):

   "echo\debug\echo"

   Rather than just:

   echo\debug\echo

   As DOS confuses the latter with the DOS "echo" command. 

B) Installation
---------------

Windows NT
----------

1. Copy win32\kernel\WinNT\pci9050.sys into <Win_Dir>\System32\Drivers.
2. Double click on win32\kernel\WinNT\pci9050.reg to enter the driver 
   info into the registry.
3. Reboot.
4. Go to control-panel-devices.  Check that "pci9050" has "started".
5. Set the path for the firmware.  Set an environment variable 
   VPB_FIRMWARE to the path to the firmware file.  Under NT go to control
   panel-system-environment to set an environment variable. eg:

   VPB_FIRMWARE=D:\etc\vpb\vpbmain_pci.out
 
6. Open a command shell and cd to win32/libvpb. 
7. Run "tcomm\debug\tcomm". This tests DSP-PC communications, and 
   can be used to test the installation.

Windows 98 and Windows 2000
---------------------------

1. Copy win32\kernel\Win98&2k\pci9050.sys into <Win_Dir>\System32\Drivers.
2a) (Win98) Copy win32\kernel\Win98&2k\PciSdk.inf into
    <Win_Dir>\Inf\Other.
2b) (Win2k) Copy win32\kernel\Win98&2k\PciSdk.inf into
    <Win_Dir>\Inf
3. Switch off the PC, install the V4PCI card, reboot.  Windows should
    find the card, .inf file and driver and install for you.  If Windows
    prompts you for the file, just tell it where to find it.
4. Set the path for the firmware.  (You will find the firmware in the firmware

    directory) Set an environment variable 
    VPB_FIRMWARE to the path to the firmware file.  
- Under Win98 this must be set in the AUTOEXEC.BAT file, e.g. place 
    the line:

   set VPB_FIRMWARE=D:\etc\vpb\vpbmain_pci.out

   in your AUTOEXEC.BAT file.  
- Under Windows 2000 refer to step 5 of the Windows NT installation.
6. Open a command shell and cd to win32/libvpb. 
7. Run "tcomm\debug\tcomm". This tests DSP-PC communications, and 
   can be used to test the installation.

C) Using the Voicetronix OpenLine4 (libvpb.dll) driver 
--------------------------------------------------

1. Create a new project (e.g. Win32 Console Application) and insert 
   your source files.

2. Project-Settings-C/C++:
   - set "Category" to "Code Generation" 
   - set "Use run-time library:" to "Debug Multithreaded"

3. Project-Settings-Link:
   - To the "Object/library modules" add "../debug/libvpb.lib" (you might
   need to change the path to libvpb.lib, depending on where you create
   your project).

4. Build your project.

5. Make sure libvpb.dll and plxapi.dll are in your path before running.
   One way is to set the Project-Settings-Debug-Working Directory to a 
   directory containing the dll (../ in examples provide), or place the 
   DLL in a dir in your path (e.g. c:\winnt\system32)

6. Set the path for the firmware.  The firmware is called 
   "vpbmain_pci.out", and is in the "firmware" directory.  There are two 
   ways to set the path:
a) Modify vpbreg.cpp, change the #define FIRMWARE_FILE_PCI	to
   your path and recompile libvpb (se below on how to recompile).
b) Set an environment variable VPB_FIRMWARE to the path to the firmware
   file.  Under NT go to control panel-system-environment.  After setting 
   the env variable, you will need to restart MSVC before running so that
   the new env. variable is available to MSVC. 

7. You should now be able to run your program from MSVC.

D) Compiling the Driver libvpb.dll
----------------------------------

Note: The source file hipplx.cpp has been precompiled to a static
library due to license restrictions - see hipplx.cpp for more info.
If you have the commercial library required to compile this file,
the sub-project hipplx can be used to compile.

Note: The driver comes with two precompiled hipplx static libraries,
      namely hipplx.lib and hipplx9052.lib. 
 
      The hipplx.lib should only be used on the exception that an
      original batch of the V4PCI cards are being used which have
      the PLX9050 chip as opposed to the PLX9052.   

Open the Voicetronics Project with "win32\libvpb\libvpb.dsw



1. Project-Set Active Project-libvpb

2. Project-Settings-C/C++:
   - set "Category" to "Code Generation" 
   - set "Use run-time library:" to "Debug Multithreaded"

3. In Project-Settings Select the "libvpb project

   (In the box under the "Settings For:" string.)
   then select the  Link tab:
   - To the "Object/library modules" add:
   "hipplx\debug\hipplx9052.lib winmm.lib plxapi.lib"

3. Build-Build libvpb (or Rebuild All)

E) Acceptance Testing
---------------------

The Win32 driver was tested as follows:

1. 10/9/01 DR: tload.cpp was run for 24 hrs, with a record time out of
   400ms, using one card (4 channels). Program ran just fine with 77000
   cycles.  Average computational load 5%. P800 used & Windows NT 4.0 used
   for test.

2. 10/9/01 DR: echo.cpp was tested on all 4 channels of a single card.
   All 4 channels played and recorded OK. Windows NT 4.0 used for test.

3. Repeated (1) for Win 98.  Tested for 30 minutes, 2 sec record time, 
   425 cycles, worked fine.
