
                  XCDROM -- DOS CD-ROM Disk Driver, V1.5
                ==========================================

1. General Description
   -------------------

   XCDROM is a DOS driver for PC system CD-ROM drives.    It is for use on
   "end user" PC systems with normal IDE channels, including 1997 or later
   mainboards using an Intel/VIA/SiS/ALi or other UltraDMA controller chip
   set to "Legacy IDE mode".   XCDROM is NOT for SCSI, Serial-ATA, "Native
   PCI mode" servers, or any "add-on" IDE adapter card offered by Promise,
   SiiG, etc.    XCDROM handles normal mainboard IDE channels and AVOIDS a
   need for an "add-on" card!

   XCDROM runs from 1 to 3 CD-ROM drives.   On loading, it checks both IDE
   channels, in order from primary-master to secondary-slave, and runs the
   first two CD-ROM drives found.   It has switch options (see below) that
   specify the "driver name" and request testing of specific IDE units for
   CD-ROM drives, rather than checking all units in "IDE order".    XCDROM
   processes requests from a "CD-ROM redirector" program (SHCDX33A, MSCDEX
   etc.) for its CD-ROM drives, and it offers the same features and "audio
   functions" as other DOS-compatible CD-ROM driver programs.

   XCDROM runs only the normal IDE channels at their "default" I-O address
   ranges of 1F0h-1F7h (primary) and 170h-177h (secondary).    It does not
   use interrupts, and it defaults to normal "PIO mode" for data transfer.
   This allows XCDROM to be used by older mainboards and with plug-in "IDE
   cards" used with pre-1997 systems.    XCDROM sets a local-stack, does a
   load-time 80386+ check and I-O timeout checks, and includes other items
   that make the driver SAFE!   XCDROM uses less than 2560 bytes of memory
   and has a file size of less than 4096 bytes.

   XCDROM is designed to interface with the V3.1+ XDMA output-overlap disk
   drivers, and all V3.0+ XDMA/XDMAJR drivers, for two major improvements:

     A) If V3.1+ XDMA with overlap is loaded, XCDROM "synchronizes" CD-ROM
          I-O with disk I-O.   This ELIMINATES the previous restriction of
          no overlap if an IDE channel must "share" an UltraDMA disk and a
          CD-ROM drive!    While an IDE channel is busy with XDMA overlap,
          XCDROM "delays" CD-ROM I-O for that channel, until overlap ends.
          Allowing an IDE channel to "share" an UltraDMA disk and a CD-ROM
          drive makes system setup easier, and allowing XDMA to use output
          overlap on that channel improves system speed!

     B) If V3.1+ XDMA with overlap is loaded, and if any V3.0+ XDMA/XDMAJR
          driver is loaded, XCDROM can access the UltraDMA controller with
          variables set by XDMA.   XCDROM can thus use UltraDMA for CD-ROM
          data input (requests unsuitable for UltraDMA will use "PIO mode"
          as before).   Since most new CD-ROM drives handle UltraDMA, this
          also improves system speed!

   These improvements require that XCDROM must be be loaded after XDMA, so
   XCDROM can "find" the XDMA driver and access required common variables.
   XCDROM does so using the "Int13 vector", set by XDMA for disk I-O.   If
   a disk "cache" program is also loaded, the "cache" must load AFTER both
   XDMA and XCDROM ("caches" also set Int13).   If V3.1+ XDMA is absent or
   not using overlap, XCDROM runs independently (NO "sync"!).   Also, with
   other XDMA/UDMA2/UDMA versions (except V3.1+ XDMA with overlap or V3.0+
   XDMA/XDMAJR), XCDROM will be limited to "PIO mode" input.

   [NOTE:  Even if XCDROM and V3.1+ XDMA "synchronize", system performance
   is REDUCED when an UltraDMA disk and a CD-ROM "share" a channel.   This
   cancels simultaneous I-O and DEFEATS output-overlap!   Best performance
   occurs when UltraDMA disks use the primary IDE channel and ATAPI drives
   use the secondary IDE channel.   Also, the restriction of no overlap is
   eliminated ONLY when XDMA V3.1+ is used with a CD-ROM handled by XCDROM
   and/or a ZIP drive handled by XZIP (available in 2006).   Overlap still
   CANNOT be used if XDMA and any other drivers except XCDROM/XZIP "share"
   an IDE channel!]


