• AVR Freaks

USB Mass Storage Floppy Drive

Author
yarm
New Member
  • Total Posts : 4
  • Reward points : 0
  • Joined: 2012/01/31 11:38:41
  • Location: 0
  • Status: offline
2012/01/31 12:05:10 (permalink)
0

USB Mass Storage Floppy Drive

I am trying to implement a USB Floppy drive, I have been trying to find out exactly how windows differentiates a floppy drive from a removable drive without sucess. Is it the medium size? do i need to implement a READ_FORMAT_CAPACITIES is it the MODE_SENSE??? I have been searching the net for a month and found nothing at all on this subject. I have started with the Microchip Solutions Mass Storage example and would like to stick with bulk only transfer if I can, I have no problems adding some of the UFI command if I have to.
post edited by yarm - 2012/01/31 12:08:17
#1

5 Replies Related Threads

    Pacer
    Super Member
    • Total Posts : 1171
    • Reward points : 0
    • Joined: 2004/12/01 09:29:20
    • Status: offline
    Re:USB Mass Storage Floppy Drive 2012/01/31 13:30:06 (permalink)
    0
    Just showing my ignorance really. But isn't a USB Floppy removable anyway, as you can just unplug it? Are you using sub-class 4? My understanding was that UFI was what floppies used, so logically that is the command set to go for. But maybe someone else here has actually done this in practice... Good luck!
    post edited by Pacer - 2012/01/31 13:33:24
    #2
    chinzei
    Super Member
    • Total Posts : 2250
    • Reward points : 0
    • Joined: 2003/11/07 12:39:02
    • Location: Tokyo, Japan
    • Status: offline
    Re:USB Mass Storage Floppy Drive 2012/01/31 15:37:17 (permalink)
    +2 (1)

    UFI was what floppies used

    Exactly.

    Descriptor read out from a USB floppy drive
    [font="'courier new'"]

    [font="'courier new'"]    Device Descriptor   
    [font="'courier new'"]        Descriptor Version Number:   0x0110
    [font="'courier new'"]        Device Class:   0   (Composite)
    [font="'courier new'"]        Device Subclass:   0
    [font="'courier new'"]        Device Protocol:   0
    [font="'courier new'"]        Device MaxPacketSize:   64
    [font="'courier new'"]        Device VendorID/ProductID:   0x0409/0x0040   (NEC Corporation)
    [font="'courier new'"]        Device Version Number:   0x0123
    [font="'courier new'"]        Number of Configurations:   1
    [font="'courier new'"]        Manufacturer String:   1 "NEC"
    [font="'courier new'"]        Product String:   2 "NEC USB UF000x"
    [font="'courier new'"]        Serial Number String:   0 (none)
    [font="'courier new'"]    Configuration Descriptor (current config)   
    [font="'courier new'"]        Length (and contents):   39
    [font="'courier new'"]        Number of Interfaces:   1
    [font="'courier new'"]        Configuration Value:   1
    [font="'courier new'"]        Attributes:   0x80 (bus-powered)
    [font="'courier new'"]        MaxPower:   500 ma
    [font="'courier new'"]        Interface #0 - Mass Storage/UFI   
    [font="'courier new'"]            Alternate Setting   0
    [font="'courier new'"]            Number of Endpoints   3
    [font="'courier new'"]            Interface Class:   8   (Mass Storage)
    [font="'courier new'"]            Interface Subclass;   4   (UFI)
    [font="'courier new'"]            Interface Protocol:   0
    [font="'courier new'"]            Endpoint 0x82 - Bulk Input   
    [font="'courier new'"]                Address:   0x82  (IN)
    [font="'courier new'"]                Attributes:   0x02  (Bulk no synchronization data endpoint)
    [font="'courier new'"]                Max Packet Size:   64
    [font="'courier new'"]                Polling Interval:   0 ms
    [font="'courier new'"]            Endpoint 0x01 - Bulk Output   
    [font="'courier new'"]                Address:   0x01  (OUT)
    [font="'courier new'"]                Attributes:   0x02  (Bulk no synchronization data endpoint)
    [font="'courier new'"]                Max Packet Size:   64
    [font="'courier new'"]                Polling Interval:   0 ms
    [font="'courier new'"]            Endpoint 0x83 - Interrupt Input   
    [font="'courier new'"]                Address:   0x83  (IN)
    [font="'courier new'"]                Attributes:   0x03  (Interrupt no synchronization data endpoint)
    [font="'courier new'"]                Max Packet Size:   2
    [font="'courier new'"]                Polling Interval:   127 ms
    [font="'courier new'"]

    Tsuneo
    #3
    yarm
    New Member
    • Total Posts : 4
    • Reward points : 0
    • Joined: 2012/01/31 11:38:41
    • Location: 0
    • Status: offline
    Re:USB Mass Storage Floppy Drive 2012/01/31 16:59:06 (permalink)
    +2 (1)
    Thanks for your replies. When windows 'sees' a floppy drive it assigns it USBSTOR\GenSFloppy and when it sees a removable disk drive is assigns it USBSTOR\GenDisk. Simply changing the protocol from SCSI to UFI dosent make any difference, I'm assuming there must be something else. Have a look at http://msdn.microsoft.com...ware/gg487419.aspx#EWD it says that the subclass only affects the padding of the CDBs. Also I'm hoping it dosent require CBI as I dont know how to do that.
    #4
    yarm
    New Member
    • Total Posts : 4
    • Reward points : 0
    • Joined: 2012/01/31 11:38:41
    • Location: 0
    • Status: offline
    Re:USB Mass Storage Floppy Drive 2012/02/04 05:41:46 (permalink)
    +2 (1)
    I had posted the same question on a Microsoft forum and I have an answer, I have tested it and it is working! :) Use subclass 6. Device response to INQUIRY command, DeviceType field value must be 0x0 (DIRECT_ACCESS_DEVICE). Device response to READ FORMATTED CAPACITY, number of blocks and block length fields must match with one of these. Blocks BlockLen Capacity 0x00000500, 0x000200 // 640 KB 0x000005A0, 0x000200 // 720 KB 0x00000960, 0x000200 // 1.20 MB 0x000004D0, 0x000400 // 1.23 MB 0x00000B40, 0x000200 // 1.44 MB 0x0003C300, 0x000200 // 120 MB 0x000600A4, 0x000200 // 200 MB This ensures the floppy compatible ID is generated for the enumerated LUN device object.
    #5
    Neiwiertz
    Super Member
    • Total Posts : 2094
    • Reward points : 0
    • Joined: 2004/09/01 02:58:52
    • Status: offline
    Re:USB Mass Storage Floppy Drive 2012/02/04 06:21:55 (permalink)
    0
    Nice reading about the USB Floppy Enumerated i add it at the E16 Gallery here
    I assume you made these changes at USB MSD Stack from Microchip, i just wondering where it can be usefull,
    for example hookup a "old"Floppy Drive at the E16 board and Enumerate it to get access or so

    Flying With --|Explorer 16|HardWare|SoftWare|-- Fav(s) Gallery Lists
    #6
    Jump to:
    © 2019 APG vNext Commercial Version 4.5