Copyright: Copyright 1996, Campbell Scientific Ltd


PC Card Support Setup

PC Card Setup installs Campbell Scientific PC Card Support.

PCCSetup will examine your system and gauge the level of PC Card support it offers.  If appropriate it will suggest that some extra drivers are included in your startup files to give proper PC Card Support.

PC Card Setup can be run in express mode, or custom mode, or you can opt for no PC Card support at all.

If PCCSetup finishes without errors, your system will be ready for running Campbell Scientific applications which require PC Card support.

PC Card support is run automatically if a Campbell Scientific application requiring PC Card support finds that PC Card support is not already configured.

You can run PC Card support later to change the level of PC Card support.

PC Card support may require two real mode drivers;

VMMAPPER.EXE 	(Campbell Scientific)

CSMAPPER.SYS 	(Microsoft, Windows 95)

(C) 1996 Campbell Scientific Ltd


CSMapper

Windows 95 does provide Card Services support, namely VXD support.  This is not compatible with the current Campbell Scientific DLL.

However Microsoft  have provided a real mode interface to this VXD called CSMAPPER.SYS.  CSMapper is loaded in the CONFIG.SYS in this manner:

device=\windows\system\CSMAPPER.SYS

Note: CSMapper is only installed into the Windows system directory after Windows 95 has properly installed its own drivers for your PC Card slot.

CSMAPPER.SYS does provide real mode Card Services, but only after Windows 95 has loaded (because it relies on the Windows 95 VXD drivers to actually perform the services).

CSMapper, however, does not allow client registration after Windows 95 has loaded because Microsoft doesn't officially support real mode card services (in virtual machines, for example).

VMMapper, which is required for proper VM support under Windows and Windows 95, registers with CSMapper before Windows loads, and so can provide proper real mode VM support under Windows 95.

Together VMMapper and CSMapper provide a good Windows 95 solution.

CSMapper does not provide complete Card Services support, but adequate for most client applications.

(C) 1996 Campbell Scientific Ltd


VMMapper

Most real mode Card Services implementations do not provide proper virtual machine real mode support under Windows, by ensuring that the correct virtual machine (i.e. Windows, or the right DOS box) is active before sending messages to an application in that virtual machine.

Failure to do this can cause data loss, or even cause the whole machine to crash.

VMMapper ensures that the correct virtual machine is active, before passing messages to those applications.

If no DOS boxes will be run, then VMMapper is not required, except in Windows 95 when CSMapper is loaded.

VMMapper must be loaded before Windows starts.  It is usually loaded by the AUTOEXEC.BAT, after any Card Services drivers have loaded but before Windows starts.

VMMapper is normally run without any parameters, but accepts 3 parameters.

Runtime errors are indicated by bleeps from the PC speaker.

(C) 1996 Campbell Scientific Ltd


Real Mode

Almost all DOS Card Services 2.1 implementations are real mode.  The Campbell Scientific DLL can provide full support with real mode card services, but requires another driver, VMMAPPER.EXE to be loaded, to provide proper Windows support.

Real mode Card Services is also provided for Windows 95 by the Windows 95 driver CSMAPPER.SYS.

(C) 1996 Campbell Scientific Ltd


16 bit Protected Mode

Some versions of Card Services, such as Award's Cardware, and Systemsoft's Card Wizard provide a 16 bit protected mode interface under Windows.  This can be faster and more efficient.  The Campbell Scientific DLL makes use of this interface in preference to any other, and does not require any other special drivers to be loaded.

(C) 1996 Campbell Scientific Ltd


Phoenix DLL

If, for some reason, neither real mode nor protected mode interfaces work (real mode will almost always work), and Phoenix Card Services is installed, then the Campbell Scientific DLL will interface to the Phoenix DLL to perform its operations.

The Phoenix DLL does not provide full Card Services support, but is sufficient for most uses.  The Phoenix DLL works by interfacing to the Phoenix real mode Card Services, which is what the Campbell Scientific DLL tries to do.

The chances are that if the Campbell Scientific DLL has to rely on the Phoenix DLL, then the Phoenix DLL will also fail for the same reason.

(C) 1996 Campbell Scientific Ltd


CSL_CS.DLL

Some Campbell Scientific Windows applications rely on CSL_CS.DLL to take care of any differences in the actual implementation of Card .Services, and provide a fixed API.  CSL_CS.DLL also provides a few extra functions.

