
                 XMGR, RDISK, and UIDE -- DOS Device Drivers
               ===============================================

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

   XMGR, RDISK, and UIDE are a group of DOS device drivers for a PC system
   with an 80386+ CPU and using MS-DOS V5.0+ or equivalent.

   XMGR is a DOS "XMS manager", which handles up to 4-GB of XMS memory and
   directly supports V3.70+ UMBPCI from Uwe Sieber.   After UMBPCI enables
   upper-memory, XMGR loads there and provides upper- and XMS memory for a
   DOS system.   XMGR sets an "I-O Catcher" for UMBPCI.   Disk or diskette
   I-O above 640K is trapped and done using a low memory buffer, as UMBPCI
   Shadow-RAM cannot do DMA!   XMGR also works with JEMM386, MS-DOS EMM386
   etc.    With an EMM driver, XMGR using its /B switch first boots into a
   temporary area.   After upper memory is enabled by the EMM driver, XMGR
   loads there with no /B, copies-up all its boot data, and takes over XMS
   work.   On small XMS-only systems, XMGR can run entirely in low memory.

   RDISK is a DOS RAM-disk driver.    It creates a "fast" disk drive using
   2 Megabytes to 2 GIGABYTES of XMS memory!   It loads as a system driver
   in CONFIG.SYS, or it can load later in AUTOEXEC.BAT or by user command.
   DOS can copy critical programs and data to the RAMdisk, where they will
   be read or written at memory speeds!   RDISK runs with V2.0 or V3.0 XMS
   managers (60-MB maximum for V2.0 XMS).    It uses only 656 to 752 bytes
   of upper/DOS memory, depending on the system.   RDISK is a simple, tiny
   RAMdisk driver, for use where resizing or other options are not needed.

   UIDE is a DOS disk and CD/DVD caching driver.   It intercepts "Int 13h"
   BIOS I-O and caches data for up to 22 BIOS disks on up to 9 "Legacy" or
   "Native PCI" SATA/IDE controllers, including A: or B: diskettes.   UIDE
   handles hard-disks of any size (has full 48-bit LBA logic!) and accepts
   48-bit LBA or 24-bit CHS I-O calls from a new or old DOS system.   UIDE
   "calls the BIOS" for diskettes and intercepts I-O for "Int 13h" drivers
   loaded first, thus UIDE caches ALL drives on a DOS system!   ("ASPI" or
   other "non Int 13h" drivers are unsupported).   Up to 4 SATA/IDE or old
   PIO-mode CD/DVD drives are also handled.    UIDE caches CD/DVD data and
   directories for MUCH greater speed, and it can play audio CDs and input
   "raw" trackwriter data (audio or trackwriting is not cached).

   UIDE caches 5 Megabytes to 4 GIGABYTES of data!    All its cache tables
   and data are in XMS memory.    UIDE uses 4448 bytes of upper/DOS memory
   for any cache size.   A "stand alone" UIDE (/B switch, no diskettes nor
   caching) can be set for tests/diagnostics and uses 3472 bytes of upper/
   DOS memory.   UIDE's /H switch can load most of the driver in free HMA,
   thus using only 880 bytes of memory (768 "stand alone")!

   The smaller UHDD and UDVD2 drivers are also provided.   UHDD is a disk-
   only caching driver for up to 22 SATA/IDE disks of all sizes on up to 9
   controllers, including A: or B: diskettes.   UHDD has greater speed due
   to "overlap" of disk UltraDMA and caching tasks (UIDE does no overlap).
   UHDD requires 3344 bytes for any size cache or 1328 bytes "stand alone"
   with a /B switch.   It can place most of its logic in the HMA with a /H
   switch, taking only 784 memory bytes (576 "stand alone").    UDVD2 is a
   CD/DVD-only driver for up to 4 SATA/IDE or old "PIO mode" CD/DVD drives
   on up to 9 controllers.   UDVD2 can work "alone" and uses 1968 bytes of
   upper/DOS memory (144 with a /H switch).    When the caching UHDD is in
   use, UDVD2 calls it to cache CD/DVD data files, giving FAR higher speed
   for only 80 more bytes!   UHDD/UDVD2 require a 128K XMS buffer, for I-O
   that is "misaligned" or otherwise unsuited to UltraDMA.   The buffer is
   set by UHDD's /B switch or added to UHDD's cache memory.   UDVD2 shares
   UHDD's buffer or sets its own if UHDD is absent.   UHDD and UDVD2 are a
   complete disk/CD/DVD driver package, taking only 10K of space on "boot"
   diskettes or other small DOS systems, while still offering fast caching
   along with small non-cached drivers for use as desired.

   The small RDISKON.COM program can "re-enable" a DOS drive used by RDISK
   if a "format" command is accidentally issued to it.   This disables the
   drive on some systems!    Entering  RDISKON L  at a DOS command-prompt,
   where L is the desired drive letter (A to Z), will re-enable the drive.

   The small CC.COM "Clear Cache" program can help verify files written by
   UIDE/UHDD.   Entering  CC  at a DOS command-prompt sends a BIOS "reset"
   to every disk, making UIDE/UHDD "flush" its cache.   Data from the disk
   (NOT data still in cache!) can then be compared to the original output.


