Question about which tools to use, bugs, the best way to implement a function, etc should go here. Don't forget to see if your question is answered in the wiki first! When in doubt post here.
Hello, right now I try to read from and write to ata drive, but I got some problems. I downloaded a PDF about ATA and ATAPI, but I still can't manage a simple PIO read or write. Lets say I do this, what shoul I do next to get the bytes from ATA device:
"Certainly avoid yourself. He is a newbie and might not realize it. You'll hate his code deeply a few years down the road." - Sortie
[ My OS ] [ VDisk/SFS ]
Hello yeah I readed this one but it's not very comprehensive. Through the code example I somehow deducted how it works. .. still I get bochs errors and it doesn't work.
teodori wrote:Hello yeah I readed this one but it's not very comprehensive. Through the code example I somehow deducted how it works. .. still I get bochs errors and it doesn't work.
What kind of errors do you get from bochs? Post your log. You need to give a lot more details for people to be able to help.
the wiki wrote:8. Wait for an IRQ or poll.
9. Transfer 256 words, a word at a time
Read properly: You're failing at doing 9 as documented, and you're skipping 8 altogether.
"Certainly avoid yourself. He is a newbie and might not realize it. You'll hate his code deeply a few years down the road." - Sortie
[ My OS ] [ VDisk/SFS ]
Ok so I send the command to the controller, then wait for hardware interrupt. Next I check the status to see if I can read from data port. Does that also mean I will have 256 interrupts where I read the data port 2 times? PIO is very bad...