I will try to software reset the drive now, but while i'm coding it, why I have both the ERR and the RDY bits set?
What SRV bit stands for?
51h status byte returned by ATA-PIO
Re: 51h status byte returned by ATA-PIO
Ok, I surpassed that error. I was writing bad the LBA. I was shifting it bad and demanding a write to a too high area of the disk. Still inside the 0FFFFFFFh limit, but outside the size of the virtual disk image I produce.
Now I have problem writing to the disk. The writes execute with no errors but when I browse the virtual disk image after executing the writing routine, I cant find the data into it.
let say, I want to write a sector(512 Bytes in my case) to the real address(offset?) inside the disk, I mean if address 0 is the very first writable cell of the disk and I want to write a sector to address 20000h(to write the data between 20000h and (20000h+512)), what value should the LBA address to have? I tried with (20000h/512) and with a simple "1" and nothing is written to the disk.
Now I have problem writing to the disk. The writes execute with no errors but when I browse the virtual disk image after executing the writing routine, I cant find the data into it.
let say, I want to write a sector(512 Bytes in my case) to the real address(offset?) inside the disk, I mean if address 0 is the very first writable cell of the disk and I want to write a sector to address 20000h(to write the data between 20000h and (20000h+512)), what value should the LBA address to have? I tried with (20000h/512) and with a simple "1" and nothing is written to the disk.
Re: 51h status byte returned by ATA-PIO
OK, it works now. My code had many programing errors. I have a ATA-PIO routine now!!! Happy!!!