2. NO Warranties
   -------------

   XMGR, RDISK, and UIDE are offered at no cost, "as is", "use at your own
   risk", and with NO warranties, not even the implied warranty of FITNESS
   for any particular purpose nor of MERCHANTABILITY!

   Driver questions and comments may be addressed to the E-Mail of Johnson
   Lam, <johnsonlam.hk@gmail.com>.


3. Revision Summary
   ----------------

    5-Mar-15   UIDE/UHDD/UDVD2 now handle 9 controllers, 22 BIOS disks or
                 diskettes, 4 CD/DVD drives.    UHDD binary-search buffer
                 is again 512 bytes.    UIDE/UHDD "CD/DVD" cache deleted.
                 Other drivers unchanged (re-dated only).

   24-Nov-14   UIDE/UHDD "User" caches and UIDE user-cache logic deleted,
                 due to non-use.   UIDE now runs 26 disks/diskettes and 6
                 CD/DVD drives (same as UHDD + UDVD2) which saves memory.

   14-Nov-14   UHDD now "overlaps" UltraDMA disk input AND output with as
                 many caching tasks as possible, for much improved speed!

   19-Oct-14   UHDD "overlaps" cache work during UltraDMA disk output and
                 disk sector "gaps" at I-O end, for more speed!   UHDD /M
                 switch deleted, 256-byte search buffer is now permanent.

   27-Sep-14   New UHDD /M switch sets a 512-byte binary search buffer.

   26-Jan-14   UIDE error handling CD/DVD media-changes for "stand alone"
                 mode is fixed.   UHDD offers "Common" & "CD/DVD" caches.

   12-Jan-14   UIDE /UD switch deleted (many problems!).    "Stand alone"
                 UHDD/UDVD2 re-added, for use as needed.

   12-Dec-13   UHDD/UDVD2 deleted (low use).    UIDE /N2 dismisses CD/DVD
                 logic.   UIDE /C switch added, user caching improved.

   21-Nov-13   UHDD old style "stand alone" driver re-added.

   25-Sep-13   BAD error fixed in UDVD2 re: locating UHDD!    MANY Thanks
                 to Japheth for his tests and exact analysis!

    9-Sep-13   Possible but unlikely UHDD exit errors corrected.   UDVD2/
                 UIDE now use all 32 CD/DVD LBA bits in caching calls.

    2-Sep-13   Possible UDVD2 "media-change" error fixed.   UHDD /N1 size
                 reduced.

   30-Apr-13   UHDD/UDVD2 can now run without XMS (lower speed) for tests
                 and FreeDOS "scripts".   UDVD2 can now do "raw" input.

   15-Oct-12   UHDD/UIDE again detect A: and B: diskettes from BIOS data,
                 NOT from "Int 13h" calls that FAIL with an LS-120 drive!

    2-Aug-12   UHDD "disk only" caching driver added.    UDVD2 caches CD/
                 DVD data if UHDD is also loaded!   UIDEJR deleted.   New
                 /UD switch in UDVD2/UIDE, for CD/DVD directory caching.

    9-Jul-12   UIDE/UIDEJR device select error, for master + slave CD/DVD
                 units on one IDE channel, is corrected.   Many Thanks to
                 Doug Beneway for finding this error!

   25-Jun-12   UIDE2 deleted:  Not-enough added speed, complex to use.

   17-Jun-12   UIDE/UIDE2/UIDEJR /A switch, init of 2 "Old IDE" channels,
                 and CD-audio "Q"/status data corrected.   Many Thanks to
                 Japheth for his research and audio-test program!

   29-May-12   UIDE and UIDE2 check for diskettes via Int 13h, avoid DPTE
                 tests if no PCI BIOS, let the BIOS do I-O for disks with
                 bad DPTE data, all re: VirtualBox BUGS!

   16-Oct-11   UIDE /M switch deleted, search-buffer is always 512 bytes.
                 UIDE.SYS back to 7.5K, UIDE-S dropped, UIDE2 improved.

    7-Oct-11   All UIDE drivers updated to avoid BIOS "DPTE" ERRORS:  Bad
                 DPTE data for USB sticks!   Many Thanks to Daniel Nice!

    9-Sep-11   UIDE2 re-added.   UIDE-S and UIDE2 handle 6 CD/DVD drives.

   22-Jul-11   UIDE /E switch added for DOS emulators (VirtualBox, etc.).

   20-May-11   UIDE-S ("short" UIDE) added, for systems with limited HMA.

   25-Apr-11   BAD "code mods" init error corrected for UIDE, UIDEJR, and
                 RDISK (XMGR not affected)!

    5-Dec-10   UIDE/UIDEJR /R15 and /R63 switches added to handle old DOS
                 "games" (Thanks, Guillermo Grana Gomez!).

   28-Nov-10   Minor updates:  UIDEJR audio track-number error corrected,
                 XMGR faster in protected-mode.   Added XMGR and UIDE /Z.

   15-Aug-10   UIDE audio track-number error corrected (Thanks, Nagatoshi
                 Uehara!).

   10-Aug-10   UIDE/UIDEJR use of $ in CD/DVD names is fixed (Many Thanks
                 to Japheth!).

    4-Jul-10   README file update -- XMGR/UIDE can use "Native IDE" mode,
                 same as "Legacy"/"Compatibility", for AHCI mainboards.

   28-Jun-10   XMGR updated for AHCI, see the README sec. 7 for details.

   10-Jun-10   UIDE now ignores "removable HARD disks", size reduced.

   16-Nov-09   UIDE now caches 4 GIGABYTES of data!

    6-Oct-09   UIDE and UIDEJR /H requests HMA use "at the user's risk"!

    2-Sep-09   README file updated -- FreeDOS users who desire full upper
                 memory must omit UMBPCI and load JEMM386/JEMMEX only.

   23-Jun-09   RDISK now a .COM file.    RDISK /: switch, RDISKON program
                 added.   Corrected UIDE CD/DVD handling of VDS errors.

    9-Jun-09   UIDE/UIDEJR /N3 switch added for no XMS memory.   Override
                 of /D: name by UIDE$/UIDEJR$ added for no CD/DVD drives.

   15-May-09   Added RDISK.

    6-May-09   Added UIDEJR.

    1-May-09   Fixed XMGR "Port 92h" logic error.  Added XMGR /PA and /PN
                 switches to control use of "Port 92h".

   25-Apr-09   XMGR/UIDE license and FreeDOS prohibition deleted, drivers
                 and sources are again available to all.


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

   XMGR usually needs only its /B switch, if "booting" with an EMM driver.
   All XMGR switch options are as follows:

      /B     Specifies "boot" mode.   XMGR loads in temporary memory until
                upper-memory is enabled.     Without /B, XMGR loads stand-
                alone in low memory or direct to upper-memory with UMBPCI.
                See the CONFIG.SYS examples in section 5.

      /Mn    Specifies a temporary area for loading XMGR in "boot" mode or
                for UMBPCI upper memory I-O before DOS posts a "workspace"
                buffer.   Values are:

                    /M1 = 64K.    /M3 = 192K.   /M5 = 320K.   /M7 = 448K.
                    /M2 = 128K.   /M4 = 256K.   /M6 = 384K.   /M8 = 512K.

                Without /M, /M5 is assumed and the 320K area will be used.
                NOTE:  DOS systems may NOT load at address 0 and may leave
                temporary data anywhere in memory!     /Mn helps to find a
                "safe" area for XMGR to use.   /M is ignored if XMGR loads
                stand-alone.

      /Nnn   Specifies how many XMS "Handles" can be used by DOS programs.
                The value nn may be 48, 80, or 128.   If /N is omitted, 48
                "Handles" are used.   A big system doing much XMS work may
                need 80 or 128 "Handles".

      /PA    Specifies use or non-use of PS/2 Port 92h logic to handle the
      /PN       system's "A20" line.   /PA indicates "Always" use Port 92h
                logic.   /PN indicates "Never" use it and handle "A20" via
                normal keyboard-port logic.   If /P is omitted, XMGR "asks
                the BIOS" if the system has Port 92h logic.   If not, XMGR
                will use normal "A20" logic.   NOTE:  If "A20" was enabled
                by DOS before XMGR loads, XMGR does not handle it at all!

      /Tn    Specifies the BIOS requests to use in getting extended memory
                as follows:

                   /T0   No "E820h" nor "E801h" requests.
                   /T1   Memory-list requests only (Int 15h, AX=E820h).
                   /T2   A dual-area request only  (Int 15h, AX=E801h).
                   /T3   "E820h" requests first, then an "E801h" request.

                /T can usually be omitted, causing /T3 to be assumed.   In
                addition, XMGR always uses an old 64-MB request to get /T0
                memory, or if the requests denoted by /T1 thru /T3 are not
                successful.   Users may need to test /T1 or /T2 separately
                to see if their BIOS takes them.   A pre-1994 BIOS may not
                ignore /T1 thru /T3 correctly and may require /T0 instead.

      /W     Specifies use of the DOS "workspace" buffer, for upper-memory
                I-O if loading with UMBPCI.    If /W is omitted, or if the
                DOS system does not have proper workspace logic, XMGR sets
                its own buffer in low memory.   With PC-DOS or EDR-DOS, /W
                must be omitted!   Without UMBPCI, /W is ignored.

      /Z     See /Z for UIDE, below.

             --------------------

   RDISK uses only /S size and /: drive-letter switches:

      /Sn    Specifies a desired RAM-disk size in megabytes of XMS memory.
                Values may be any number from 2 to 2047.    /S1024 or more
                creates a 1- to 2-GIGABYTE RAM-disk!   If /S is omitted or
                invalid, a 25-MB RAM-disk is set by default.    Older V2.0
                XMS managers (ROM-DOS etc.) may use only /S2 through /S60.
                For more details, see section 5 below.

      /:L    Specifies the DOS drive letter desired to access RDISK files.
                L may be any available drive letter from A to Z, e.g.  /:N
                assigns drive N: to all RDISK files.   If the drive letter
                is too high or already in use, RDISK will abort, and users
                may need "LASTDRIVE=" in CONFIG.SYS to set up more drives.
                If RDISK is loaded by CONFIG.SYS, or if /: is omitted, the
                next free drive letter will be used.

             --------------------

   UIDE usually needs only a /H switch to use HMA space and a /S switch to
   specify its cache size.   All UIDE switches are as follows:

      /A     Specifies ALTERNATE addressing, for "legacy IDE" controllers.
                The first legacy controller uses 01E8h/0168h addresses and
                a second (if present!) uses 01F0h/0170h addresses.   /A is
                only for "odd" mainboards with REVERSED addressing for the
                two legacy IDE controllers!   Without /A, the first legacy
                controller uses 01F0h/0170H and a second uses 01E8h/0168h,
                as is normal for most PC mainboards.

      /B     Requests a "basic" UltraDMA driver for disks and CDs/DVDs, no
                caching nor diskette handling.   This may help in tests or
                diagnostics.   The /B driver can request 128K of XMS as an
                UltraDMA I-O buffer, and it can load in the HMA.

      /D:    Specifies the "device name", used by the CD/DVD Redirector to
                access CD/DVD drives.   For example:  /D:CDROM1  /D:SANYO1
                etc.   If /D: is not given, or the name following a /D: is
                missing/invalid,  UDVD1  is set by default.   If no CD/DVD
                drives were found,  UIDE$  overrides any /D: name, for use
                with FreeDOS autoloader scripts.

      /E     Makes the driver call the BIOS for any hard disk I-O request.
                /E avoids setup trouble on some DOS emulators (VirtualBox,
                etc.) that do not emulate all PC hardware logic!   /E also
                allows using hard disks on 1994 or older PCs which have no
                PCI/EDD BIOS.   /E still caches disk data, unlike /N1 that
                removes ALL disk support!   If /B is given, /E is ignored.

                ***** NOTE *****

                Using /E on protected-mode systems (JEMM386 etc.) may LOSE
                much speed!   For full details, see section 7 below.    If
                /E is necessary, the DOS system should be run in real-mode
                (UMBPCI, etc.) whenever possible.

      /H     Loads most of the driver in "free HMA" space.   UIDE will use
                only 880 bytes of upper/DOS memory (768 when /B is given).
                /H must not be used with ROM-DOS, which has no "free HMA"!

                ***** NOTE *****

                MS-DOS kernels have ERRORS in posting free HMA space which
                can give CRASHES!   Specifying /H is "At the user's risk"!
                No such crashes are noted with other DOS systems, also HMA
                use by UIDE or by UHDD + UDVD2 is under 4K bytes.    Users
                still need to test a PC system, before /H is given for any
                serious work with these drivers!

      /N1    Requests NO hard-disk handling by the driver.

      /N2    Requests NO CD/DVD handling by the driver.

      /N3    Requests no XMS memory.    /N3 sets UIDE's /B "basic" driver.
                /N3 requires loading in low-memory, or UIDE aborts!    /N3
                can LOSE much speed, as misaligned or other I-O unsuitable
                for UltraDMA requires calling the BIOS for a disk or using
                PIO-mode for CD/DVD drives!

      /N4    See /Z below.

      /Q     Awaits a "data request" before doing UltraDMA disk transfers.
                /Q is for "old" systems and may be used only if the driver
                loads O.K. but seems unable to transfer data.   /Q must be
                OMITTED with SATA-to-IDE adapters from Sabrent and others,
                since they may not emulate "data request" from SATA disks!
                /Q does not affect CD/DVD drives.

      /R15   "Reserves" 15-MB or 63-MB of XMS, for old DOS "game" programs
      /R63      which require XMS memory below 16- or 64-MB.   The drivers
                must be able to reserve this memory, reserve their own XMS
                memory beyond that, and then "free" the 15/63-MB XMS.   If
                not, the drivers display "XMS init error" and abort!   For
                further details, see section 7 below.

      /Snn   Specifies the desired cache size, in megabytes of XMS memory.
                Values for /S can be 5, 15, 25, 40, 50, or any number from
                80 to 4093.   Suggested /S values are --

                    Below 128-MB memory:     Use /S5 /S15 /S25 or /S40

                    With 128-MB memory:      Use /S25 /S40 /S50 or /S80
                    With 256-MB memory:      Use /S80  up to /S127
                    With 512-MB memory:      Use /S160 up to /S255

                    With 1-GB memory:        Use /S320  up to /S511
                    With 2-GB memory:        Use /S640  up to /S1023
                    With 4-GB memory:        Use /S1280 up to /S3072

                Small systems may prefer /S25 or /S50 which set 1600 cache
                blocks and are more efficient.   If /S is omitted/invalid,
                an 80-MB cache is set.   Except for 25 or 50, values below
                80 are cut to 40- 15- or 5-MB.    The drivers display "XMS
                init error" and abort, when not-enough XMS memory is free!
                If so, a smaller cache must be requested.   Older V2.0 XMS
                managers (ROM-DOS, etc.) may use only /S5 to /S50.

      /UX    Disables all CD/DVD UltraDMA, even for drives that can do it.
                CD/DVD data input then uses "PIO mode".   Except for a few
                "odd" drives by Sony, etc. that do not obey ATAPI "rules",
                /UX is rarely needed.   /UX does not affect hard disks.

      /Z     For XMGR/UIDE/UHDD, limits XMS moves to 2K-byte sections (not
                64K), if in protected-mode.   /Z is unneeded with JEMM386,
                MS-DOS EMM386, or real-mode UMBPCI.    If other EMM, VCPI,
                or DPMI drivers are used, systems must be tested to see if
                /Z is needed -- BAD schemes allowing not-enough interrupts
                during an XMS move could still be in use!   UIDE's old /N4
                switch works the same and can still be given.   The "stand
                alone" UHDD ignores /N4 or /Z and calls the XMS manager to
                do its XMS moves.

             --------------------

   UHDD usually needs only a /H switch to load in free HMA and a /S switch
   to set its cache size.   A summary of all UHDD switches is as follows:

      /A     Sets ALTERNATE addressing for "Legacy" IDE controllers, same
                as UIDE /A above.   Rarely necessary.

      /B     Requests a 1328-byte "stand alone" driver (no caching), same
                as UIDE /B above.

      /E     Makes the driver "call the BIOS" for hard disk I-O requests,
                same as UIDE /E above.   With /E, UHDD omits all UltraDMA
                disk logic, saving 512 bytes.

      /H     Loads all but 784 bytes of the driver (576 with /B) into HMA
                space.   See the note for UIDE /H above!

      /Q     Awaits "data request" before beginning UltraDMA I-O with old
                controllers, same as UIDE /Q above.   Rarely necessary.

      /R15   Reserves 15-MB or 63-MB of XMS, for old DOS "game" programs,
      /R63      same as UIDE /R above.   Rarely necessary.

      /Snn   Specifies the desired cache size, same as UIDE /S above.

      /Z     See /Z above.

             --------------------

   UDVD2 normally needs only a /H switch to use HMA space and a /D: switch
   to specify a driver "device name".   A summary of all UDVD2 switches is
   as follows:

      /A     Sets ALTERNATE addressing for "Legacy" IDE controllers, same
                as UIDE /A above.   Rarely necessary.

      /D:    Sets a "device name" used by the CD/DVD Redirector to access
                CD/DVD drives, same as UIDE /D: above.

      /H     Puts all but 144 bytes of the driver in HMA space.   See the
                note for UIDE /H above!

      /Rnn   Reserves 15-MB or 63-MB of XMS, for old DOS "game" programs,
                same as UIDE /R above.   Rarely necessary.

      /UX    Disables CD/DVD UltraDMA, same as UIDE /UX above.     Rarely
                necessary.

             --------------------

   For all switches in each driver, a dash may replace the slash and lower
   case letters may be used if desired.


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

   XMGR, UIDE, UHDD, and UDVD2 all load thru the CONFIG.SYS file.    RDISK
   loads via either the CONFIG.SYS or the AUTOEXEC.BAT file.   Your CONFIG
   or AUTOEXEC should contain command lines similar to these examples:

      DEVICE=C:\DOSDVRS\XMGR.SYS /N128 /B

      DEVICEHIGH=C:\DRIVERS\RDISK.COM /S200

      DEVICEHIGH=C:\SYSTEM\UIDE.SYS /D:TOSHIBA1 /S500 /H

      DEVICEHIGH=C:\USERDVRS\UHDD.SYS /S250 /H

      DEVICEHIGH=C:\MYDVRS\UDVD2.SYS /D:BLURAY1 /H

   Note that "Int 13h" BIOS drivers must be loaded first, so UIDE/UHDD can
   intercept and cache their I-O requests.   Note also that if UDVD2 is to
   share UHDD's XMS buffer and/or call it for CD/DVD data caching, it must
   load after UHDD, so UDVD2 can locate UHDD in memory and "link" with it.
   See the CONFIG.SYS examples below.

   With V3.70+ UMBPCI and XMGR, a "boot" procedure is not needed!   UMBPCI
   loads first to enable upper-memory, then XMGR loads to offer it and XMS
   to DOS, then other drivers may load.    For V6.22/V7.10 MS-DOS, JEMM386
   can also be loaded, to offer extra upper-memory in the "video graphics"
   areas, or if other JEMM386 features are desired.

   NOTE:  FreeDOS and some other DOS variants will NOT "add up" the memory
   found by both UMBPCI and JEMM386, like MS-DOS does!   FreeDOS users who
   desire more upper-memory or other protected-mode items must omit UMBPCI
   and load HIMEMX/JEMM386 per their instructions, or load XMGR/JEMM386 as
   shown in the third example below.

   An example CONFIG.SYS file using V3.70+ UMBPCI and XMGR is as follows:

      SHELL=C:\DOS\COMMAND.COM C:\DOS /E:512 /P
      DEVICE=C:\BIN\UMBPCI.SYS
      DEVICE=C:\BIN\XMGR.SYS /W
      DOS=HIGH,UMB
      DEVICE=C:\BIN\JEMM386.EXE I=B000-B7FF X=C800-EFFF NOEMS   ;Optional
          ..
          ..  Int 13h drivers cached by UIDE load now.
          ..
      DEVICEHIGH=C:\BIN\UIDE.SYS /D:CDROM1 /S250 /H      ;Or UHDD + UDVD2
      DEVICEHIGH=C:\BIN\RDISK.COM /S125                         ;Optional
          ..
          ..  Etc.
          ..

   XMGR can be used "stand alone" on a small XMS-only system.   It must be
   the first DOS system driver to load, and it must load in LOW memory, as
   in the following example:

      SHELL=C:\DOS\COMMAND.COM C:\DOS /E:512 /P
      DEVICE=C:\BIN\XMGR.SYS
      DOS=HIGH
          ..
          ..  Int 13h drivers cached by UHDD load now.
          ..
      DEVICE=C:\BIN\UHDD.SYS /S80                          ;Or UIDE alone
      DEVICE=C:\BIN\UDVD2.SYS
      DEVICE=C:\BIN\RDISK.COM /S20                              ;Optional
          ..
          ..  Etc.
          ..

   With JEMM386 and XMGR,  XMGR loads first in "boot" mode,  then JEMM386,
   then XMGR finally loads into upper-memory.   An example CONFIG.SYS file
   which uses the XMGR "boot" procedure is as follows:

      SHELL=C:\DOS\COMMAND.COM C:\DOS /E:512 /P
      DEVICE=C:\BIN\XMGR.SYS /B                          ;/B for "boot"
      DOS=HIGH,UMB
      DEVICE=C:\DOS\JEMM386.EXE I=B000-B7FF ...
      DEVICEHIGH=C:\BIN\XMGR.SYS                         ;No "boot" here!
          ..
          ..  Int 13h drivers cached by UIDE load now.
          ..
      DEVICEHIGH=C:\BIN\UIDE.SYS /D:MYDVD /S500 /H       ;Or UHDD + UDVD2
      DEVICEHIGH=C:\BIN\RDISK.COM /S500                  ;Optional
          ..
          ..  Etc.
          ..

   After the above drivers are loaded, further CONFIG.SYS drivers (SETVER,
   ANSI.SYS, etc.) can then load in any desired order.

   When a specific RDISK drive letter is required, RDISK can now be loaded
   by AUTOEXEC.BAT, and its /: switch can specify any "free" drive letter,
   e.g.  /:Q  assigns drive Q: for RDISK files.    Whenever RDISK is used,
   AUTOEXEC.BAT should also include commands to copy all RDISK programs or
   data up to the RAM-disk.   This is required each time DOS loads, as XMS
   memory is LOST when a system shuts down!    Such copies usually require
   little time.

   If RDISK and UIDE/UHDD are used, users must balance how much XMS memory
   the drivers use.   RDISK must take no more XMS than its files may need.
   UIDE/UHDD can take most remaining XMS for its caches.   Some XMS memory
   must be saved for other programs needing it!   As an example, on a 4-GB
   system, RDISK might use 500-MB, UIDE/UHDD might use 3-GB, and 500-MB is
   free for other programs.   These values can be adjusted, so RDISK holds
   programs and "fast" data files, while UIDE/UHDD cache "ordinary" files.
   Properly balanced use of XMS will give a VERY high-speed DOS system!

   Please be sure to set each hard disk's geometry correctly in your BIOS.
   Set it to "Auto", "LBA" or "LBA Assisted", but NOT to "None", "Normal",
   "CHS", "ECHS".   "User Cylinders/Heads/Sectors", "Revised ECHS" or "Bit
   Shift" should run but are NOT preferred.   If a BIOS has a setting like
   "UltraDMA" or "UDMA Capable" for a disk, enable it.

   "Laptop" power-saving items like a "drive spin-down timeout" should run
   O.K. but must be TESTED before use!   All these drivers allow 7 seconds
   for a disk or CD/DVD drive to spin-up, after being idle.   More DRASTIC
   power-saving items like a "drive SHUTDOWN timeout" (may require "extra"
   logic to restart the drive!) should be DISABLED, or driver I-O requests
   may time out!

   Also, be sure to use an 80-pin IDE cable with any UltraDMA drive set to
   "mode 3" ATA-44 (44 MB/sec) or higher.   When cabling a single drive to
   an IDE channel, note that you MUST use both "ends" of the cable, NOT an
   "end" and the middle connector!   This prevents ERRORS, since an unused
   cable-end can pick up "noise", like a RADIO antenna!

   Be sure to enable all CD/DVD drive(s) through the BIOS set-up routines!
   A drive that is "disabled" may cause the BIOS to clear all its UltraDMA
   flags and force the drive into "PIO mode" zero, which is terribly SLOW!


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

   XMGR and UIDE/UHDD/UDVD2 will return normal XMS and CD/DVD error codes,
   as needed.   They are listed in the "V3.0 XMS Specification" and in the
   Microsoft "MS-DOS CD-ROM Extensions 2.1" document.   Both are available
   from Microsoft or from other Internet sources.

   UIDE and UHDD work as "BIOS drivers" and return whichever codes are set
   for diskettes and hard-disks handled by the BIOS.    For their SATA and
   IDE hard-disks, UIDE/UHDD can post the following error codes:

       Code 0Fh - DMA error.           CCh - Disk is FAULTED.
            20h - Controller busy.     E0h - Hard I-O error.
            AAh - Disk not ready.      FFh - XMS memory error.

   Many DOS programs display only "Disk Error" messages with NO code, thus
   disk errors may require running a diagnostic to get better information!


