The MADGECS utility for replacing Card Services
===============================================
                                               LSS 5.0(0), August 1996 
                                               -----------------------
Summary
-------
MADGECS is a Card  Services  emulator  for  Madge  Smart  16/4  PCMCIA 
Ringnodes.  It  is  used  as  a  replacement  for  Card  Services  and 
optionally Socket Services.

This file has the following sections: 
   1) Introduction
   2) Installing Madge Card Services for DOS 
   3) Installing Madge Card Services for OS/2


1) Introduction
---------------
Card Services is a software layer  which  allows  driver  software  to 
configure  and  communicate  with  PCMCIA  cards  in  a computer. Card 
Services accesses the computer's PCMCIA  controller  hardware  through 
another  software  layer  called  Socket  Services. Socket Services is 
specific to the type of PCMCIA controller in the machine.

Only one Card Services may  be  loaded  in  the  computer,  this  Card 
Services controls all PCMCIA cards. Generally only one Socket Services 
is  loaded  although  multiple  Socket  Services  may be loaded if the 
machine contains  multiple  PCMCIA  socket  controllers  of  different 
(incompatible) types.

Most portable computers are supplied with Card  and  Socket  Services. 
These  are  generally implemented as two separate device drivers which 
are loaded from CONFIG.SYS. If the computer you  are  using  does  not 
have  Card  Services,  contact your PC supplier, or use the Madge Card 
Services software.

**********************************************************************

Note: The  Madge  Card  Services interface is designed exclusively for 
      the Madge Smart 16/4 PCMCIA Ringnode. You cannot use it with any 
      other PCMCIA adapters.

**********************************************************************
     
*  The  Madge  Card  Services interface for DOS is called MADGECS.EXE.
   By default MADGECS for DOS only emulates Card Services and requires
   the  Socket  Services  supplied with your computer to be loaded. If
   your  computer  contains  an  Intel  (or  Intel-compatible)  PCMCIA
   controller,  you  may  ask  MADGECS to emulate Socket Services (see
   Section 2.1).

*  The  Madge  Card Services interface for OS/2 is called MADGECS.SYS.
   MADGECS  for  OS/2  emulates  both  Card  and  Socket Services - it
   doesn't  use  the OS/2 Socket Services supplied with your computer.
   It  is  a  requirement  that  your  computer  contains an Intel (or
   compatible) PCMCIA controller.

Since MADGECS provides only the Card Services functionality  which  is 
required  by Madge Smart 16/4 PCMCIA Ringnode driver software, MADGECS 
uses less memory than a  standard  Card  Services  implementation.  If 
MADGECS  is  also  used to emulate Socket Services, memory savings are 
even greater.


2) Installing Madge Card Services for DOS 
-----------------------------------------

2.1 Socket Services
-------------------
By  default, MADGECS.EXE requires you to have Socket Services 2.00 (or 
above) loaded.  However, MADGECS.EXE includes a  configuration  option 
that  enables  you  to  run  MADGECS without Socket Services loaded on 
computers  that  use an Intel (or compatible)  PCMCIA controller.  For 
information about the EMULATE_SOCKET_SERVICES option and other options
see Section 2.5.

You  can  also configure MADGECS from a script file called MADGECS.CFG 
(see Section 2.5).
      
********************************************************************** 

Note: If  not  using  the  EMULATE_SOCKET_SERVICES option, run MADGECS
      after loading Socket Services.

**********************************************************************

2.2 Loading MADGECS.EXE from CONFIG.SYS or AUTOEXEC.BAT
-------------------------------------------------------
Perform one of the following:

*  Load  MADGECS  from  the CONFIG.SYS file by including the following 
   statement before any statements that load network drivers:

   DEVICE=<path>MADGECS.EXE   
 
*  Load MADGECS from the AUTOEXEC.BAT file by  including the following 
   command before any commands that load network drivers:
   
   <path>MADGECS
      
2.3 Using MADGECS.EXE with Memory Managers or with  Microsoft  Windows 
-------------------------------------------------------------------- 
MADGECS  requires  that  a  4Kb region of upper memory (memory between 
640Kb and 1Mb) is available for use. If any Madge  Smart  16/4  PCMCIA 
Ringnodes are to be used in MMIO transfer mode, an extra 4Kb region is 
required per Ringnode.