CSL_CS.DLL will auto detect most environments, but overriding defaults can be specified in CSL_CS.INI, in your Windows directory.

NOTE: Previous versions of CSL_CS.DLL used CSL-CS.INI.  This file is not used, and should not be renamed to CSL_CS.INI.

(C) 1996 Campbell Scientific Ltd


CSL_CS.INI

NOTE: Previous versions of CSL_CS.DLL used CSL-CS.INI.  This file is not used, and should not be renamed to CSL_CS.INI.

CSL_CS.DLL can auto detect most situations, but overriding behaviours can be specified here.

The following options are supported:

[Options]

UseMtd=

Ignore=

CardServicesType=

(C) 1996 Campbell Scientific Ltd


CSL_CS.INI - UseMTD

One of the extra functions in CSL_CS.DLL is to copy a block of data to, or from an SRAM card in a PC Card slot.  This can be done in one of two ways:

·	Map the card to a region of memory, and write directly.

·	Use an MTD driver (which may map the card to a region of memory and write directly)

With some setups, one method will succeed while another method fails, and on other systems, vice-versa.

By default, the Campbell Scientific DLL, tries using MTD's, and if that is not supported, it tries mapping memory regions directly.

The DLL will remember which method worked the previous time, and try that first thereafter.

This default auto detect option, can also be specified as

UseMTD=0.

To force the DLL to use the MTD method or fail, use

UseMTD=1

To force the memory mapping method, or fail, use

UseMTD=2

(C) 1996 Campbell Scientific Ltd


CSL_CS.INI - Ignore

When the DLL loads, it chooses the most suitable Card Services interface out of all those it can detect.

The Ignore option allows you to mask off certain types from being detected.  This is useful, if for some reason, a type is detected falsely, or its detection process causes other errors, but you still want auto detect enabled.

To calculate a mask, add together the values in the table for each type you want to mask out:

Card Services Type	Mask Value

Real Mode	8

16 bit Protected mode	64

32 bit Protected mode	128

Windows VXD	256

Phoenix DLL	512

Only real mode, 16 bit protected mode and Phoenix DLL mode are currently supported.

Example: To ignore 16 bit protected mode drivers, and VXD drivers, use:

ignore=384

(C) 1996 Campbell Scientific Ltd


CSL_CS.INI - CardServicesType

CardServicesType defaults to unknown.

CardServicesType can specify a Card Services type to prevent the need for auto detection.  This is perhaps more useful than the ignore option (which is best used if you want to retain some form of auto detection).

If CardServicesType is unknown then PCCSetup is run next time CSL_CS.DLL is loaded by a Campbell Scientific application.

Meaning	Value

Unknown (Run Setup)	0

None	1

Auto detect	2

Real Mode	3

16 bit protected mode	6

32 bit protected mode	7

Windows VXD	8

Phoenix DLL	9

Only unknown, none, auto detect, real mode, 16 bit protected mode and Phoenix DLL mode are currently supported.

Example: To disable auto detect, and always use real mode, use

CardServicesType=3

(C) 1996 Campbell Scientific Ltd


VMMapper - Parameters

VMMapper is normally run without any parameters, but accepts the following parameters.

vmmapper [i] [/PRI=j] [/PRIX=k]

Where i is the maximum number of clients that can be registered simultaneously with Card Services while Windows is running.  The default is 3 which is usually enough.

Example

vmmapper 5

would allow 5 clients to be registered at one time under Windows.

The /PRI and /PRIX parameters are fine tuning parameters and should not be used, except where necessary.

(C) 1996 Campbell Scientific Ltd


VMMapper - Tuning

If you do not understand the notes below, then probably you do not need to specify these parameters.

There are two methods of specifying the priority used by VMMapper when causing Windows to switch virtual machine while issuing a Card Services callback.

The /PRI switch is used to specify one of the standard VM_Boost values, as specified in the table below.

/PRI	VM_Boost name	VM_Boost value (Hex)

0	RESERVED_LOW_BOOST	00000001

1	CUR_RUN_VM_BOOST	00000004

2	LOW_PRI_DEVICE_BOOST	00000010

3	HIGH_PRI_DEVICE_BOOST	00001000

4	CRITICAL_SECTION_BOOST	00100000

5	TIME_CRITICAL_BOOST	00400000

6	RESERVED_HIGH_BOOST	40000000

