HAVING AN EXTERNAL USB CD-Writer or Harddisk works wonders as long as your
operating system is in good shape. But if someday the system stops booting,
you are lost. Booting from good old MS-DOS or Windows Bootdisks - even
fitted with the needed third party NTFSDOS or EXTFS drivers - gives you
access to your fixed hard disk only, but none of the USB peripherals can
be accessed from the DOS command line.
 

Before you start scratching your head, let me repeat that this is not
related to  your favourite Linux distro's or Windows XP/W2K/98/ME's USB
support, this has to  do with people like me, booting some flavour of
DOS to copy files around or using DOS-based partition back-up software. 

Imagine that you want to use Paragon Drive Backup, Powerquest's Drive
Image, or Norton Ghost, to backup your hard disk partitions to that nice
120gb external USB 2.0 hard disk you just bought. You can't do it. Or if
your wife/husband has managed to mess up her/his system so badly that it
can't boot anymore, yet she/he wants you to have a copy of those nice
digital pictures stored on a compactflash card plugged into the compactflash
reader?. No way, Jose. Not from DOS, used to be the phrase. 

Well, now you CAN. 

The minor miracle here is using a driver file called USBASPI.SYS
"Panasonic v2.06 ASPI Manager for USB mass storage" Given the right parameter
incantations, this 16-bit Panasonic-developed DOS driver will let your system
boot good-old DOS -any flavour, maybe even Caldera's OpenDOS and recognize
all USB devices connected to the respective controllers. So this USB device
identification is also useful for debugging/troubleshooting purposes.

However, it should be noted that this driver will only map mass storage
devices like external hard disks, CD-ROMS, CD/RW, DVD-ROM, Zip, Jaz,
LS-120, and flash memory to ASPI devices. Then you need an elusive "ASPI
mass storagedriver" to map HDs and flash disks it to a drive letter in
DOS. This one goes by the name DI1000DD.SYS, commonly referred to as the
"Motto Hairu USB Driver". Don't askwhy, it's called that, I don't know. 

Before you continue reading and decide to go out and do "bad things" let
me mention that legalese on the Panasonic site most probably prevents you
from downloading and using this driver on non-Panasonic devices, yet
according to reports that are floating around on the Internet, people have
been able to use these  "universal drivers" on a wide range of systems with
different USB connectivity, UHCI, OHCI, and USB 2.0's EHCI with the NEC
chipset. 


The Panasonic DOS drivers seem to work on most USB chipset implementations,
including Intel and NEC, as well as NVidia, VIA, and SIS. It seems Panasonic
engineers didn't want to have towrite a driver every time for every different
chipset, so they wrote this "universal" driver to work with all possible USB
controllers. 

Now the hairy details for DOS old-timers like myself who actually enjoy
editing config.sys:

The driver switches you can use are:
device=(path)\USBASPI.SYS [/e] [/o] [/u] [/w] [/v] [/l[=n]] [/f] /r]
                          [/slow] [/nocbc] [/norst] [/noprt] 

The driver scans all three USB controller specs by default,
but you can limit which controllers are enabled using these
switches: 

/e EHCI spec (USB 2.0) 
/o OHCI spec (newer USB 1.x) 
/u UHCI spec (older USB 1.x) 

And so far I learned what these switches mean: 

/w Wait, displays text message for attaching or swapping USB devices 
/v Verbose, shows status messages - recommended
/l[=n] LUN, specifies highest LUN # to be attached to device ID (default=0) 

Example config.sys and autoexec.bat files on a DOS Bootdisk with USB
support for a USB CD-(ROM/R/RW) or Harddisk looks like this: 

[config.sys]
DOS=HIGH,UMB
lastdrive=Z
device=HIMEM.SYS
REM The following line loads the universal USB- controller driver
devicehigh=USBASPI.SYS /v /w /e
REM the following is an ASPI mass storage driver for USB-connected
REM HDs and Compactflash memory cards
devicehigh=DI1000DD.SYS
REM The following one loads CD-ROM driver
devicehigh=USBCD.SYS /d:USBCD001 