The upper memory area is reserved for use by ROMs and expansion  cards 
and  does  not  normally  contain  any  RAM.  However, on 386 or later 
processors memory manager software (such as EMM386) can be used to map 
RAM from above 1Mb into this area so that it is available for  use  by 
DOS  programs.  If such a memory manager is used, it is important that 
the upper memory regions which the manager uses to do not  clash  with 
the regions used by MADGECS.

By default, MADGECS uses the 8Kb  memory  range  from  CC00-CDFF. This 
range  can  be  changed by editing the MADGECS configuration file (see 
Section 2.5).

The following are examples of  how  to  exclude  the  default  MADGECS 
memory range from being used by various memory managers:

*  Windows,  add  the  command  EMMExclude=CC00-CDFF to the SYSTEM.INI 
   file.
  
*  EMM386, add the parameter X=CC00-CDFF to the device line in the 
   CONFIG.SYS file. 
  
*  386MAX, add the parameter RAM=CC00-CDFF to the device line in the 
   CONFIG.SYS file. 

For  more  information,  refer to the documentation supplied with your 
Microsoft Windows or memory management software.
   

2.4  Command-line options for MADGECS.EXE
-----------------------------------------
Command-line options are specified as follows:

From CONFIG.SYS :   DEVICE=<path>MADGECS.EXE [options]
From the Command line or AUTOEXEC.BAT : MADGECS [options]

Note that some options can be specified either on the command line  or 
in the MADGECS configuration file (see Section 2.5). It is recommended 
that  such options are only specified on the MADGECS command line if a 
configuration file is not being used.

The  available  command-line  options  are   described   below   (with 
abbreviations in brackets):

HELP (?)                   ; Display help information

UNLOAD (U)                 ; Unload MADGECS

BRIEF (BR)                 ; Do not display configuration information.

CONFIGURATION_FILE=<filename>
(CFG=<filename>)           ; Name (including location) of the CFG
                             file. The default location is the
                             directory that contains MADGECS.EXE.
                             The default filename is MADGECS.CFG. 
                             Example: MADGECS CFG=C:\PCM\MADGECS.CFG

SILENT (SI)                ; Turn off card insertion/ejection sounds.

EMULATE_SOCKET_SERVICES    ; Instruct MADGECS to emulate Socket
(ESS)                        Services. If this is specified, a
                             separate Socket Services is not required
                             and should not be loaded. This option can
                             only be used if the computer contains an
                             Intel (or compatible) PCMCIA controller.

AUTOMATIC_CONFIGURATION=ALWAYS
(ACONF=ALWAYS)             ; Instruct MADGECS to automatically
                             configure Madge PCMCIA Ringnodes which
                             are in the machine when MADGECS loads and
                             Ringnodes which are later inserted.
                             (See Section 2.6).

AUTOMATIC_CONFIGURATION=ONLY_ON_LOAD
(ACONF=OOL)                ; Instruct MADGECS to automatically
                             configure Madge PCMCIA Ringnodes which
                             are in the machine when MADGECS loads.
                             (See Section 2.6).

CLIENT_32                  ; Enable support for Novell Client32. (See
                             Section 2.6).


2.5 Configuration-file options for MADGECS
------------------------------------------
The  MADGECS configuration file, default name MADGECS.CFG, can be used 
to  specify  configuration  options  to  MADGECS.   The   use   of   a 
configuration file is optional.

********************************************************************** 

Note: Put  your MADGECS.CFG file in the same directory as MADGECS.EXE, 
      or  use  the  /CFG=<filename> parameter when you run the program 
      (see Section 2.4). 

**********************************************************************

MADGECS  keeps  lists  of  the  I/O locations, interrupt settings, and 
memory  ranges  that  are  available  for  configuring  Madge   PCMCIA 
Ringnodes.  MADGECS  displays  these  lists  when it loads. MADGECS is 
unable to determine whether some of these resources are already in use 
by  other  system  hardware  (an I/O location may be in use by another 
device for example). To prevent resource clashes, the MADGECS resource
lists can be modified by entries in the configuration file.

The  available  configuration  file  options are described below (with 
abbreviations in brackets):