7	SAMS_BEST_BOOST	04000000

/PRIX is used to specify boost values directly, so that values not in the table can be specified.

SAMS_BEST_BOOST is the one used by default, and isn't a standard boost value from Microsoft's documentation in VMM.INC, but was optimised by trial and error.

Example

vmmapper /PRI=1

There are few good reason for doing this as SAMS_BEST_BOOST is the only one that works reliably, but perhaps other values will be specified under direction of Campbell Scientific to overcome individual problems.

(C) 1996 Campbell Scientific Ltd


VMMapper - Errors

VMMapper indicates errors by means of bleeps.  These errors should not cause data loss, but indicate some error condition and should be reported to Campbell Scientific Ltd.

Code	Meaning

3 bleeps at about 3KHz	No VM Callback registers

2 bleeps	VM callback delayed, or did not occur (boost too low?)

1 bleep 	Invalid callback.  High pitched bleeps follow.

(C) 1996 Campbell Scientific Ltd


What PC Card Setup does

·	If you have 16 bit protected mode Card Services, then nothing is done.  The Campbell Scientific DLL will use these quite happily.

·	If you do not have 16 bit protected mode Card Services, but you do have real mode Card Services, then PC Card Setup will cause VMMapper to be loaded in your AUTOEXEC.BAT, to provide real mode VM support under Windows.  The Campbell Scientific DLL will work quite happily with this.

·	If you have neither real mode nor protected mode Card Services, the DLL will attempt to use the PCMWND.DLL, provided with Phoenix card services.  As PCMWND.DLL only provides an interface to real mode Card Services anyway, this last ditch attempt is really only for future compatibility with Phoenix, should PCMWND.DLL one day provide an interface to some other Card Services.

·	If you have no Card Services, and are running under Windows 95, PC Card setup will cause CSMapper to be loaded in your CONFIG.SYS and VMMapper to be loaded in your AUTOEXEC.BAT.

PC Card setup will also check the install path of csmapper and vmmapper in your startup files, if these drivers are required, but also exist in your startup files.  PC Card setup can be used for revalidating an installation in this way.

(C) 1996 Campbell Scientific Ltd


What is PC Card support?

The PC Card standard (previously known as the PCMCIA standard) defines, among other things, a software interface, by which applications can access PC Cards.

The PC Card drivers which provide this support are Card Services, and at a lower level, Socket Services.

Campbell Scientific software applications which make use of Card Services directly, require PC Card level 2.1 compliance.

Part of the Campbell Scientific PC Card package is CSL_CS.DLL, a Windows library which provides a fixed interface to a variety of Card Services implementations.  Currently the Campbell Scientific DLL supports 3 methods of accessing Card Services:

·	16 bit protected mode

·	Real mode

·	Phoenix DLL

The Campbell Scientific DLL automatically searches for these, in the order given above, and uses the most suitable.

(C) 1996 Campbell Scientific Ltd


PCCSetup - Express Mode
Express Mode

In express mode PC Card Setup will automatically determine the optimum configuration, and install any extra drivers needed without any user intervention.  After running, PCCSetup may require you to restart your system for changes to take effect.

(C) 1996 Campbell Scientific Ltd


PCCSetup - Custom Mode
Custom Mode

In custom mode, PC Card Setup will indicate all the interfaces to Card Services it was able to detect, and which interface it plans to use.  It will inform you of any problems it detected, or steps which need taking to configure your system.

If extra drivers need installing, it will offer to install them for you, allowing you to modify its suggestion of where in the CONFIG.SYS and AUTOEXEC.BAT to install the drivers.

Custom mode also allows you to examine all PC Card client software currently active in your system, for debugging purposes.

(C) 1996 Campbell Scientific Ltd


Contacting Campbell Scientific
Contacting Campbell Scientific Ltd

Campbell Scientific Ltd can be contacted:

Mail

Campbell Scientific Ltd

Campbell Park

80 Hathern Road

Shepshed

LE12 9RP

UK

Phone

+44-(0)1509 601141

Email

support@campbellsci.co.uk

Web

http://www.campbellsci.com/

(C) 1996 Campbell Scientific Ltd


No PC Card Support

You do not have to configure PC Card support.

You can run PCCSetup later, or edit your CSL_CS.INI file to enable PC Card support later

(C) 1996 Campbell Scientific Ltd