1
Hardware / Re: USB32 USBMSD problem of re-read diskette
« on: January 24, 2023, 05:30:09 pm »
By now, I don't think it is a timing problem in the driver. It is a problem of not testing for an inserted media long enough for the drive to react. The number of retries is too low and/or the check for inserted media is not done at all places required plus the returned error info ("sense code") is not properly taken into account (the "sense code" will for example tell you if the drive is not ready, does not contain media or if the media has just been swapped and whole bunch of other potential error/status conditions). Then, for a USB floppy drive, you need some special handling regarding the fact media might not be inserted (for a USB memory stick, the "media" is always "inserted"). That is what you observed: to try and access the media when there is no media inserted will lead to that typical "rattling sound" and Windows does the same.
What I did in the past was to install "Wireshark" under Windows which contains an additional "USB capture" feature (USBpcap).
That is what I used to track what commands in what sequence Windows issues against the USB floppy drive (by using it under Windows). I then modified USBMSD.ADD to follow that sequence (as good as that was feasible), including some guesswork about necessary retries.
And regarding that it works on one system while it does not on another system: the USB floppy drive HW has some physical variation even if it is the very same model (but a different physical drive !) and that can lead to one drive needing more retries than another drive (for example). This has to be anticipated and taken into account. You just cannot test against each and every USB floppy drive on planet earth.
What I did in the past was to install "Wireshark" under Windows which contains an additional "USB capture" feature (USBpcap).
That is what I used to track what commands in what sequence Windows issues against the USB floppy drive (by using it under Windows). I then modified USBMSD.ADD to follow that sequence (as good as that was feasible), including some guesswork about necessary retries.
And regarding that it works on one system while it does not on another system: the USB floppy drive HW has some physical variation even if it is the very same model (but a different physical drive !) and that can lead to one drive needing more retries than another drive (for example). This has to be anticipated and taken into account. You just cannot test against each and every USB floppy drive on planet earth.