[autoexec.bat]
@echo off
REM the following line adds a drive letter to the USB CD-(ROM/R/RW) mounted
LH MSCDEX /d:USBCD001 

The Panasonic driver also seems to recognise some TI Cardbus controllers,
making it possible to use USB peripherals attached to USB (even 2.0!) Cardbus
cards. Your mileage might vary. Knowledge of the Japanese language might be
required to read and understand the Panasonic licence agreement or the
cease-and-desist letters. Explore at your own risk. 


http://panasonic.co.jp/pcc/products/drive/cdrrw/kxlrw40an/download.html
ftp://ftp.dars.com.ru/support/dos_usb/mhairudos.zip



Here's the latest update on switch settings for USBASPI.SYS - a USB to
ASPI driver that enables USB storage devices (hard disks, flash memory/disks,
DVD/CD-ROM & writers) to be accessed in DOS - much the same way as ASPI
drivers for SCSI devices. It is provided for troubleshooting and reference
purposes only.

USBASPI.SYS   Panasonic(TM) USB to ASPI driver v2.06
Description:
    File size : 37,903 bytes 
Last modified : 27 Nov 2002

Supports UHCI/OHCI/EHCI and is compatible with onboard USB as well as PCI
and some Cardbus add-on implementations from major chipset manufacturers
like INTEL, VIA, NVIDIA, SiS and NEC for integrated, onboard, PCI bus or
CardBus USB2.0 ports.

When used in conjunction with an ASPI Mass Storage Driver, it allows USB
storage  devices - particularly USB 2.0 hard disks or flash disks - to be
accessible in DOS. This is particularly useful in drive cloning, partition
resizing and image backup utlities that need to run in DOS mode (e.g.
emergency disks for GHOST 2003, Partition Magic, etc...)

Furthermore, with a USB CD-ROM Driver, it allows USB optical drives (DVD,
CD-ROM) to be used in DOS once MSCDEX extensions are loaded. This makes it
possible to install burned images or Operating Systems onto newly formatted
systems or replacement hard drives.

Advantages over similiar drivers:
1. Support for USB 2.0 as well as USB 1.1 (Other USBASPI.sys versions are
   actually for USB 1.1 only)
2. Compatible with many USB chipset implementations, including Intel, NEC,
   VIA, NVidia and SIS 
3. Automatically obtains configuration parameters from Motherboard PnP/
   PCI BIOS to minimize difficulties with I/O, Mem and IRQ mapping

NOTE: USB support in DOS is considered experimental! Most HW manufacturers
DON'T provide support for their USB DOS drivers.

Recommended Usage:
To detect your USB Mass storage device (.e.g. a USB 2.0 external hard drive)
put this line in your boot diskette CONFIG.SYS file:
  device=USBASPI.SYS /w /v

