Please login or register.

Login with username, password and session length
Advanced search  

News:

Pages: [1]   Go Down

Author Topic: USB 2.0 DRIVER ***EARLY BETA***  (Read 40 times)

UnexpectedBomb

  • 8 MB
  • **
  • Posts: 13
    • GitHub account
USB 2.0 DRIVER ***EARLY BETA***
« on: Today at 01:34:29 AM »

It's still very experimental, but at long last... myth has become reality.

Introducing the first-of-its-kind USB 2.0 mass-storage driver for Mac OS 9. It's rough around the edges and I'm putting it out as an early beta, but it works... and it's FAST.

As many of you know, OS 9 only ever supported USB 1.1, operating at ~1 MB/s in practice. This experimental app mounts a USB 2.0 (or 3.0!) flash drive on a desktop and reads it at ~20 MB/s and writes at ~13 MB/s on my MDD via USB 2.0 PCI card, achieving speeds roughly 10-20x faster than anything OS 9 was doing before. Files copy in the Finder like any other disk.

All that said, I must stress that this is an early beta; a proof that hi-speed USB on OS 9 is possible. It is NOT a polished plug-and-play driver (yet). There's no extension to install. The whole stack (a built-from-scratch EHCI host-controller driver, a software-synthesized root hub, and a block driver) lives inside one small launcher app. Because USB 2.0 PCI cards share their physical ports with the old USB 1.1 "companion" controllers, when you plug in the drive makes all the difference, so it works through a specific sequence:

1) Boot with the drive UNPLUGGED from the PCI card
2) Run the launcher app. It will claim the card's ports for the 2.0 EHCI controller
3) When it says "INSERT USB DRIVE NOW," it's time to plug that sucker in
4) It mounts at 2.0 speed, and the drive icon will show a little "2.0" text badge on it, so you can tell it apart from a plain 1.1 mount at a glance. (Also it will generate some harmless dev logs.)

You MUST leave the app running because it hosts the stack. Eject the drive in the Finder before unplugging, and reboot to mount another drive.

My exact test rig: G4 MDD (non-FW800), an NEC-chipset IOGEAR USB 2.0 PCI card, and a SanDisk Ultra USB 3.0 64GB flash drive. That's the only combination I've been able to test so far, and I really need your help here; when you test this app, please make sure to report back with specific model information the following:
- the model Mac you used
- the model USB PCI card you used
- the type of USB flash drive you used
- the read/write speeds you achieved

Features that DO NOT work yet (and I'd genuinely appreciate some assistance with):
- auto-mounting an attached drive at boot
- hot-plugging (swapping drives without a reboot)

Mac OS 9's USB stack does not transfer a mass-storage device nicely from the USB 1.1 companion controller over to EHCI; a drive present at boot gets claimed by 1.1 before my driver has a chance to load (when placed in Startup Items). See the technical documentation for an explanation as to why my efforts thus far to prevent this have failed. If anyone here knows the classic USB stack intervals well enough to explain how to a companion controller correctly release a port to EHCI, or why ExpertIdleTask won't return after a mass-storage re-probe of a device that won't mount, I'd be very grateful for the advice!

Thanks in advance for your patience with the hot-off-the-press code. This stack took MANY hours of dev work and I'm hopeful we have something genuinely useful here to build from. Bug reports and hardware compatibility reports are welcome. I'm hoping to eventually get this working with late-model G4's that have onboard USB 2.0 (G4 Mac Mini anyone?) as well as USB 2.0 CardBus adapters for PowerBooks. In the meantime, I'll continue working on the hot-plugging feature. Let me know how it all goes, and I look forward to the collaboration.

-UB

https://github.com/UnexpectedBomb/MacOS9-USB2-EHCI
Logged
Pages: [1]   Go Up

Recent Topics