BRIEF (BR)                 ; Do not display configuration information.

SILENT (SI)                ; Turn off card insertion/ejection sounds.

EMULATE_SOCKET_SERVICES=YES
(ESS=YES)                  ; Instruct MADGECS to emulate Socket
                             Services. If this is specified, a
                             separate Socket Services is not required
                             and should not be loaded. This option can
                             only be used if the computer contains an
                             Intel (or compatible) PCMCIA controller.

USE_MEMORY=xxxx-yyyy, ...  ; Add memory regions to the list of
(MEM=xxxx-yyyy, ...)         available regions.
                             Each memory region should be aligned on a
                             4Kb boundary (i.e. xx00) and should be a
                             multiple of 4Kb in length. The default
                             8Kb region used by MADGECS is CC00-CDFF.
                             Multiple memory ranges may be specified
                             by providing a comma separated list.

                             MADGECS requires a 4Kb memory region for
                             general use. In addition, a 4Kb region is
                             required for each PCMCIA Ringnode used in
                             MMIO mode.

                           ; You  also  need  to  exclude  the area of 
                             memory  that  MADGECS  uses  from   being 
                             mapped by Windows or memory managers (see 
                             Section 3).

EXCLUDE_MEMORY=xxxx-yyyy   ; Remove memory regions from the list of
(XMEM=xxxx-yyyy, ...)        available regions. This parameter is
                             useful for excluding the default memory
                             range (CC00-CDFF) when this is
                             unavailable.
                             Multiple memory ranges may be specified
                             by providing a comma separated list.

USE_IO=xxxx, ...           ; Add I/O locations to the list of
(IO=xxxx, ...)               available locations. Each I/O location is
                             the base address of a 32-byte I/O range
                             and should be a multiple of 32 bytes.
                             I/O locations are specified in hex.
                             Multiple I/O locations may be specified
                             by providing a comma separated list.

EXCLUDE_IO=xxxx, ...       ; Remove I/O locations from the list of
(XIO=xxxx, ...)              available locations. 
                             Multiple I/O locations may be specified
                             by providing a comma separated list.

USE_INTERRUPT=n, ...       ; Add interrupts to the list of available
(INT=n, ...)                 interrupts. Interrupt numbers are
                             specified in decimal.
                             Multiple interrupts may be specified
                             by providing a comma separated list.

EXCLUDE_INTERRUPT=n, ...   ; Remove interrupts from the list of
(XINT=n, ...)                available interrupts.
                             Multiple interrupts may be specified
                             by providing a comma separated list.

EXCLUDE_SLOT=n             ; Prevent MADGECS from accessing a PCMCIA
                             card at the specified slot. This can be
                             used to prevent MADGECS from accessing
                             a card from another manufacturer which
                             was configured using a "Point Enabler".

AUTOMATIC_CONFIGURATION=ALWAYS
(ACONF=ALWAYS)             ; Instruct MADGECS to automatically
                             configure Madge PCMCIA Ringnodes which
                             are in the machine when MADGECS loads and
                             Ringnodes which are later inserted.
                             (See Section 2.6).

AUTOMATIC_CONFIGURATION=ONLY_ON_LOAD
(ACONF=OOL)                ; Instruct MADGECS to automatically
                             configure Madge PCMCIA Ringnodes which
                             are in the machine when MADGECS loads.
                             (See Section 2.6).

AUTOMATICALLY_CONFIGURED_SLOT=n, ...
(ACSLOT=n, ...)            ; Only auto-configure Ringnodes inserted
                             in the specified slots.

CLIENT_32=YES              ; Enable support for Novell Client32. (See
                             Section 2.6).

You can use spaces and tab characters freely within the  configuration 
file. Comments are preceded by a semi-colon.
  
The following is a sample MADGECS.CFG file:

----------------------------------------------------------------------
| ; Configuration file for use with MADGECS                          |
| EMULATE_SOCKET_SERVICES=YES                                        |
| EXCLUDE_IO=A20,1A20            ; Do not use these I/O locations.   |
| EXCLUDE_INT=3,5                ; Do not use these interrupts.      |
| USE_INT=10,11                  ; Use these interrupts.             |
| EXCLUDE_MEMORY=CC00-CDFF       ; Do not use 8Kb memory range CC00- |
|                                  CDFF.                             |
| USE_MEMORY=D000-D1FF           ; Use 8Kb memory range D000-D1FF.   |
----------------------------------------------------------------------


