Page 1 of 1

Am I doing this right? (floppy access/control)

Posted: Tue Feb 25, 2003 12:00 am
by ReKleSS
Hi everyone,
I'm playing around with this little test OS of mine, but floppy access is getting troublesome. For now, I just want to be able to seek all over the disk, but it isn't happening... Here's what I'm doing, can anyone tell me what's wrong?
send 24 to 0x3f2 (start motor 1)
send the recal command to the FIFO followed by 0
wait for an interrupt
Wait until bit 4 of the Main Status Register is low

Send the seek command, then 0 (top side of disk, drive 0), then the track no.
wait for an interrupt
send the SenseI and get the output

After all this, nothing happens!!! Bochs tells me I'm on cylinder 255, I think the real PC does too. So, what am I doing wrong here??? Anybody???
-ReK

RE:Am I doing this right? (floppy access/control)

Posted: Sun Aug 31, 2003 11:00 pm
by pepito
I have the same problem!
I know is an old message, but can some body help us?

thank you

RE:Am I doing this right? (floppy access/control)

Posted: Mon Sep 01, 2003 11:00 pm
by knicos
I have made a floppy driver for my OS and its working.

First, I send 0x1c to port 0x3f2, not 24, to turn motor A on.
Then the seek command, followed by drive/head (0), then track number. Before writing each command to the data port I check if its ready.
Then wait for interrupt.
Then send Sensei command and read all results (important to read ALL results, sometimes more than documented so have function that reads until no more can be read).

Finally, i set up dma and send read/write commands.

Whats recal command, I dont use it anywhere and mine works?

Advice, try without recal command and change 24 to 0x1c.

Cant help any more without code or more information.

RE:Am I doing this right? (floppy access/control)

Posted: Mon Sep 01, 2003 11:00 pm
by knicos
Stupid, recal = recalibrate, I do do it, but If you do, only do it intially and you will also need to specify step and head load. Easier not to recal as bios should already have done it.

RE:Am I doing this right? (floppy access/control)

Posted: Mon Sep 01, 2003 11:00 pm
by CodeSlasher