UsbDOS - My experience

The intent of this forum is to discuss my DOS TSR programs (available at http://bretjohnson.us), how they work and don't work, new/missing features, status of updates, and anything else related to them that may need to be discussed.

UsbDOS - My experience

Postby jd.hupp » Wed Jun 24, 2015 11:15 am

First of all, thanks to Bret for all the work to date (and hoping there's more).

For expedience, this is a straight copy and paste of my post to the FreeDOS users list:

I'm working now with FreeDOS 1.1 on an old machine with a DFI P5BTX/L motherboard with Intel 82430TX chipset, AMD K6/233, and 64MB.

It has a USB 1 implementation, so I thought I would see if I could get some functionality out of it.

Locating FreeDOS documentation on its USB support was a bit difficult. Searches tend to bring up outdated information. There is an index of Technotes at http://www.freedos.org/wiki/index.php/Technotes, but most of those entries have just an article number with no title/subject. There is a 1-paragraph summary at https://en.wikipedia.org/?title=FreeDOS#Universal_Serial_Bus that provides some bare leads. The most definitive leads came from http://www.freedos.org/wiki/index.php/Printer. For my purposes I was only interested in open source, which narrowed the field down to one candidate: Bret Johnson's UsbDOS software at http://bretjohnson.us/

His last update was in 2010, but there is some activity in the forum. His own assessment is that the overall state of the software is alpha/beta quality, depending on which program in the suite you're looking at.

The suite includes some testing and support tools, and also a UHCI driver and drivers for other common hardware: keyboard, mouse, joystick, printer, and hard/flash drives.

One tool (USBHOSTS) identifies your host controllers so that you will know whether his software supports them. His USBUHCI/L drivers support older Intel and Via UHCI controllers.

Another tool (IRQ) aims to survey the current usage status of all IRQ's, whether each IRQ is enabled and what is (or commonly would be) using it. Perhaps I didn't try hard enough to understand it, but I found the results a little less than definitive. [I would, in fact, very much like to find a good tool for identifying used/free IRQ, I/O and DMA resources.]

I read through most of the informative and well-written USBINTRO.DOC. Though it was 186 pages and somewhat exhausting, I would much rather have this state of affairs than the slim and spotty documentation that often comes with open source software, especially when it is in earlier development.

One usage note that I don't remember reading in the DOC: For the drivers I was using, it was insufficient to simply put the program directory in the PATH. It wouldn't work for me unless I did a CD into the directory before running anything.

Speaking of running anything, the drivers are TSR's rather than boot-time only. So you can load and unload them as needed.

And since my current first interest was in using flash drives, that approach suits me well. He also notes that doing USB in DOS is memory-intensive, so that is another good reason to load as needed.

I got the drivers for the host controller and USB drive running. They both loaded automatically into upper memory. You can, by the way, load drivers first and then insert a flash drive, or insert a drive first then load the drivers. My commands were simply:
USBUHCIL
USBDRIVE /Devices:2 /Disks:2 /Drives:2

Testing with a SimpleTech 1GB FAT16 and a Kingston DataTraveler G3 4GB FAT32: I found that it works, but very slowly. A DIR command takes 10-15s. Copying a 10KB file took perhaps 20-30s. Copying a 500KB file took perhaps 10 minutes.

But the data integrity seemed good. The small and larger file copies both opened fine.

About copy speed: USBDRIVE has a MaximumSectors option which can be set from 1 to 64. By default it is set at 1, the slowest but most reliable level. The developer uses 4 with his drives. I got an error during a copy using 4, but with 3 no error. Set at 3 and doing a more accurate test, I copied a 50KB file in 90 sec.

There is some issue with the DIR command. A DIR of the Kingston 4GB FAT32 took 16 sec, but a DIR of the SimpleTech 1GB FAT16 never finishes. It lists all the files and directories, then summarizes xx File(s) and xx Dir(s), but then hangs there and never returns to the command prompt. A reboot is required.
jd.hupp
 
Posts: 3
Joined: Wed Jun 24, 2015 8:15 am

Re: UsbDOS - My experience

Postby Bret » Thu Jun 25, 2015 2:54 am

Thanks for the info.

I have been working on some updates as my spare time permits, but there is very little of that. I'm working on updates to all of the drivers, in addition to creating a high-speed USB 2.0 (EHCI) host driver. The new version of USBDRIVE will hopefully prove much more reliable (and faster) than the old version, and will also support CD/DVD drives. I've also been working on some improvements in memory use by supporting EMS and DPMS in the TSR drivers. Progress on all of this is slow, but is moving forward.
Bret
 
Posts: 478
Joined: Fri Oct 10, 2008 3:43 am
Location: Rio Rancho, NM

Re: UsbDOS - My experience

Postby jd.hupp » Thu Jun 25, 2015 5:12 am

Glad to hear you're able to move ahead, even slowly.

Any idea about the DIR problem with the 1GB FAT16 flash drive?
jd.hupp
 
Posts: 3
Joined: Wed Jun 24, 2015 8:15 am

Re: UsbDOS - My experience

Postby Bret » Thu Jun 25, 2015 6:07 am

It's possible you're just not waiting long enough. FAT16 and FAT32 work very differently from each other. FAT32 actually maintains a count of free clusters on the drive, so DIR's can be displayed pretty quickly. FAT16 does not keep such a list, so in order to determine the amount of free space it must read the entire File Allocation Table to see what's used and what isn't. This can take a LONG time on a really big or really slow disk. It shouldn't take near as long the second time you do the DIR, though, since DOS will have buffered some of the information it needs.

One way to test whether the machine is truly locked up or not is to use my CLOCK program, which will keep ticking as long as things are not completely locked up. A ticking clock doesn't necessarily mean a program isn't caught in a endless loop, but does mean that hardware interrupts are still being generated so the problem isn't as severe as it could be.

If your disk has a light that flashes when the disk is being accessed (some do and some don't), that's another indication that something might be stuck.
Bret
 
Posts: 478
Joined: Fri Oct 10, 2008 3:43 am
Location: Rio Rancho, NM

Re: UsbDOS - My experience

Postby jd.hupp » Thu Jun 25, 2015 7:54 am

Wow, thanks for solving that mystery! It apparently had just not finished reading through the FAT to tally up free space, and the exercise took 6:20 in this case.
jd.hupp
 
Posts: 3
Joined: Wed Jun 24, 2015 8:15 am


Return to Programs

Who is online

Users browsing this forum: No registered users and 3 guests

cron