Hi USB users :-)

This is a reply to FDOS basic how-to questions, trying to
give an introduction to Bret's drivers and a summary of
the documents or at least ideas about which bits to read.

>> As somebody already replied, you could make a bootable USB stick
>> with DOS. 
> Yes, but how?  I don't know how since the flash drive isn't accessible
> on my FDOS PC.

You create the bootable stick using another PC / OS. People
seem to recommend RUFUS for Windows for this which probably
is much easier than sys-freedos.pl (sys-freedos-linux) :-)

For example Rugxulo should be able to explain Rufus afair.

>> Then the BIOS will play the driver for DOS. 

> ?

When the BIOS can boot from USB storage it means that it
knows how to access it. And when you boot from USB stick,
the BIOS will do exactly that for you. From the point of
view of DOS, it will look as if you have booted from any
normal harddisk... Some BIOS versions can also do this
with "as if ... floppy" or "as if ... ZIP drive" so DOS
might end up thinking that your stick is A: and not C:.

> 2ut I didn't see any file/utils that would apply to my USB FD
> (flash drive) Boot/access ordeal.

That is because the "all" file is about all OTHER programs.
You want the "this" file (usbdos.zip) instead. In the all.zip
file you get stuff like a resident clock, joystick or mouse
used to send cursor keys, a tool to slow down your PC in case
your DOS programs run too fast, print screen to file, gamepad
driver, keyboard macro tool, serial port status info... :-)

The usbdos file comes with 20 000 lines of documentation which
is a lot of info for us. Note that usbdos only uses the slower
USB UHCI or USB 1.1 transfer, but I think newer chipsets still
support that as well so the only problem is speed loss: Factor
40 slower than USB 2.0 could do, even more compared to USB 3.

The documentation includes a technical handbook for people who
want to write further drivers for specific USB devices and the
"introduction" for those who want to use the existing drivers,
at power-user level. The short story is that you want to load
USBUHCI to drive your USB controller inside the PC, then one
or more other drivers for the USB devices that you want to use
later. If you do not use PS/2 for those, you will have to load
USBKEYB and USBMOUSE for your keyboard and mouse, because the
BIOS will stop helping you with USB keyboards and mice as soon
as you start using your own DOS driver for the USB controller.

For USB sticks / disks / floppy, you want to use USBDRIVE. You
can also load USB printer drivers and a few others from Bret.

Maybe Bret (or Richard Bonner) could write some "quick start"
document for the average DOS user and include it in the ZIP?

In case you have wondered, the drivers are free, open source,
with the restriction that you must not make non-free software
from them nor charge (more than your own expense) for copies.

Some page numbers to read in USBINTRO, nr. are at page bottom:

15 introduction to the tree like connection structure of USB

16, 17 USB philosophy introduction

27 UHCI OHCI EHCI XHCI ... controllers: If you have USB 2, you
have both EHCI and implicitly either OHCI or UHCI USB 1 compat.
Note that only UHCI is compatible with the DOS drivers of Bret!

28 use USBHOSTS to know if you have UHCI (Intel / Via) as needed

Note that there is also OHCI, which is the not supported OTHER
variant of USB 1. If you have USB 2, you also have either UHCI
(good) or OHCI (you will need another driver). Not sure how much
those 2 variants differ from each other. Maybe Bret can explain?

29 both real mode (at most HIMEM) and VCPI (EMM386) are compatible
with the DOS drivers, but DPMI (Windows) is not.

33 maybe, if you really want to know how fast or slow you can get

34, 35 what the legacy talk is about, what BIOS legacy support is
The following pages explain how the BIOS does that and why using
DOS USB drivers often means that the BIOS no longer helps you to
use USB keyboard / mouse etc., for all or some of your USB ports.

39 good to know: All drivers are unloadable TSR which you load
at the command prompt, no editing of config.sys required :-)

40 good to know: The drivers run in the background, are modular
and thus not limited to a certain type of device (e.g. sticks).

41 important to know: The drivers are static, so they do not do
special magic for you about plug and play. Instead, plug in the
device, then load the driver. When done, you can unload it and
then unplug the device. Those two steps are of course optional.

42 good to know: Most drivers make your USB devices look like
their classic counterparts for DOS, good for your old software.

45 some debugging tools: USBSUPT1, VENDORID, PS2MTEST, ...

46 put the drivers in a separate directory and add that to your
DOS PATH so they can find each other, when necessary.