USBASPI.SYS Switches:
Here are the known valid switches identified so far with the Panasonic(TM)
v2.06  USBASPI.SYS driver in CONFIG.SYS:

 device=[{path}]USBASPI.SYS [/e] [/o] [/u] [/v] [/w] [/r] [/l[#]] [/f] [/slow]
 [/nocbc] [/norst] [/noprt]

You can specify more than one controller type (e.g. /e /u). This switch
can also  be used to force slower speed operation on high-speed USB
controllers & devices. The driver will scan for all types of USB controllers,
so use these switches to specify which port types to enable. This allows for
faster USB scanning. By specifying /u or /o and omitting /e, it forces Full-
Speed mode on High-Speed devices. One can't make a Low- or Full-Speed device
run at High-Speed.

 /e     EHCI, for enabling only USB 2.0 controller
 /o     OHCI, for enabling only add-on/onboard USB 1.1 controller 
 /u     UHCI, for enabling integrated USB 1.1 controller 

In verbose mode. USBASPI displays details on controller type and USB devices
it detects. It displays the vendor & product ID codes, the controller address
range (memory map or I/O port map) of controllers, and the connection speed
code for each device.

 /v     Verbose, shows USB details - excellent troubleshooting tool

These switches modify driver actions 
 /w     Wait, displays prompt message to allow swapping/attaching of target
        USB device
 /l#    Luns, to specify highest number of LUN assigned, default /L0
 /slow  to enter SLOW down mode, gives longer delays when scanning USB devices
 /nocbc NO Card Bus Controller?, to disable detection of USB on CardBus slots

        This switch is typically used on portable systems with an external
        USB floppy drive connected to the single USB port for boot-up. Used
        in conjunction with RAMFD.SYS so after the boot floppy is copied to
        a RAM drive, (and after the /W pause... the USB floppy can be removed,
        and the target mass storage device can be attached and detected

 /r     Resident, allows driver to stay resident in memory when USB floppy
        drive is detected.

There are a number of switches whose specific function is still unknown.
Please post your discoveries in the USBMAN end-user forum, or the
Computing.Net DOS forum:

  /norst
  /noprt
  /f    

===========
Download Source:
The USBASPI.SYS driver is supplied for portable USB 2.0 drives from Panasonic
and available in the Japanese market. Follow any of the links below to the
manufacturer's self-extracting drivers:

http://panasonic.co.jp/pcc/products/drive/cdrrw/kxlrw40an/driver/kxlrw40an.exe
 
These are Japanese files for their CD-R/RW drive. USBASPI.SYS is extracted
from the F2H subdirectory, and works OK in English version Windows.

===========
Examples and Other Files:
Here are some useful device drivers that complement USBASPI.SYS, and
configuration examples:

From http://www.driver.novac.co.jp/driver/mhairudos.zip
is an ASPI Mass Storage to DOS driver:
   DI1000DD.SYS  v2.00 from Novac, ASPI Mass Storage Device Driver
                 {reportedly drive needs to be ATA66 or faster)


If you want to enable only the high-speed USB controller and external
hard disk drives, try:

 device=USBASPI.SYS /e
 device=DI1000DD.SYS


From the same Panasonic driver file, in the F2H subdirectory are other
important drivers:

 USBCD.SYS     v1.00 from Panasonic, USB CD-ROM device driver
 RAMFD.SYS     v1.01 from Panasonic, copies boot floppy disk contents
               into a RAM disk, write protects and remaps drive letters
               to RAM disk.


If you have only a single USB port and no internal floppy, use this
CONFIG.SYS  combination:

 device=RAMFD.SYS
 device=USBASPI.SYS /w /v /r


With a CD-ROM drive, install the ASPI CD-ROM device driver after loading
USBASPI.SYS in CONFIG.SYS like this:

 device=USBASPI.SYS
 device=USBCD.SYS /d:USBCD001

and in AUTOEXEC.BAT:

 MSCDEX /d:USBCD001


If you want to connect a USB optical drive and an external hard disk
simultaneously, put these in the CONFIG.SYS file:

 device=USBASPI.SYS /e
 device=USBCD.SYS /d:USBCD001
 device=DI1000DD.SYS

and in AUTOEXEC.BAT:

 MSCDEX /d:USBCD001

For troubleshooting USB connections, install all your devices and boot
from your diskette with this in CONFIG.SYS:

 device=USBASPI.SYS /v

Troubleshooting Info:

With the /v option, USBASPI.SYS provides a lot of useful info regarding
the USB devices connected to a PC.

Use this info to determine if a problem is in the hardware level, or a
Windows driver/configuration issue.

Example result:

Controller  : 00-09-0 VID=1033h PID=0035h (3782h-0035h) OHCI
            :         MEM=DF000000h-DF000FFFh(4KBytes)
Controller  : 00-09-1 VID=1033h PID=0035h (3782h-0035h) OHCI
            :         MEM=DE800000h-DE800FFFh(4KBytes)
Controller  : 00-09-2 VID=1033h PID=00E0h (3782h-01E0h) EHCI
            :         MEM=DE000000h-DE0000FFh(256Bytes)
USB Device  : HOST [00-09-2 VID=1033h PID=00E0h (3782h-01E0h) EHCI]
            :   |-- VID=05ABh PID=0060h HS
            :   |-- VID=05E3h PID=0702h HS
            :   ^-- 2 device(s)
USB Device  : HOST [00-09-0 VID=1033h PID=0035h (3782h-0035h) OHCI]
            :   ^-- nothing
USB Device  : HOST [00-09-1 VID=1033h PID=0035h (3782h-0035h) OHCI]
            :   |-- VID=066Fh PID=4200h FS
            :   ^-- nothing
ASPI Device : ID:0 LUN:0 = IC25N010 ATDA04-0         0811
            : ID:1 LUN:0 = E-IDE    CD-ROM 48X/AKU   T3A

Interpretation:
1. There are 2 OHCI and 1 EHCI controllers detected. All are running
   in MEMory map mode (not I/O mapped) with the respective address spaces
   displayed.
2. Two devices are mapped to the EHCI controller. The HS indicates they
   are running at High Speed.
3. One device is mapped to the 2nd OHCI controller. The FS indicates runs
   at Full Speed only. ^-- nothing indicates no USB storage devices were
   found.
4. Two of the devices connected are detected as storage devices. Each is
   mapped to an ASPI ID, and it's identifier is displayed.
5. This config has an IBM 10GB notebook HD & a 48x EIDE CD-ROM drive.
Notes:
1. The actual USB devices can be identified by referring to the 2-byte
   Vendor IDs and Product IDs.
2. Most of the configuration is automatically obtained from BIOS PnP
   info. Unfortunately, USBASPI.SYS does not identify IRQ's used.

There are other USB 2.0 DOS drivers released on the web, but were found
to have a number of limitations in terms of compatibility and configuration:

Cypress(TM) DUSE (ver 4.4) supports USB 2.0 and offers many options but
seems to  have issues for I/O port address or Memory address settings -
particularly a limit on the address space range.

Iomega(TM) USB & Firewire drivers also support USB2.0 (via ASPIEHCI.SYS)
and is also used in Norton/Symantec GHOST but has limited compatibility.



Reply: Hi madmaxUSB, thankyou for 
the long post and very informative.  I have been using a clients copy of
IOMEGA NORTON GHOST 2003 as it is a bootable CD and was surprised when
PCDOS 7.1 revision0 popped up complete with FAT32 support, IBM said it can
not be done! The ASPI drivers will not recognise Compact Flash media
read/writers, so yes still sticking with the Panasonic ASPI.
I will trim done your post and add it to my page if you have no objections.
Regards X86


Reply: Please do. 
Am still experimenting on these switches, and have not had revealing results
thus far...

/norst - could this mean a RESET will not be sent on the USB device? what
         is the effect? have tried on a USB printer but no difference
/noprt - definitely NOT for printer functionality. Have found that on some
         systems with USB on Intel chipset (1.1 or 2.0), if UHCI is normally
         I/O mapped, using this switch causes USBASPI.SYS to "hang" while
         detecting host controllers. Could it be for I/O port mode?
/f     - does NOT seem to be speed related (as in full-speed or fast device
         detection). Suspect it could be "floppy" or "flash memory" device...


Okay, it seems some of the links are getting broken so here's a quick source
of where you can QUICKLY get the drivers as of today...

DI1000DD.SYS from
http://www.stefan2000.com/darkehorse/PC/DOS/Drivers/USB 
Download 'Motto Hairu' USB Driver and UnZIP DI1000DD.SYS only - (disregard
the included USBASPI.SYS as it is only for USB1.1)

UDBASPI.SYS
USBCD.SYS
RAMFD.SYS
http://panasonic.co.jp/pcc/products/drive/cdrrw/kxlrw40an/download.html
Follow the license page to get KXLRW40AN.EXE, run self-extract and look
at F2H subdirectory.


Reply: VTW - In case you have problems with the Panasonic USBASPI.SYS and
DI1000DD.SYS, try a similiar (albeit less options) drivers from DATOptic
at  http://www.datoptic.com/fw25fr.html
Download the DOS driver and create a bootable diskette that contains both
USB and firewire suport. Relevant files are

USBASPI.SYS v 2.01 by Medialogic.Corp.
NJ32DISK.SYS v1.06 by Worknbit Corp
Excellent boot disk but USBASPI has less switch options...


Reply: Panasonic USBASPI.SYS v2.06
makes headlines as USB driver for DOS at
http://www.theinquirer.net/?article=10215
