VOGONS


First post, by fsck100

User metadata
Rank Newbie
Rank
Newbie

USBDDOS is a third-party USB driver for DOS by crazii (https://github.com/crazii/USBDDOS). Upstream
development has been dormant since Feb 2024, and several reported OHCI bugs have known fixes that
haven't landed there yet. I'm now maintaining a fork with those fixes plus a few more, and just cut a first
alpha release.

Release page: https://github.com/Netrunner01/USBDDOS/releas … /v1.0.0-alpha.1

License: GPL-2.0, inherited unchanged from upstream. No license changes or proprietary additions.
What's patched in v1.0.0-alpha.1 (12 commits, full per-gap detail in CHANGELOG.md):

NEC µPD720101: UnrecoverableError recovery (was an empty handler upstream)
ALi M5237 / M1543C / ULi: skip HcFmInterval read/restore to prevent lockup
SiS 7001 / NEC µPD720101: disable Legacy Support emulation after BIOS handoff
OPTi 82C861 (FireLink): HcFmInterval/HcPeriodicStart latching retry (mirrors Linux's INITRESET quirk)
Bounded SMM handoff loop (~1s cap, replaces an unbounded busy-wait that hangs on stuck SMI)
Hub-class ClearPortFeature(PORT_RESET) spec violation that breaks devices behind a USB hub
POTPGT wait after SetPortPower (intermittent first-try enumeration on NEC root hubs)
HCD teardown made defensive (resolves the hcd.c(91) assertion on unsupported device classes)
Plus Linux cross-build case-fixes and a COM1 logging flip for headless diagnosis

The "alpha" label is about real-hardware verification being pending — NOT that the code is broken.
All 12 commits build clean with -Werror on Open Watcom v2 and DJGPP gcc 12.2.0, pass a 7-test
QEMU regression suite, and every patch is derived from authoritative sources (USB-IF specs, Linux
pci-quirks.c, Apple Darwin IOUSBFamily, FYSOS Book 8, chip vendor datasheets). The catch is that
QEMU emulates spec-compliant USB devices, and the bugs these patches address exist precisely
because real silicon deviates from spec.

Pre-built binaries are attached to the release page: USBDDOSP.EXE (DJGPP release, needs a DPMI
host like CWSDPMI or HDPMI32) for everyday use, and USBDDOS.EXE (Watcom debug with COM1
logging at 9600 8-N-1) for diagnostic captures with a serial cable.

If you have any of the affected silicon — or a Mac Mini 2011 / Sandy Bridge ThinkPad / Cougar Point
system you've been trying to get DOS USB working on — please test and post results, works-fine
OR fails-with-log. Both are useful. One independent report per patched gap is what moves this from
alpha to beta.

Not yet patched: NEC kErrataNECIncompleteWrite write-1-to-clear retries on HcRhPortStatus,
and full EHCI USBLEGSUP/USBLEGCTLSTS handoff for Intel PCH platforms (likely relevant to some
of the upstream Cougar Point / P67 / Mac Mini hang reports).

Reply 1 of 7, by digger

User metadata
Rank Oldbie
Rank
Oldbie

Good job!

@crazii recently returned to the forum again, so he might find this interesting.

I actually happen to have a Sandy Bridge 2011 Mac Mini lying around somewhere, but I don't know when I will have time to test this.

Reply 2 of 7, by DaveDDS

User metadata
Rank Oldbie
Rank
Oldbie

Anyone know a good way to scan and see what USB controller is in a DOS only system?

I have this little AASTRA system (formally a VOIP PBX) which is enough PC like that I was able to get DOS to boot on it: Re: Using XT-IDE on 386 with Compact Flash larger than 512MB - My tests.

But it doesn't take cards and has virtually no I/O other that PS2 Kbd/Mouse, Network and USB ports.
It's (not quite PC) BIOS recognized USB floppies and mass-storage but not much else.

I'd like to be able to test/set/reset some input bits - possibly connect a USB parallel port or serial ... but not knowing what it actually inside the box, I don't know where to start.

- Dave ; https://dunfield.themindfactory.com ; "Daves Old Computers" ; SW dev addict best known:
ImageDisk: rd/wr ANY floppy PChardware can ; Micro-C: compiler for DOS+ManySmallCPU ; DDLINK: simple/small FileTrans(w/o netSW)via Lan/Lpt/Serial

Reply 3 of 7, by fsck100

User metadata
Rank Newbie
Rank
Newbie
DaveDDS wrote on Yesterday, 20:50:
Anyone know a good way to scan and see what USB controller is in a DOS only system? […]
Show full quote

Anyone know a good way to scan and see what USB controller is in a DOS only system?

I have this little AASTRA system (formally a VOIP PBX) which is enough PC like that I was able to get DOS to boot on it: Re: Using XT-IDE on 386 with Compact Flash larger than 512MB - My tests.

But it doesn't take cards and has virtually no I/O other that PS2 Kbd/Mouse, Network and USB ports.
It's (not quite PC) BIOS recognized USB floppies and mass-storage but not much else.

I'd like to be able to test/set/reset some input bits - possibly connect a USB parallel port or serial ... but not knowing what it actually inside the box, I don't know where to start.

Fastest first step: USBHOSTS.COM from Bret Johnson's USBDOS suite (https://bretjohnson.us/) — it scans PCI specifically for USB host controllers and prints type (UHCI/OHCI/EHCI/xHCI), vendor/device IDs, IRQ, and I/O or memory-mapped base. One command, you'll know.

For a full PCI inventory (NIC, video, etc.) the usual suspects:

If you want to identify USB controllers by hand from any PCI dump: class 0C, subclass 03, prog-IF tells you which — 00=UHCI, 10=OHCI, 20=EHCI, 30=xHCI.

Heads-up: since the Aastra originally ran XP, you've probably got EHCI or xHCI with no UHCI/OHCI companion (Intel moved that direction at the P55 generation). Bret's driver is UHCI-only and won't bind to those. The realistic alternatives:

  • DOSUSB (Georg Potthast) — UHCI/OHCI/EHCI + partial xHCI, demo halts after 20 min (fine for bring-up), includes LPT1USB.SYS and a USB serial driver: https://www.georgpotthast.de/usb/

Reply 5 of 7, by crazii

User metadata
Rank Oldbie
Rank
Oldbie

Very cool!
The OHCI was only tested on my NEC versa s260 laptop, and a NEC µPD PCI adapter on a i820 mobo. Thank you for debug it on more machines.

This was the first time I wrote any driver for any real HW/device, and with the massive details in the usb specs, although I was as careful as I can, some could be missing or misunderstood, besides bugs in the code.
It was a difficult project requiring more pcs for debug & test, and far from being practically usable.

Currently the usb-disk is emulated in the DOS level (DOS driver list) not the BIOS level, so the partitions in the usb disk cannot be changed by fdisk (disk not recognized), hope it does have problem for your rescue disk. I guess a rescue disk doesn't need that self-partition.

Are you interested in creating a PR? Sorry I was busy during the past 2 years and failed to note any changes related on the projects on github. Thank God who blesses with a good timing. 😁

Toshiba Satellite Pro 4300 - YMF744, Savage IX
Toshiba Satellite 2805-S501 - YMF754, GeForce 2Go
IBM Thinkpad A21p - CS4624, Mobility Radeon 128
main: Intel NUC11PHKi7C Phantom Canyon: i7-1165G7 RTX2060 64G 2T760PSDD

Reply 6 of 7, by crazii

User metadata
Rank Oldbie
Rank
Oldbie

I checked github just now and saw your issue. Thank you again for the PR.
There is another PR that's CI related, I believe there isn't many conflict.

Toshiba Satellite Pro 4300 - YMF744, Savage IX
Toshiba Satellite 2805-S501 - YMF754, GeForce 2Go
IBM Thinkpad A21p - CS4624, Mobility Radeon 128
main: Intel NUC11PHKi7C Phantom Canyon: i7-1165G7 RTX2060 64G 2T760PSDD

Reply 7 of 7, by stanwebber

User metadata
Rank Member
Rank
Member

i can test on the following hardware:

- via kt133a system with uhci 1.1 controller
- intel 440bx laptop with uhci 1.1 controller
- nec pci card with ehci/ohci 2.0 controller
- renesas pci card with xhci 3.2 controller
- via cardbus card with ehci/ohci 2.0 controller

my primary interest is getting a usb 2.0 hub (keyboard) working under dos with an ohci controller. the bret johnson driver seems to work flawlessly in this scenario, but is limited to uhci. compiling the current usbddos code on github results in an instant lockup when connecting thru a hub.