Page 1 of 1
Read/Write disk at fisical level
Posted: Tue Nov 11, 2008 6:08 am
by Robotex
Hi. I'm developing OS, but I have one problem. How can I read and write disks (hdd, fdd & usb flash drive) in protected mode?
Best regards, Nick.
Re: Read/Write disk at fisical level
Posted: Tue Nov 11, 2008 6:16 am
by AJ
Hi,
Unlike with BIOS calls in Real Mode, there is no single interface for these devices - you need to write drivers for PATA, SATA, the FDC and USB individually. Have a look at our wiki article for
Storage to get started.
Of these devices, PATA is probably the easiest to get started with.
Cheers,
Adam
Re: Read/Write disk at fisical level
Posted: Tue Nov 11, 2008 1:02 pm
by Robotex
If I will realize PATA, will it work with SATA HDD? Or only IDE?
Re: Read/Write disk at fisical level
Posted: Tue Nov 11, 2008 1:17 pm
by djmauretto
certainly with some measure
Re: Read/Write disk at fisical level
Posted: Tue Nov 11, 2008 1:18 pm
by Laksen
SATA controllers usually have shadow registers meaning that it emulates the ATA protocol as far as I'm aware
Re: Read/Write disk at fisical level
Posted: Tue Nov 11, 2008 1:36 pm
by Troy Martin
Floppy Disk Controller
TLDR version:
http://wiki.osdev.org/Floppy_Disk_Controller wrote:[The] Floppy controller is programmed through 8 registers accessed from 0x3F0 through 0x3F7 I/O ports. As usual on PC architecture, some of those registers have different meaning depending on whether you read or write them. For extra info, refer to the datasheet (see link below). Note that snippets and datasheets name those registers from their trigrams (e.g. SRA, MSR, DIR, CCR, etc)
Re: Read/Write disk at fisical level
Posted: Tue Nov 11, 2008 9:49 pm
by Love4Boobies
Instead, you might want to look for ATA/ATAPI specs here:
http://www.t13.org/
Think of it as an interface that kinda' works for everything.
Re: Read/Write disk at fisical level
Posted: Tue Nov 18, 2008 3:42 am
by Robotex
Can you get me a direct link?
Re: Read/Write disk at fisical level
Posted: Tue Nov 18, 2008 10:34 am
by Brynet-Inc
People are so helpless... I swear this has been posted on the forum before.
http://en.wikipedia.org/wiki/Advanced_T ... d_features