Download as pdf or txt
Download as pdf or txt
You are on page 1of 9

How to add USB flash drive capability to MS-DOS and Windows 98 https://www.classic-computers.org.nz/blog/2018-02-05-USB-in-M...

Terry Stewart's (Tezza's) Projects and Articles (Blog)


Blog index and site links

Like 3 Tweet
How to add USB flash drive capability to MS-DOS
and Windows 98
Introduction

Apart from my Internet-capable Windows 7 machine, there is one other machine I keep set up
and "work ready". This is a dual-boot Celeron Windows 98/Windows XP machine which I use for
floppy file recovery, disk imaging and writing 5.25 inch floppy disks in various formats for use in
a number of vintage machines. It's actually got three operating systems on call:

Windows XP
Windows 98SE
MS-DOS 7.1

All three operating systems are needed as I use imaging tools which specifically require them.

Figure 1. My disk-imaging Celeron

1 of 9 3/28/2019, 8:34 AM
How to add USB flash drive capability to MS-DOS and Windows 98 https://www.classic-computers.org.nz/blog/2018-02-05-USB-in-M...

My disk imaging computer is not networked in any way. Networking is complicated between MS-
DOS/Win 98SE and Windows 7. Also, the only way to ensure reasonable speed with my Windows
XP SP3 install on this 500Mhz Celeron computer is to have all network services disabled. Besides,
I don't want my XP partition to be anywhere near the Internet due to security concerns.

This stand-alone configuration presented a problem, namely how to transfer files between it and
my main, internet-capable computer. As both computers are right next to each other on my desk,
the simplest way to share files is to use a removable USB flash drive. This is not an issue in
Window XP as the software detects the USB ports. However, it was an issue in Windows 98 and
MS-DOS as these did not come with native USB drivers.

This article details how I got my Windows 98SE and MS-DOS environments "USB-flash drive
capable" and it provides the resources I used. Hopefully the page will be useful to those
wondering how to do this. Standard disclaimers apply though. What I'm about to cover worked
for my system. Given hardware differences these techniques and drivers might not work for
you...worse still they might lock up your machine. Use of these drivers and methods is entirely at
the reader's own risk. It goes without saying that the required USB hardware needs to be present
on the computer in question.

The Windows 98SE graphical user interface and the MS-DOS command prompt

Windows 98SE has two environments which can (optionally) be selected when the system is
booted. One is the graphical user interface (GUI) that most people associate with a Windows
environment. The other is a command line interface (CLI) which drops the user into MS-DOS
version 7.1. Programs which require a straight MS-DOS environment can run just fine in this,
whereas they might not run smoothly with the GUI, hence the desirability of both environments
on the same machine.

Selecting the environments on boot can be done in several ways, either by pressing various
function keys or adding/changing switches in the MSDOS.SYS file hidden in the root directory of
the Windows 98SE partition (Google MSDOS.SYS and Windows 98 if you want more details).
Note that running the MS-DOS CLI in a window after loading the GUI is NOT the same as booting
to the MS-DOS CLI. Many MS-DOS-only programs requiring direct hardware access will not run in
a Windows 98 MS-DOS CLI window. They need pure MS-DOS.

The CLI and the GUI can be loaded sequentially. If the system has booted to straight MS-DOS
7.1 (i.e. the CLI), the GUI can normally be loaded by typing "Win" at the command prompt.

If drivers and programs are required for the MS-DOS environment, then these can be loaded by
editing (or creating) CONFIG.SYS and AUTOEXEC.BAT in the root directory.

The problem with MS-DOS USB drivers in Windows 98SE

Separate USB drivers are needed for the GUI and the CLI environments. However, USB drivers
required for the MS-DOS 7.1 CLI environment are not compatible with the GUI environment. This
presents a problem because Windows 98SE when booting processes everything in CONFIG.SYS
and AUTOEXEC.BAT regardless of whether the GUI or the CLI is being loaded. Hence the user, if
booting straight to the GUI, needs to prevent those MS-DOS USB drivers being automatically
loaded. Later in this article I'll show how that can be done.

The USB drivers

I'm not going to elaborate on the history of these drivers or how they work. That information can
be found on the Internet or in the linked zip files. I'll just present them here and show how I
used them.

(i) For the Windows 98SE GUI

I managed to find a driver on the Internet which can be obtained from this website. It's an
installation executable designed to be run from the Windows 98SE GUI. On my machine, this
installs without an issue and recognises many flash drive devices. If you are never going to use
USB with native MS-DOS programs run from MS-DOS 7.1 then this is all you need.

2 of 9 3/28/2019, 8:34 AM
How to add USB flash drive capability to MS-DOS and Windows 98 https://www.classic-computers.org.nz/blog/2018-02-05-USB-in-M...

Figure 2. Windows 98SE with USB support (Note Drive E:)

(ii) For MS-DOS 7.1 (also adding CD-ROM support)

Setting up USB for MS-DOS 7.1 is a little more involved . Three drivers and one executable are
needed.