2. Revision History
   ----------------

   V1.5   5-Jan-06  Fixed "Audio Status" and /AX device-status flags,
                      added support for up to 3 CD-ROM drives.

   V1.4   2-Jan-06  Initial release.   Added 2-drive support.

   V1.3  30-Dec-05  4th "Beta" issue, uses V3.1+ XDMA "OCheck".

   V1.2  23-Dec-05  3rd "Beta" issue, new /UF and /UX switches.

   V1.1  15-Dec-05  2nd "Beta" issue, improved interface with XDMA.

   V1.0  14-Dec-05  Original "Beta" XCDROM issue.


3. Switch Options
   --------------

   XCDROM switch options are as follows:

      /AX   Excludes ALL audio functions.   This makes the driver report
              on a Device-Status request that it reads DATA tracks only!
              /AX reduces the resident driver by 480 bytes.    UltraDMA,
              dual-drives, and other driver features are NOT affected!

      /D:   Specifies the desired "device name" which SHCDX33A or MSCDEX
              will use during their initialization to address the CD-ROM
              drives.   Examples are:  /D:CDROM1  /D:MYCDROM  etc.   The
              device name must be from 1 to 8 bytes valid for use in DOS
              filenames.   If /D: is omitted, or the "device name" after
              a /D: is missing or invalid, "XCDROM" will be the default.

      /L    Limits UltraDMA to "low memory" below 640K.   /L is REQUIRED
              to use UMBPCI or a similar driver whose upper-memory areas
              cannot do UltraDMA.   If /L is given, the driver must load
              in LOW memory so its DMA command-lists can fetch preperly,
              or driver loading will ABORT!   /L causes any I-O requests
              above 640K to use "PIO mode" input.   Note that /L will be
              IGNORED if /UX is also given.

      /Mn   Specifies the MAXIMUM UltraDMA "mode" to be set for a CD-ROM
              drive, where  n  is a number between 0 and 2, as follows:
                    0 = ATA-16, 16 MB/sec.
                    1 = ATA-25, 25 MB/sec.
                    2 = ATA-33. 33 MB/sec.
              A CD-ROM drive designed to use "modes" LESS than the given
              value will be limited to its own highest "mode".   /M will
              be IGNORED for CD-ROM drives which cannot do UltraDMA, and
              it will be ignored for ALL drives if /UX is also given.

      /PM   Requests the driver to check the IDE primary-master unit for
              a CD-ROM drive during driver init.    If a CD-ROM drive is
              NOT found as primary-master, driver loading will ABORT!

      /PS   Same as /PM but tests the primary-slave unit only.

      /SM   Same as /PM but tests the secondary-master unit only.

      /SS   Same as /PM but tests the secondary-slave unit only.

              --- NOTE ---
              Using multiple drives, multiple  /PM /PS /SM /SS  switches
              can be given.    The first-specified drive is addressed as
              "unit 0", the second as "unit 1", etc.   If fewer switches
              than drives are given, the unreferenced drives will NOT be
              used.    If NO such switches are given, the driver "scans"
              for CD-ROM drives, from primary-master to secondary-slave.
              The first drive found will be "unit 0", the second will be
              "unit 1", etc.

      /UF   Enables "Fast UltraDMA".   Data input requests that cross an
              UltraDMA "64K boundary" are executed using a 2-element DMA
              command list, one for data up to the boundary, and one for
              data beyond it.   CD-ROM speed is increased significantly.
              "PIO mode" input is still needed for user buffers that are
              misaligned (not at an even 4-byte address).    /UF will be
              IGNORED for CD-ROM drives which cannot do UltraDMA.

              --- NOTE ---
              Despite any UltraDMA specs, NOT ALL chipsets or mainboards
              can run multi-element DMA commands properly!   Although it
              is valuable, /UF must be TESTED on every system, and "Fast
              UltraDMA" should be enabled with CARE!!

      /UX   Disables ALL UltraDMA, even for CD-ROM drives capable of it.
              The driver then uses "PIO mode" for all data input.    /UX
              should be needed only for tests and diagnostic work.

   For each switch, a dash may replace the slash and lower-case characters
   may be used.


