	Display Tuple Utility
	---------------------

History:

    Version 3.12.09
	- Initial version released.

    Version 4.03.09
	- Modified CRC computation to only include through the first two
	  strings of the Level 1 Version tuple.  This was changed because
	  serial numbers are occasionally being placed in the additional
	  strings.
	- Added -r option which dumps raw tuple data bytes.
	- Added dump of tuple data bytes following expanded tuple
	  information.

    Version 4.03.23
	- Fixed bug in config entry processing.

    Version 4.03.31
	- Removed I/O and Memory window limits in logical configs, and
	  fixed bug in IRQ resource handling in logical configs.

    Version 4.04.05
	- Fixed bug in IRQ resource handling in logical configs.


DTPL.EXE is a tool designed for interpreting the tuples on a PC Card.

This tool is intended to help you design or verify CIS for use with
Microsoft's future implementations of PCMCIA support in Windows.  For
more information on these implementations, refer to the appropriate
developer's kit and documentation, which can be obtained from
Microsoft's Hardware Vendor Relations Group, ihv@microsoft.com.

DTPL runs in realmode on MS-DOS using realmode Card Services and Socket
Services implementations.  It is intended to be run on PC Cards that have
not been configured by a card services client, or enabler.  Therefore
card services clients and PC Card enablers should not be loaded or
active when using this tool.

This tool displays information derived from the tuples on the PC Card.
This includes the PnP Device ID, the PnP Logical Configurations, and a
display of each tuple on the card.

    Usage: DTPL [-f <filename>] [-i] [-l] [-r] [-t] [socket#]

	Display tuple data for PC Cards.
	-f defines a filename to take the tuple input from instead of
	   calling CS.
	-i will display the PNP Device ID for the PC Card.
	-l will display the PNP logical configurations for the PC Card.
	-r will display raw tuple data bytes, formatted for input file.
	-t will display all of the tuples on the PC Card.
	Socket# is an optional socket to display,
	otherwise all sockets will be displayed.


The -f option allows the tuple input to be taken from a file.  This allows
tuples to be interpreted with out the need for a realmode Card Services
driver and also allows tuples to be tested before they are placed on a PC
Card.

The tuples in this file must be defined in an ASCII HEX format.  Each
hex value must have two digits, the parser for this is very simple.
Comments may be placed in the tuple file using a semicolon ';'
For example the following tuple is a config entry tuple for a comm port.

; This is a COM1 port
1B 11	; Config entry and link values.
E0 01 1D 48 D5 02 1D FC
14 A0 60 F8 03 07 30 3C 00

The optional Socket# is ignored when the -f option is used and the socket
for the tuples will be set to 0xFF.


The -i option displays the PnP Device ID for the PC Card.
The PnP Device ID is the ID that will be generated by the PCMCIA Bus
Enumerator for the device and used by the Plug and Play system.  This
ID should be used when generating the .INF file for a device.

The device ID is created from the manufacturer name string,
the product name string, and a 16-bit CRC of a set of tuples.
The ID is created by concatinating the PCMCIA" prefix, the manufacturer
name string, the product name string, and a 16-bit CRC.  The Device ID
has the following format:

    PCMCIA\<manuf_name>-<prod_name>-<crc>

The <manuf_name> and ,Prod_name> are obtained from the CISTPL_VERS_1 tuple.
If the CISTPL_VERS_1 tuple is not available or the manufacturer name is
NULL, the string "UNKNOWN_MANUFACTURER" will be included in its place.

The CRC will be created from the following tuple data.

    CISTPL_DEVICE .................... 01H
    CISTPL_VERS_1 .................... 15H
    CISTPL_CONFIG .................... 1AH
    CISTPL_CFTABLE_ENTRY ............. 1BH
    CISTPL_MANFID .................... 20H

Only the first two strings in the CISTPL_VERS_1 tuple, the manufacturer
and product name strings, are included in the CRC.  This is because serial
numbers are occasionally placed in the additional strings of this tuple.
These serial numbers would cause the CRC to be different for each card
even though they are the same.

The total length of the device ID string is limited to 128 characters,
including the null terminator.	The manufacturer and product name will
be truncated to maintain this length restriction in the ID string.

The characters in the manufacturer and product name strings that are
greater than or equal to a space (0x20) or less than (0x7F) will be
copied into the name string.  Any other characters outside this range
will be skipped.  This makes it easier to include these characters in
the .INF files for the device.

Spaces ' ' in the device ID will be converted to underscores '_'.


The -l option displays the PnP Logical Configurations for the PC Card.
The PnP Logical Configurations are generated by the PCMCIA Bus Enumerator
from the Config and Config Entry tuples.  The display of these
configurations is intended to provide some feedback on the interpretation
of the configuration tuples on the PC Card.  The logical configuration
will be used by the Plug and Play Configuration Manager to determine the
configuration for the PC Card.	The information displayed includes I/O,
IRQ, and Memory resource data, along with the contents of a Card Services
RequestConfiguration argument structure.

The -r option displays each tuple as its raw data bytes.  This is in a
format that can be easily edited and feed back to the DTPL tool as an
input file using the -f option.  Note that any strings that are not data
bytes must be commented out with a ';' or removed from the input file.

The -t option displays each tuple in a more readable format.
Many of the tuples are interpreted and displayed in an expanded form.
For example this is done for the configuration entry tuples which are
difficult to understand without such expansion.  Following the expanded
information for each tuple is a dump of the tuple data bytes in an ASCII
HEX format followed by an ASCII dump of each byte in the tuple.
Non-printable bytes are diplayed as a period '.' in the ASCII dump.
Tuples that are not expanded are displayed in an ASCII HEX format only.


Note this tools has been tested using the SystemSoft and Phoenix Card
Services drivers.  If it fails to work on other Card Services
implementations, try using the -f option which reads the tuple data from
a file.


-----