47 if you do not want the drivers to use UMB, use the lowmemory
command line option: "USBUHCI LowMemory:Yes" And use ? for help.

48 to uninstall e.g. the keyboard driver, do "USBKEYS Uninstall"
etc. Quite easy to understand.

49, 50 some things that you can do to debug/ignore (bad) devices.

53 the difference between USBUHCI and USBUHCIL: L is little/lite
and uses 30 instead of 43 kB RAM initially, for max 16 devices.

54, 55 how to select which controller to use, if you have several
(note that you can load USBUHCI/USBUHCIL several times, too)

56 to 58 things that can go wrong with IRQ, config workarounds.

61 why you should read page 83 about USBHOSTS STOP to force USB1.

68 the usbuhci reset command in several variants

69, 70 switching power on and off, nice for USB lamps and can
be used to fake unplugging a device and plugging it again...

73 USBUHCI Addresses lists your USB devices, kind of

79 USBUHCI Descriptors lists some properties of your USB devices

80 USBUHCI Report lists properties of mice / keyboards etc.

82, 83 USBHOSTS lists your controllers and lets you enforce USB1

84 USBDEVIC seems similar to USBUHCI options Addr./Descr./Report?

88 USBHUB adds hub support, if you have USB hubs to use. I think
USB cardreaders often have a built-in hub, / "are many readers".

90 USBKEYB is the keyboard driver: type on any of up to four USB
keyboards or your PS/2 keyboard, it all ends up at the same key.
Also works with any PS/2 compatible intl. keyboard layout driver.

The following pages explain some advanced options (methods to get
keys sent, ways to override layout and use special hotkeys etc.).

100, 101 USBKEYB has a choice between two ctrl-alt-delete styles

107 USBMOUSE is the mouse driver: Move or click any of up to 8
USB mice or your PS/2 mouse, it all ends up accessible as PS/2.

You still have to load a PS/2 mouse driver after that, such as
CTMOUSE cutemouse unless your DOS programs have built-in ones.

109 your DOS mouse driver should use PS/2 through the BIOS and
not directly access the PS/2 hardware, for better compatibility
or probably to work at all. CTMOUSE 1.9 and 2.1 work, 2.0 not.

110 mouse scroll wheel and middle mouse button and extensions
(no driver yet) for second scroll wheel and additional buttons.
Note that old drivers simply ignore wheel(s) and extra buttons.

111 even if you load drivers, DOS often ignores mouse wheels.

111, 112 USBMOUSE options for extra PS/2 emulation, with some
pros and cons. Can help you use DOS mouse drivers / software
which does not use the PS/2 BIOS but direct hardware access.

113 alternate USBMOUSE choices regarding communication methods.

116 interesting: USB mice have max 8 buttons, 7 axis movement

118 controlling your USB mouse sensitivity

119 USBMOUSE status and reset options

123 USBJSTIK connects your USB Joystick to a simulation of
the classic analog joystick hardware, but needs MS EMM386,
386MAX or similar EMM386 drivers with the required hardware
simulation function to do it. Not available in JEMM386 yet!

(I think the term analog bits is a bit misleading here: In
fact the bits are digital, but set for an analog duration)

Actually USB joysticks can have many throttle/axis/button
items and the driver supports many variants of simulated
analog joysticks (1/2/4 axis, Thrustmaster with 5-offsets-
in-one-axis for 5 hat switch positions, 1/2/4/15 buttons)

141 USBDRIVE is the driver for USB storage, in other words
USB sticks, harddisks, floppy drives and similar. It has
support for FAT12, FAT16 and FAT32 drives and partitions.
USB cardreaders are supported as well. Note that CD/DVD/BD
optical drives are a different category and not supported.

142 USB storage has some similarity with SCSI, I think?

143, 144 by default, the driver allocates space 4 devices,
you can change that to a value between 1 and 8 devices and
for more than one "disk" per device. Cardreaders can count
as one device with multiple disks, one per socket. I think
some also count as USB hub with multiple devices instead?

145, 146 how many drive letters / partitions you can use
depends on your LASTDRIVE setting, but you have to set a
number already when you load USBDRIVE. Also, you can use
the driver with tools like FDISK without any drive letter!

148 actually USBDRIVE helps you with plugging / unplugging
disks / sticks / etc. on the fly by keeping track of them.
You can select a minimal drive letter, but you cannot use
A: or B: not even for USB floppies - they also work as X:

149 FAT32 partitions are only used if your DOS supports it.

