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.
Read/Write disk at fisical level
Re: Read/Write disk at fisical level
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
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
If I will realize PATA, will it work with SATA HDD? Or only IDE?
-
- Member
- Posts: 116
- Joined: Wed Oct 22, 2008 2:21 am
- Location: Roma,Italy
Re: Read/Write disk at fisical level
certainly with some measure
Re: Read/Write disk at fisical level
SATA controllers usually have shadow registers meaning that it emulates the ATA protocol as far as I'm aware
http://j-software.dk | JPasKernel - My Object Pascal kernel
- Troy Martin
- Member
- Posts: 1686
- Joined: Fri Apr 18, 2008 4:40 pm
- Location: Langley, Vancouver, BC, Canada
- Contact:
Re: Read/Write disk at fisical level
Floppy Disk Controller
TLDR version:
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)
- Love4Boobies
- Member
- Posts: 2111
- Joined: Fri Mar 07, 2008 5:36 pm
- Location: Bucharest, Romania
Re: Read/Write disk at fisical level
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.
Think of it as an interface that kinda' works for everything.
"Computers in the future may weigh no more than 1.5 tons.", Popular Mechanics (1949)
[ Project UDI ]
[ Project UDI ]
Re: Read/Write disk at fisical level
Can you get me a direct link?
- Brynet-Inc
- Member
- Posts: 2426
- Joined: Tue Oct 17, 2006 9:29 pm
- Libera.chat IRC: brynet
- Location: Canada
- Contact:
Re: Read/Write disk at fisical level
People are so helpless... I swear this has been posted on the forum before.
http://en.wikipedia.org/wiki/Advanced_T ... d_features
http://en.wikipedia.org/wiki/Advanced_T ... d_features