7. Technical Notes
   ---------------

   The JEMM386 program is recommended for use with UIDE/UHDD/UDVD2, when a
   DOS system requires extra upper memory "mapped" into the video-graphics
   addresses, DPMI/VCPI logic, and other protected-mode items.   Other EMM
   drivers are essentially abandoned, some with never-fixed BUGS, and they
   are no-longer recommended!

   The drivers' /R15 or /R63 switch is for a real-mode system using UMBPCI
   and XMGR, to play old DOS games.   Game players prefer real-mode, as it
   gives higher speed.   If UIDE or UDVD2 are used alone, they can use the
   /R15 or /R63 switches with no problem.   If UDVD2 is loaded after UHDD,
   only UHDD can "reserve" XMS memory, and UDVD2 must not use a /R switch.
   Note that NO other programs or drivers that require XMS memory can load
   before the "game", so the reserved XMS cannot be re-allocated to anyone
   else!   Also note that if the "game" cannot be loaded and then "frozen"
   (not started immediately!), loading other programs and drivers AFTER it
   will be impossible!   Both of these issues make using JEMM386/EMM386 or
   other "EMM" drivers difficult, so an old "game" program which must have
   XMS memory below 16- or 64-MB will usually need to be run in real-mode.

   UIDE/UHDD are designed to run "Legacy" or "Native PCI" IDE controllers.
   RAID-only chipsets (Via VT6420 etc.), "port multiplier" chips, and ADMA
   chipsets are not currently handled.   UIDE/UHDD shall NEVER include any
   miserable AHCI logic and shall require "Legacy"/"Compatibility"/"Native
   IDE" mode, when using an AHCI controller.   If an AHCI BIOS has no such
   options, UIDE/UHDD with a /E switch should be able to call the BIOS and
   use its logic for handling AHCI disks.    If not, a Sabrent SATA-to-IDE
   adapter card or equivalent will let UIDE handle SATA hard-disks via the
   parallel-port IDE controller (80-pin cable), at full UltraDMA speeds.

   An AHCI BIOS is not meant to handle CD/DVD file input, only to "boot" a
   system from a CD/DVD.   AHCI controllers may be switched to actual AHCI
   mode after "boot", which UIDE/UDVD2 do not support!   On a system whose
   AHCI chipsets offer "Legacy"/"Compatibility"/"Native IDE" modes, CD/DVD
   drives should be run from AHCI ports set to such modes.   On mainboards
   with no such settings, UIDE/UDVD2 will handle CD/DVD drives only on the
   parallel IDE port (80-pin cable) or using IDE-capable "add on" cards by
   Promise, etc. that UIDE/UDVD2 can "detect" with standard PCI-bus logic.

   Unless necessary for AHCI or a pre-1995 system, running a DOS hard-disk
   with BIOS logic (UIDE or UHDD /E switch) should be done ONLY as a "Last
   Resort"!   DOS "Virtual DMA" coding is often OMITTED in a "cheap" BIOS.
   If JEMM386/EMM386/etc. enable protected-mode, such a BIOS cannot do any
   UltraDMA I-O and thus LOSES much speed!   If necessary, get SATA-to-IDE
   adapters for SATA disks (as above) or get "Int 13h" drivers for SCSI or
   other disk models.   UIDE/UHDD will then run the disks at full speed.

   XMGR loads in UMBPCI upper-memory BEFORE that memory is declared to the
   DOS system!   Memory displays using UMBPCI may not list XMGR, since its
   memory is not part of the DOS memory lists.   Such memory displays will
   begin with a block having a 00A7h offset, or greater if using 80 or 128
   XMS "Handles".   The upper-memory skipped by this offset contains XMGR.

   The UMBPCI upper-memory manager uses system Shadow-RAM that will NOT do
   DMA!   Newer BIOS programs may use UltraDMA to load programs into upper
   memory.   If this is UMBPCI Shadow-RAM, a "HANG" will occur!   To avoid
   this, and handle new BIOS programs, users should follow these two RULES
   for running UMBPCI together with XMGR and UIDE/UHDD:

     A) The loading "order" for V3.70+ UMBPCI and XMGR, shown in section 5
        above, MUST be used!    This lets the XMGR "I-O Catcher" intercept
        and process upper memory disk I-O, until UIDE/UHDD loads and takes
        over disk UltraDMA.   Old UMBPCI versions, or other UMBPCI loading
        schemes, are NOT recommended!

     B) When CHS I-O is done (MS-DOS V6.22 or older), every disk MUST have
        valid CHS parameters!   Otherwise, UIDE/UHDD and the "I-O Catcher"
        let the BIOS deal with CHS I-O.   If BIOS UltraDMA is not disabled
        a similar Shadow-RAM "HANG" will occur!

   Some BIOS programs do not "configure" a mainboard controller if no user
   drives are on it!   Unconfigured controllers make these drivers display
   "BAD IDE controller", then they go on scanning for others to use.    If
   this message is displayed, users should verify that every SATA/UltraDMA
   drive was made "active" using the BIOS set-up logic.    If so, "BAD IDE
   controller" says a chip is not set to both "Bus Master" and "I-O Space"
   modes, and the BIOS should be UPDATED!