150 problems with booting from USB and then loading USBUHCI:
You must not use the boot drive letter any more after you
load (any) DOS USB drivers if you have booted from USB!

151 MS FDISK does not work right with not-plugged disks,
it crashes instead of skipping such disks until plugged.

152 USBDRIVE InquiryData tells you which USB drives are
connected and what SCSI features they support, nice :-)

153 some tricks for formatting USB drives (if you want).

155 resetting USB disks. Also, compatibility is often bad.

157 delayed USBDRIVE init gives devices time to spin up

158 USBDRIVE by default transfers 1 sector at a time, but
should work a bit faster with 4 on most disks. You can go
up to 64. The more sectors you bundle, reliability drops.

159 Chunks of 2 or 4 sectors are 2x or 4x faster than a
single sector. But 8 are 5x and 64 are 6x, not much gain?
I would say this means in USB 1 speed, size 4/8 are best.

160 using the 3rd party USBASPI driver in special ways to
init USB disks for you before loading USBUHCI and USBDRIVE
as extra trick to get some more annoying drives to work.

The Sandisk U3 software makes your USB stick look like a
CD-ROM. You have to uninstall it to use the stick in DOS.

161 when USB sticks break, it means some sectors can no
longer be written. They still can be read. Unless, I would
like to add, you simply have a mechanical connector break.
Sticks distribute writes to reduce wear, which you cannot
see or have to worry about. But it makes delete less safe.

162 for sectors larger than 512 bytes, you could patch
your DOS, but you probably should not (interesting bit)
Also, USBDRIVE Status shows some interesting information.
All of int 25/26, int 13 and DOS drive letters supported!

163 some 3rd party DOS USB drivers support USB 2 or 3 speed!
Also, do not confuse FAT32 and LFN, they are independent.

164 DRIVES is a tool which gives you an overview of drives.

165 USBPRINT connects up to 8 USB printers to DOS, it lets
them look like BIOS printers. So it only works if you do
not try to use the old printer port "controller" hardware.
Luckily, using the BIOS should be relatively widespread.

166 Note that if your printer does not accept plain text
but e.g. needs PostScript, your DOS software has to send
that. The USB driver only gives you the basic connection.

168 USBPRINT ReplaceParallel:Yes allows you to put the USB
printer virtually at the port normally used by your real
printer port, useful if you want to print from a DOS tool
which only allows you to print to the first printer LPT1.

169 USBPRINT allocates an EMPTY area of I/O ports to work!

170 USBPRINT DeviceIDStrings gives you a list of printers.

171 USBPRINT Reset LPT1 resets the printer connected there.
Also, USBPRINT automatically tells Epson printers to leave
the proprietary "packet" mode to make them work with DOS.

172 USBPRINT COPY ... helps you to print multiple files.

173 USBPRINT reboots your PC when a BOUND exception comes
in, instead of doing a printscreen which shares that int.
In other words, it distinguishes it from real printscreen.

174 USBPRINT pools incoming data bytes and sends them to
the printer in chunks after short delay / if buffer full.
That can interact with background print spoolers somehow.

176 INKLEVEL tells you how much ink you have left :-) Has
to be used after loading USBPRINT and only works with some
HP and Epson printers, so your mileage may vary...

177 printers are usually pessimistic about ink levels.

181 to 183 UNI2ASCI converts Unicode text to text in your
current codepage, sometimes using chars that LOOK similar,
sometimes escapes / descriptions, trying hard to help you.

Maybe somebody can make some "Bret USB driver cheatsheet"
using snippets of the original 186 page document and this
mail? Would be nice to have an intro on just 8 pages :-)

>> Some people have collected commercial drivers which you could
>> use with DOSCDROAST or similar toolkits, with the same problem
>> as using old commercial DOS USB disk drivers.
> The problem being they're not FREE?

Not only that, they may also just fail to recognize your drive
(CD/DVD/BluRay) in the CD driver case or USB stick in the USB
storage case.

Regarding speed, USB 1 means quite slow, far below 2 MB / sec
even in the best case. For example running Windows 3 from an
old 256 MB stick is much slower than on an old 40 MB harddisk.
But indeed, it is still faster than from floppy ;-)

Regards, Eric

Learn Graph Databases - Download FREE O'Reilly Book
"Graph Databases" is the definitive new guide to graph databases and 
their applications. This 200-page book is written by three acclaimed 
leaders in the field. The early access version is available now. 
Download your free book today! http://p.sf.net/sfu/neotech_d2d_may
Freedos-user mailing list

Reply via email to