Re: [Freedos-user] Bret Johnson USB driver documentation summary attempt

2013-05-11 Thread Rugxulo
Hi,

On Fri, May 10, 2013 at 9:11 PM, Eric Auer  wrote:
>
> 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 ;-)

It's probably best to create a RAM drive and copy there any files that
are often needed instead of constantly seeking the slow media (and add
it to %PATH%). Then later just manually write back any modifications
that need saving. (Easy to forget, and I'm not sure of a good
solution. Perhaps get used to issuing a "halt" command that writes
everything for you. "replace /s /u /r" ???)

Similarly it may be worthwhile to disable swapping with CWSDPMI (via
CWSPARAM) or load "hdpmi32 -r" so that it doesn't create
"c:\cwsdpmi.swp" on every DJGPP-compiled program invocation. ("cwsdpmi
-p -s-" is similar but pure DPMI only, i.e. less friendly to other
extenders due to their bad assumptions.)

--
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
Freedos-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/freedos-user


[Freedos-user] Bret Johnson USB driver documentation summary attempt

2013-05-10 Thread Eric Auer

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