Is there floppy in FDD

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.
User avatar
Colonel Kernel
Member
Member
Posts: 1437
Joined: Tue Oct 17, 2006 6:06 pm
Location: Vancouver, BC, Canada
Contact:

Re:Is there floppy in FDD

Post by Colonel Kernel »

Solar wrote:A policy that fails pitifully the very moment the first time MacOS runs on a hardware that doesn't support this OS-driven eject - dooming Apple to provide expensive Apple-only floppy drives till the end of (floppy) days or break their metaphor.
Is it doom, or an extra source of revenue? ;D
Top three reasons why my OS project died:
  1. Too much overtime at work
  2. Got married
  3. My brain got stuck in an infinite loop while trying to design the memory manager
Don't let this happen to you!
User avatar
Pype.Clicker
Member
Member
Posts: 5964
Joined: Wed Oct 18, 2006 2:31 am
Location: In a galaxy, far, far away
Contact:

Re:Is there floppy in FDD

Post by Pype.Clicker »

Rob wrote: but it already fails now with an USB stick,
for example. I can just yank that out whenever I want.
sure! still you're informed of the stick's removal by the USB bus. I don't say "there will never be user-driven hard removal of media", just that "why bother when the hardware is *soo* poor". But i have to admit i never found FDD programming interesting anyway. Dealing with floppies is solely GRUB's concern as far as i'm concerned :P
crackers

Re:Is there floppy in FDD

Post by crackers »

Lately I've decided to implement correct behaviour of my OS when there is no floppy and I have new question ;D. Normally reading data looks like:

send read/write command
wait for interrupt
read results

but when there is no floppy everything stops because I'm not getting any interrupt, so I add a counter

Code: Select all

while(interrupt == false)
{
  floppy_delay();
  if (counter == 0)
    return error;
  counter = counter - 1;
}
and it's working ok, but only once. When I try to send any new command I'm getting error - something like "can't execute new command, old command pending". My question is, is there any other way than resetting FDC to remove old command ?
paulbarker

Re:Is there floppy in FDD

Post by paulbarker »

I think this has to do with the delay needed for working with a floppy disk. From memory, commands should be at least 50ms apart. If I remember correctly again, this little piece of info is not easily found and is probably mentioned on less than 1% of all websites dealing with floppy disk documents.

I could be completely wrong, I gave up on FD drivers years ago.
Post Reply