4. Setup and Configuration
   -----------------------

   XCDROM is loaded by the CONFIG.SYS file, which must have a command line
   similar to:

            DEVICE[HIGH] = [path]XCDROM.SYS [/D:DeviceNm] [...]

   Examples:    DEVICE=C:\DOS\XCDROM.SYS
                DEVICEHIGH=C:\BIN\XCDROM.SYS /D:CDROM1 /SM /SS

   If the CD-ROM drive "shares" an IDE channel with an UltraDMA disk which
   will use XDMA output-overlap, or if UltraDMA is desired for the CD-ROM,
   the following RULES apply:

      A) The version 3.1+ XDMA disk driver (or later) must be used for IDE
           channel "sharing" and for CD-ROM UltraDMA.     Any version 3.0+
           XDMA or XDMAJR driver may also be used for CD-ROM UltraDMA.

      B) V3.1+ XDMA or V3.0+ XDMA/XDMAJR must be loaded before XCDROM.

      C) XDMA and XCDROM must BOTH load before any disk "cache" program.

   If IDE channel "sharing" or UltraDMA input is not needed, XCDROM may be
   loaded at any time in the CONFIG.SYS file.   See section 1 above, which
   explains these rules.


5. Error Reporting
   ---------------

   XCDROM reports an I-O error to its "CD-ROM redirector" program the same
   as all other DOS CD-ROM drivers.    For full details, see the Microsoft
   "MS-DOS CD-ROM Extensions 2.1", which includes information about CD-ROM
   device drivers for use with SHCDX33A or MSCDEX.


6. SPECIAL NOTES
   -------------

   Some CD-ROM drives (Sony, etc.) DO NOT follow all ATAPI "standards" and
   may require DISABLING UltraDMA with the /UX switch!

   Be sure to "enable" your CD-ROM drive(s) with the BIOS set-up routines!
   A drive that is "disabled" may cause the BIOS to clear all its UltraDMA
   flags and leave the drive in "PIO mode" zero, which is terribly SLOW!

   When cabling a CD-ROM drive by itself to an IDE channel, note that both
   "ends" of the cable must be used, NOT one end and the middle connector!
   This prevents ERRORS, as an unused cable-end CAN pick up "noise" like a
   RADIO antenna!

   If the driver "scans" for CD-ROM drives to use, error events WILL occur
   (select error, not a CD-ROM found, etc.).    Such events cause that IDE
   unit to be ignored.   However, the driver WILL display an error message
   when "told" with the  /PM /PS /SM /SS  switches to check a specific IDE
   unit, and the unit is a problem.   If an actual CD-ROM drive is ignored
   during a normal scan, users can add the proper  /PM /PS /SM /SS  switch
   to the XCDROM line in their CONFIG.SYS file, then re-boot.    This will
   force the error condition to be "displayed".

   If no CD-ROM drives are found, XCDROM displays "No CD-ROM drive to use;
   XCDROM not loaded!" and aborts.   But note that some BIOS programs will
   NOT "configure" mainboard UltraDMA chips when they find no IDE devices!
   Users who get the above message must first verify that the CD-ROM drive
   is "enabled" through the BIOS set-up routines.   If this HAS been done,
   "No CD-ROM drive found" says the UltraDMA chip was NOT set for "legacy"
   IDE channel addresses (1F0h/170h), and the BIOS may need to be UPDATED!

