
                 QCDROM -- DOS CD and DVD Disk Driver, V2.4
               ==============================================

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

   QCDROM is a DOS driver for CD and DVD drives.   It is for use on normal
   PC system IDE channels, including on 1997 or later mainboards having an
   Intel/VIA/SiS/ALi or similar UltraDMA controller chip.    QCDROM is NOT
   for SCSI, Serial-ATA, or "add-on" IDE adapter cards offered by Promise,
   SiiG, etc.    QCDROM handles normal mainboard IDE channels and AVOIDS a
   need for an "add-on" card!

   QCDROM runs from 1 to 3 CD/DVD drives.   On loading, it checks both IDE
   channels, in order from primary-master to secondary-slave, and runs the
   first three CD/DVD drives found.   It has switch options (see below) to
   specify the "driver name" and request testing of specific IDE units for
   CD/DVD drives, instead of checking all units in "IDE order".   Both old
   PIO-mode drives and newer UltraDMA drives may be used, as QCDROM checks
   for and uses a mainboard UltraDMA controller as well.    QCDROM handles
   requests from a "CD-ROM redirector" program (SHCDX33A, MSCDEX etc.) for
   its CD/DVD drives.   It also accepts the same "audio" requests as other
   DOS-compatible CD/DVD drivers.

   QCDROM runs only the normal IDE channels at their "regular" I-O address
   ranges of 1F0h-1F7h (primary) and 170h-177h (secondary).    It does not
   use interrupts, and it does normal PIO-mode data input when no UltraDMA
   controller is found.    This lets QCDROM work with older mainboards and
   with the plug-in "IDE cards" on pre-1997 systems.   QCDROM sets a local
   stack, does an 80386+ test and uses I-O timeout tests, and it has other
   items that make the driver SAFE!   QCDROM uses 2368 bytes of memory and
   has a file size of under 4K bytes.

   If the QDMA disk driver is loaded and using its output-overlap feature,
   QCDROM can "synchronize" CD/DVD functions with disk I-O.   If a channel
   is busy with QDMA overlap, QCDROM will delay CD/DVD I-O on that channel
   until overlap ends.   Allowing IDE channels to "share" an UltraDMA disk
   and a CD/DVD drive makes system setup easier.   Also, if the V2.4+ QDMA
   with "shared" XMS buffers is present, V2.4+ QCDROM can now be loaded in
   UMBPCI upper-memory!    In this case, QCDROM's /L switch causes its DMA
   command-lists to be issued from XMS memory.    This saves 2368 bytes of
   low memory for UMBPCI users!    For these features to work, QCDROM must
   load after QDMA, so QCDROM can locate the disk driver and access common
   variables.   If a separate "cache" program is used, the "cache" must be
   loaded after QDMA and QCDROM.   If QDMA is absent or not using overlap,
   QCDROM will run independently.   And if XMS is unavailable, QCDROM with
   /L can still load in low-memory, for use with UMBPCI.

   V2.4+ QCDROM now locates V2.4+ QDMA by issuing a special BIOS "Int 13h"
   call, known only to QDMA.   This logic avoids temporary-memory problems
   and works wherever the QDMA driver resides in memory.    Users of V2.4+
   QCDROM must also upgrade to the V2.4+ QDMA driver with its V2.4+ QDBOOT
   "boot" loader.   QDBOOT is required only with UMBPCI, due to its use of
   "shadow RAM" for upper-memory.   QDBOOT runs O.K. if used with EMM386.

   [NOTE:  Even if QCDROM and V2.4+ QDMA "synchronize", system performance
   is LOWER if an UltraDMA disk and a CD/DVD "share" a channel.   The disk
   and CD/DVD cannot BOTH run at the same time.   Better speed is achieved
   if UltraDMA disks use the primary IDE channel and CD/DVD drives use the
   secondary channel, to gain full benefit from QDMA's output-overlap.]


2. NO Warranty
   -----------

   QCDROM is offered as free software, "as is" and "use at your own risk",
   and WITHOUT any warranty,  not even the implied warranties of MERCHANT-
   ABILITY nor of FITNESS for ANY particular purpose!

   QCDROM questions may be addressed to Johnson Lam at <johnson@tmfc.net>.
   The writer of QCDROM in the U.S.A. will try to reply and to keep QCDROM
   working O.K.


3. Revisions
   ---------

      V2.4  30-Jun-06  QCDROM now uses an "Int 13h" to find QDMA, which
                         avoids temporary-memory problems.    QCDROM is
                         now V2.4 to match QDMA.    XMS buffers are now
                         assigned one per driver, not per I-O channel.

                       [V2.2 and V2.3 were never used by QCDROM].

      V2.1  23-Jun-06  QCDROM updated to work with V2.3+ QDBOOT.

      V2.0  30-Apr-06  QCDROM/QDMA "linkage" revised to support EMM386.

      V1.2  16-Mar-06  QCDROM can now load in UMBPCI upper-memory, when
                         V1.4+ QDMA and "shared" XMS memory is present.

      V1.1   8-Mar-06  QCDROM now "shares" V1.4+ QDMA's XMS buffers, to
                         avoid "PIO mode" and gain more speed!    Added
                         support for up to 3 CD/DVD drives.

      V1.0  20-Feb-06  Original release.


4. Switch Options
   --------------

   QCDROM switch options are as follows:

      /D:   Specifies the desired "device name" which SHCDX33A or MSCDEX
              will use during their initialization to address the CD/DVD
              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, QCDROM1 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 handle UltraDMA.   If /L is given and QCDROM itself
              loads in upper-memory, V2.0+ QDMA with "shared" XMS memory
              must be loaded first, or QCDROM will ABORT!    /L causes a
              request for data above 640K to be input through QDMA's XMS
              buffers.   If the driver was loaded low and runs by itself
              (no XMS memory), "PIO mode" shall handle input above 640K.
              Note that /L will be IGNORED if /UX is also given.

      /PM   Requests the driver to check the IDE primary-master unit for
              a CD/DVD drive during driver init.    If a CD/DVD 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 ---
              For 2 or 3 drives, multiple  /PM /PS /SM /SS  switches are
              allowed.   The first-specified drive is addressed as "unit
              0", the second as "unit 1", etc.    If fewer switches than
              drives are given, unreferenced drives will be UNUSED.   If
              NO drive switches are given, QCDROM will "scan" for CD/DVD
              drives from primary-master to secondary-slave.   The first
              drive found will be "unit 0", the second "unit 1", etc.

      /UF   Enables "Fast DMA".   I-O requests which cross UltraDMA "64K
              boundaries" use two-part DMA, for data up to the boundary,
              and for data beyond it.    I-O which is misaligned (not at
              an even 4-byte address) will go through QDMA's XMS buffers
              if available or will use "PIO mode" otherwise.

              --- NOTE ---
              Despite UltraDMA specs, NOT ALL chipsets or mainboards run
              "Fast DMA" properly, so /UF must be TESTED on each system!

      /UX   Disables ALL UltraDMA, even for CD/DVD 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.


5. Setup and Configuration
   -----------------------

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

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

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

   If the CD/DVD drive "shares" an IDE channel with an UltraDMA disk which
   will use QDMA output-overlap, or if V2.0+ QDMA's XMS buffers are needed
   with the /L switch or for better speed, the following RULES apply:

      A) The appropriate QDMA driver must load before QCDROM.

      B) QDMA and QCDROM must BOTH load before any disk "cache" program.

   Without IDE channel "sharing", or a need for XMS buffers, QCDROM may be
   loaded at any point in the CONFIG.SYS file.    See section 1 above, for
   explanations of these rules.


6. Error Reporting
   ---------------

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


7. SPECIAL NOTES
   -------------

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

   Be sure to "enable" your CD/DVD 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/DVD 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/DVD drives to use, error events WILL occur
   (select error, not a CD/DVD found, etc.).    Such events cause that IDE
   unit to be ignored.   When an actual CD/DVD drive is ignored, users can
   add the appropriate  /PM /PS /SM /SS  switch for that drive to QCDROM's
   line in the CONFIG.SYS file, then re-boot.    Specifying a drive-select
   switch always causes errors for that drive to be displayed.

   If no CD/DVD drives are found, QCDROM displays "No CD/DVD drive to use;
   QCDROM 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/DVD drive
   is "enabled" through the BIOS set-up routines.   If this HAS been done,
   "No CD/DVD drive to use" says the UltraDMA chip is NOT set for "legacy"
   IDE channel addresses (1F0h/170h), and the BIOS may need to be UPDATED!
   Note also that QCDROM does not support "Native PCI mode" UltraDMA chips
   ("servers"), only chips set to "Legacy IDE mode".

