..
Re: Can we use ATA commands for USB stick?
Point one, about IDE I/O ports.
Second point, about ATA commands: often USB-to-IDE/USB-to-SATA dongles don't just emulate USB mass-storage device, they work as USB<>ATA bridges, so you can use ATA commands to work with storage that is attached to USB but instead of writing to I/O ports, you encapsulate commands into USB packets in some special way (specific to the type of dongle controller).
If you have a system with custom chipset then it may be possible. On usual PCs BIOS doesn't emulate ATA-HDD (you are talking about this early emulation, aren't you?), it only emulates block device for INT 0x13 service (that is a more abstract thing). So, one cannot use IDE I/O ports to access USB drives on usual PCs.muazzam wrote:Can we use IDE-ATA I/O ports commands for USB Memory Stick emulated as HDD?
Second point, about ATA commands: often USB-to-IDE/USB-to-SATA dongles don't just emulate USB mass-storage device, they work as USB<>ATA bridges, so you can use ATA commands to work with storage that is attached to USB but instead of writing to I/O ports, you encapsulate commands into USB packets in some special way (specific to the type of dongle controller).
Re: Can we use ATA commands for USB stick?
If we don't want to use BIOS interrupts, what is actual way of accessing USB mass storage device (Using ports for example)?.Nable wrote:Point one, about IDE I/O ports.If you have a system with custom chipset then it may be possible. On usual PCs BIOS doesn't emulate ATA-HDD (you are talking about this early emulation, aren't you?), it only emulates block device for INT 0x13 service (that is a more abstract thing). So, one cannot use IDE I/O ports to access USB drives on usual PCs.muazzam wrote:Can we use IDE-ATA I/O ports commands for USB Memory Stick emulated as HDD?
Second point, about ATA commands: often USB-to-IDE/USB-to-SATA dongles don't just emulate USB mass-storage device, they work as USB<>ATA bridges, so you can use ATA commands to work with storage that is attached to USB but instead of writing to I/O ports, you encapsulate commands into USB packets in some special way (specific to the type of dongle controller).
Re: Can we use ATA commands for USB stick?
There's a book about programming USB devices here: http://www.amazon.com/USB-Universal-Ser ... rogramming
***Warning*** - this is not easy stuff.
***Warning*** - this is not easy stuff.
Re: Can we use ATA commands for USB stick?
Then you have to implement USB stack (PCI enumeration support, then drivers for controllers: OHCI+UHCI, then EHCI and possibly XHCI, then drivers for exact types of USB devices) and it's a hard task. You can start reading here: http://wiki.osdev.org/Category:USBmuazzam wrote:If we don't want to use BIOS interrupts, what is actual way of accessing USB mass storage device (Using ports for example)?.
Btw, some OSs here already have working parts of USB support, you can study their code.