
				    SHSUCDX

			   Copyright 2004 Jason Hood

			     Freeware. Version 3.00

			Derived from v1.4b by John McCoy


    ===========
    Description
    ===========

    SHSUCDX is an unloadable CD-ROM redirector	substitute  for  MSCDEX.  It
    supports  up  to 10 drives. Each drive is single-sector buffered and the
    last 10 directory entries are cached. Each unit from each driver can  be
    assigned a specific drive letter.


    =====
    Usage
    =====

    Run SHSUCDX with the name of one or more CD-ROM device drivers.  If  the
    drivers  are valid, SHSUCDX will install a drive letter for each unit on
    each driver.

    -------
    Options
    -------

	/D	driver and drive manipulation
	/L	drive letter
	/C	conventional memory
	/V	memory usage or information
	/~	tilde usage
	/R	read-only attribute usage
	/U	unload
	/Q	quiet

    /D - Driver

    This option is used to specify the name of the  device  driver.  It  can
    also  indicate  which unit(s) should be assigned and to what letter. The
    complete syntax is:

	/D[:][?|*]driver[,[letter][,[unit][,[max]]

    DRIVER is the name of the device driver installed to control the  CD-ROM
    drive.  The  default  is  SHSU-CDH.  Prefixing  the driver with '?' will
    silently ignore it if it does not exist; prefixing with  '*'  will  also
    ignore it, but a drive will be reserved (see below).

    LETTER is the first drive letter to assign to the units on this  driver.
    The  default  is  the  first  available letter.  Note: the drive letters
    assigned to subsequent units will always be higher than  those  assigned
    to previous units.

    UNIT is the first unit on this driver to be assigned a drive.  Unit 0 is
    the default.

    MAX is the maximum number of units on this driver to be assigned drives.
    The default is all units (or all remaining units, if UNIT is given).

    /D - Drive manipulation

    At install time, /D can also be used to  reserve  space  for  additional
    drives.  Use  a  single  digit  to	indicate  how  many drives should be
    reserved (eg: /D1). (If you should happen to have a device	driver	name
    with  a single digit, use the '?' prefix.)  After installation, the same
    option will remove the drive(s) that were last assigned. It is  possible
    to	specify both forms of /D, in which case the current drive(s) will be
    removed, then the new drives added.

    /L - Letter

    This option is an alternative to the LETTER component of  /D,  which  it
    must follow (ie: /D:driver /L:letter).

    /C - Conventional memory

    By default, SHSUCDX will load itself into  high  memory,  if  available.
    This option will prevent that.

    /V - Memory usage

    When this option is used at installation, a summary of memory usage will
    be displayed. This summary includes:

	Static		code and variables
	Dynamic 	data for each drive and paragraph rounding
	Total		overall memory usage

    /V - Information

    When used with /?, or  after  installation,  this  option  displays  the
    compile- and run-time options of SHSUCDX. This information includes:

	8086/386	the minimum processor required
	CD root form	TRUENAME will return \\D.\A.\ instead of D:\
	High Sierra	the original format for the CD file system
	Joliet		the Windows format for long names
	image on CD	enables access to an image which is itself on a CD

    /~ - Tilde usage

    The ISO standard allows for CDs to have names up to 31  characters,  and
    Joliet  can  have names up to 64 characters. When this is reduced to 8.3
    for DOS, it may lead to duplicated entries. This option will remove  the
    duplication by appending a tilded number after the name (similar to what
    Windows does). By default, tildes are off. This option is also available
    after  installation.  By itself it will toggle the status (ie. if tildes
    are currently on, /~ will turn them off, and vice versa). Tildes can  be
    explicitly	turned	on  or off by adding a '+' or '-' sign (ie: /~+ will
    turn tildes on, irrespective of the current state).

    /R - Read-only attribute usage

    By default, files on the CD are given the  read-only  attribute.  Should
    you  wish  to remove this attribute, this option will do so. As with /~,
    it can be used after installation and it accepts '+' and '-'.

    /U - Unload

    Unhook the interrupt, free the memory and mark the drive(s) as invalid.

    /Q - Quiet

    Prevent display of the  sign-on  banner  (the  copyright  notice;  drive
    assignments  will still be shown). If used twice (ie. /QQ), nothing will
    be displayed at all.


    ==========
    SMARTDrive
    ==========

    SMARTDrive caches MSCDEX by modifying  MSCDEX'  memory,  so  it  is  not
    directly  capable  of  caching  SHSUCDX.   However, the supplied SMARTER
    program (see README.TXT) can patch SMARTDrive,  enabling  it  to  modify
    SHSUCDX  in  the  same way. Due to the method employed, if /D is used to
    remove a drive, then later to install it again, it	will  no  longer  be
    cached.  If  a drive is created from an image file, SMARTDrive should be
    instructed not to cache it,  since	the  image  itself  will  be  cached
    (unless, of course, the image is located on a network).


    ===============
    Critical Errors
    ===============

    A critical error is only generated on the initial access to the CD. If a
    read  error  occurs, the calling function will fail with error 15 (drive
    not ready). If an image is located on a CD, and that CD is	removed,  do
    NOT  abort,  but fail and then abort (the first error is for the CD, the
    second is for the image).


    ===========================
    Additional CD-ROM Functions
    ===========================

    SHSUCDX has an additional installation check:

	Int 2F
	AX = 1100
	BX = BABE
	Return:
	  BX = compile-time flags, or BABE if SHSUCDX v3 not installed
	  ES:DI -> drive table
	  CX = number of drives
	  DX = size of each entry

	Compile-time flags:
	Bit 0 = 0 if 386, 1 if 8086
	    1 = 1 if CD root form (\\D.\A.\)
	    2 = 1 if High Sierra is supported
	    3 = 1 if Joliet is supported
	    4 = 1 if image on CD is supported

    There are also functions to control the tilde and read-only state:

	Int 2F
	AX = 150F
	CL = -1
	  CH = 0: Get current tilde state in AX (0 off, -1 on)
	       1: Set current tilde state from BX (0 off, anything else on)
	       2: Get read-only attribute in AX (0 = off, 1 = on)
	       3: Set read-only attribute from BX (0 off, anything else on)

	Carry will be cleared (MSCDEX will set carry).

    Finally, there is a function to convert a CD directory name to an FCB:

	Int 2F
	AX = 150F
	CL = -2
	  ES:SI -> pointer to directory entry
	  ES:DI -> 11-byte buffer for FCB name
	     DX = alias number (0 for none)

    The alias number is the number of the directory entry within the sector,
    plus  64  times  the  sector  number (both zero based). For example, the
    third entry in the third sector of a directory would have an alias	num-
    ber of 130 (2 + 2 * 64).


    =========
    Exit Code
    =========

	0	Uninstalled, help, option set
	1-32	Drive number of first installed drive (A=1)
	246	Invalid or unknown option
	247	Unable to uninstall
	248	Not enough memory
	249	No drives assigned (ie. not installed)
	250	No drive letters available
	251	Unit on driver does not exist
	252	Invalid or non-existant driver
	253	Already installed
	254	Unsupported version of DOS
	255	386 required


    ==============================
    Jason Hood, 30 November, 2004.