USBASPI v2.20 (As far as your computer is concerned this turns your USB device into a
SCSI device in ASPI mode)
DI1000DD.SYS (Novac ASPI Mass Storage Device Driver (aka the Motto Hairu USB Mass
storage Driver))
OAKCDROM.SYS (a generic CD-ROM driver)
MSCDEX.EXE (Microsoft's program to allow CD-ROM access and control)

Here is some more information on the first two drivers if you want to know more.

Download the drivers to a sensible place in the Win 98SE partition. They can go anywhere but I
created a folder called "DOSUSB" under the \WINDOWS\SYSTEM32\DRIVERS directory and put
them there. MSCDEX can be found in the \WINDOWS\COMMAND folder of a standard Windows
98SE install.

Configuring the startup files

Here's how I solved the problem of driver incompatibility. Essentially I instructed the machine to
commence booting towards a command prompt (CLI) environment, then used a menu system in
CONFIG.SYS to choose between calling up the GUI (without loading the USB MS-DOS drivers) or
continuing on to the CLI (loading the MS-DOS USB drivers). The only downside is that if you
decide you want the GUI after working in MS-DOS 7.1, you can't just type "Win" to load the
former. You'll need to reboot and select it from the menu.

Here's the code needed in the various system files:

3 of 9 3/28/2019, 8:34 AM
How to add USB flash drive capability to MS-DOS and Windows 98 https://www.classic-computers.org.nz/blog/2018-02-05-USB-in-M...

(i) MSDOS.SYS

MSDOS.SYS is a read-only hidden, system file in the root directory of the Windows 98SE
partition. Remove the read-only and hidden properties then edit it so it contains the following line
in the "Options" section:

BootGUI=0

This prevents the computer trying to load the GUI without further instruction. Once you've edited
the file, it may be wise to make it read-only and hidden again.

(ii) CONFIG.SYS

CONFIG.SYS may exist already in the root directory of your machine, or you may need to create
it. Here's what mine looks like...

;Menus are first set up


[menu]
menuitem=Windows
menuitem=MS-DOS
menucolor=15,1
menudefault=Windows,30

[Windows]
;On Windows selection no DOS drivers loaded. Section is blank
;Autoexec.bat is then processed

[MS-DOS]
;on MS-DOS selection the following drivers are loaded
DOS=HIGH,UMB
lastdrive=Z
device=c:\windows\HIMEM.SYS
;The following line loads Panasonic's universal USB- controller driver
devicehigh=c:\windows\system32\drivers\dosusb\usbaspi.sys /v /w
;Then the CD-ROM driver is loaded
devicehigh = c:\windows\system32\drivers\dosusb\oakcdrom.sys /d:mscd001
;Finally the aspi mass storage driver for usb- connected HDs and compactflash memory cards
devicehigh=c:\windows\system32\drivers\dosusb\di1000dd.sys
;Autoexec.bat is then processed

(iii) AUTOEXEC.BAT

As with CONFIG.SYS, this file may exist already in the root directory of your machine, or you
may need to create it. Here's mine ...

@echo off

Rem Go to the section selected after CONFIG.SYS is processed


goto %config%

:Windows
Rem Load the Windows 98 GUI
win
goto end

:MS-DOS
Rem Map the CD-ROM to a drive
echo off
c:\windows\command\mscdex.exe /d:mscd001
echo.
Rem Set pathways
path=c:\dosprogs\utils;c:\dos
Rem Go to directory with MS-DOS programs

4 of 9 3/28/2019, 8:34 AM
How to add USB flash drive capability to MS-DOS and Windows 98 https://www.classic-computers.org.nz/blog/2018-02-05-USB-in-M...

cd dosprogs
goto end

:end

At the end of the script I've set pathways to useful folders and changed the directory to where
my MS-DOS programs are (i.e. dosprogs). You'll need to delete these lines or customise them for
your own system.

Note these are MY CONFIG.SYS and AUTOEXEC.BAT files. If these two files already exist on your
machine, then they are likely to contain content that needs to be included along with the above.
Don't simply replace your content with mine without considering this. Keep the original versions
and experiment with what you need to do.

Figures 3 and 4 shows segments of the scripts above in action.

Figure 3. Screen showing the menu options as determined by CONFIG.SYS

5 of 9 3/28/2019, 8:34 AM
How to add USB flash drive capability to MS-DOS and Windows 98 https://www.classic-computers.org.nz/blog/2018-02-05-USB-in-M...

Figure 4. A boot into MS-DOS 7.1 showing some of the driver install messages. Note USB drive is
drive D, CD-ROM is drive E.

How about straight MS-DOS 6.2?

If you want to use the drivers on a straight MS-DOS 6.2 install, it's lot a simpler. Download the
drivers into a suitable folder (say\DOS\USB). Ensure the following lines are in CONFIG.SYS...

DOS=HIGH,UMB
lastdrive=Z
device=c:\dos\HIMEM.SYS
devicehigh=c:\dos\usb\usbaspi.sys /v /w
devicehigh = c:\dos\usb\oakcdrom.sys /d:mscd001
devicehigh=c:\dos\usb\di1000dd.sys

...and AUTOEXEC.BAT contains this...

c:\dos\mscdex.exe /D:mscd001

You could also use a similar CONFIG.SYS and AUTOEXEC.BAT configuration to boot from a floppy.
Just have all the necessary files (including HIMEM.SYS) present on the disk and remove the
pathways which point to the files.

Other considerations

(i) The size and FAT type of the USB flash drive partition

The type of partitions recognised will depend on the OS being used. If using MS-DOS 7.1 or the
Windows GUI then FAT32 is supported. However, if using MS-DOS 6.x then the partition on the
USB drive needs to be less that 2GB and formatted in FAT16. Otherwise it won't be recognised.

6 of 9 3/28/2019, 8:34 AM
How to add USB flash drive capability to MS-DOS and Windows 98 https://www.classic-computers.org.nz/blog/2018-02-05-USB-in-M...

(ii) The order the drivers are loaded and possible "speed wobbles"

The driver DI1000DD.SYS always needs to be loaded AFTER USBASPI.SYS. On many web pages
where examples are given of the CONFIG.SYS files, the line loading DI1000DD.SYS comes
immediately after USBASPI.SYS. I initially configured my own CONFIG.SYS this way. It worked
fine when I booted from an MS-DOS 6.2 floppy but not when I booted directly to the MS-DOS 7.1
CLI on my own Windows 98 machine? The system seemed to recognise the USB stick and
allocate it a code number, but DI1000DD.SYS couldn't find it? What was going on??

The weird thing was, if I stepped through loading the drivers one by one on the way to the CLI,
as you can do in diagnostic mode when booting, it worked? What the heck??

I figured it had something to do with speed, as that was the only difference I could see between
loading step-by-step in a diagnostic mode boot (or booting off a floppy), and a standard boot. My
hypothesis is that on a "fast" machine (fast for MS-DOS that is...like a 500 MHz Celeron)
somehow DI1000DD.SYS is loaded and executed so quickly, that if this occurs directly after
USBASPI is loaded it somehow fails to capture the latter's output?

Anyway, after much experimentation I found if I instructed the CDROM driver to load BETWEEN
USBASPI.SYS and DI1000DD.SYS, the issue disappeared. Loading that driver between the two
seemed to allow USBASPI.SYS to get it's output ready before DI1000DD.SYS demanded it!

One thing to note is that if it is a speed issue then a very fast machine (say a P4) still might spit
the dummy, even with the CDROM driver "delay" as introduced.

Concluding remarks

So there it is. I hope this information is useful. I've tried to keep the instructions simple but,
depending on how familiar you are with MS-DOS and Windows 98, some background reading
may be required. Like most things in computer-land there is more than one way to configure a
system to get a similar outcome. PIF files can be used for example, but I consider them less
flexible than the configuration I've described above. For those wanting to explore further, a
detailed discussion of Windows 95/98 startup processes and how real-mode MS-DOS is entered
can be found here.

Tez
Original 5th February, 2018
Updated 10th February, 2018 (added link to discussion on Windows 95/98 startup processes)

Like 3 Tweet

7 of 9 3/28/2019, 8:34 AM
How to add USB flash drive capability to MS-DOS and Windows 98 https://www.classic-computers.org.nz/blog/2018-02-05-USB-in-M...

3 Comments Classic Computers (NZ) 1 Login

Recommend Tweet Share Sort by Newest

Join the discussion…

LOG IN WITH OR SIGN UP WITH DISQUS ?

Christopher Baar • a year ago


I see that you have 3 floppy drives in this machine. I’m also interested in building a
machine I can write disks out on. Do you have all 3 drives connected, and if so, how?
• Reply • Share ›

tezzaNZ Mod Christopher Baar • a year ago


I wondered if someone might ask me that. Actually although though there are
three drives there, only two are connected. The 360k (black) one and the 1.44mb
drive. The motherboard only copes with two floppy drives. The other one (a white
1.2MB drive) is really just a placeholder now. I use to physically connect it up
when needed but no longer have to as I have another, similar, machine (directly
under that one) that has a 1.2MB drive connected up. I use this when I need to
image or recover files from that capacity drive.
• Reply • Share ›

Christopher Baar tezzaNZ • a year ago


I figured that might be the case. I’ve heard of floppy controllers that can
drive up to 4 drives for PC, but I can’t seem to locate any. Thanks for the
reply.
• Reply • Share ›

CLASSIC COMPUTERS (NZ)

The original Apple Macintosh (Macintosh Commodore VIC-20 Datasette read/write


128) fix
• •
Avatar — The Poly 1 was definitely Avatar — Thanks, I'll check those out.
only an 8 bit micro, the Motorola MC6809. I
still have a tube of them left over from the

Testing computers in a computer Apple Macintosh Plus checkerboard


collection. Here's what usually screen repair
• •

8 of 9 3/28/2019, 8:34 AM
How to add USB flash drive capability to MS-DOS and Windows 98 https://www.classic-computers.org.nz/blog/2018-02-05-USB-in-M...

Go to the top

Blog index and site links

9 of 9 3/28/2019, 8:34 AM

You might also like