2.6 PCMCIA Card Auto-Configuration and Novell Client32
------------------------------------------------------
The interrupt number, I/O location and memory window  resources  of  a 
PCMCIA  card need to be configured through Card Services before a card 
can be used by a software driver.

There  are  2 ways by which a PCMCIA card may be configured using Card 
Services:

(1) The  software  driver  itself asks Card Services to configure the 
    card - the driver is Card Services aware.
(2) A separate  utility  asks  Card  Services  to  configure the card.
    Once the card is configured, the software driver may use the card.
    The software driver doesn't interface with Card Services and hence
    is not Card Services aware.

All Madge Smart 16/4 PCMCIA Ringnode drivers, with  the  exception  of 
CMDGODI.LAN  (the  driver for Novell Client32) are Card Services aware 
and are able to configure PCMCIA Ringnodes themselves. Madge  drivers, 
with the exception of CMDGODI.LAN, therefore do not require a separate 
utility to configure PCMCIA Ringnodes.

Most  DOS  Card  Services are provided with an auto-configuration/card 
management utility which has the ability to configure  certain  PCMCIA 
cards  upon  detection.  MADGECS  has  this  capability  built  in, a 
separate utility is therefore not needed.

If MADGECS is required to auto-configure Madge PCMCIA  Ringnodes,  the 
AUTOMATIC_CONFIGURATION  parameter  must  be  specified on the command 
line or in the MADGECS configuration file.

* Specifying AUTOMATIC_CONFIGURATION=ONLY_ON_LOAD will  cause  MADGECS 
  to  auto-configure  those  Madge  PCMCIA  Ringnodes which are in the 
  computer at the  time  MADGECS  loads.  Any  Ringnodes  subsequently 
  inserted will not be configured.

* Specifying  AUTOMATIC_CONFIGURATION=ALWAYS  will  cause  MADGECS  to 
  auto-configure Madge  PCMCIA  Ringnodes  upon  insertion  (including 
  those  in  the computer at the time MADGECS loads). Only use this if 
  you  wish  to "hot-swap" PCMCIA cards (less memory is used if PCMCIA
  Ringnodes are configured "only on load").

In  addition  to  using  MADGECS  to  auto-configure  Ringnodes,   the 
CLIENT_32  parameter  must  be specified on the command line or in the 
configuration file if MADGECS is  required  to  support  Madge  PCMCIA 
Ringnodes  in  the  Novell  Client32  for  DOS  environment  using the 
CMDGODI.LAN  driver.  If the CLIENT_32 parameter is specified, MADGECS
defaults to performing auto-configuration "only on load".


3) Installing Madge Card Services for OS/2
------------------------------------------

3.1 Socket Services
-------------------
If you are installing Madge Card Services for OS/2, ensure that you do 
not  have  any third party Socket Services software installed. MADGECS 
for OS/2 will always emulate Socket Services  and  therefore  requires 
that the computer contains an Intel (or compatible) PCMCIA controller.


3.2 Loading MADGECS.SYS from CONFIG.SYS
---------------------------------------
To  replace  Card  and  Socket  Services  on an OS/2 workstation, load 
MADGECS.SYS by adding the following line to CONFIG.SYS:

DEVICE=<path>MADGECS.SYS


3.3 Command-line options for MADGECS.SYS
----------------------------------------
The command-line  options  for  MADGECS.SYS  are  the  same  as  those 
described in Section 2.4 with the following exceptions:

*  MADGECS.SYS can't be unloaded (the /U option is not available).
*  EMULATE_SOCKET_SERVICES is not required.
*  The   AUTOMATIC_CONFIGURATION  and  CLIENT_32  parameters  are  not
   supported.


3.4 Configuration file options for MADGECS.SYS
----------------------------------------------
You  can  configure MADGECS.SYS from a MADGECS.CFG file in exactly the 
same way as is described in Section  2.5.   If  you  do  not  want  to 
configure MADGECS.SYS, you do not need to create a MADGECS.CFG file.


                 ****** End of MADGECS.TXT *******