Floppy Driver Query
Posted: Sat Feb 01, 2025 6:38 pm
Hey guys,
I've come across https://wiki.osdev.org/Floppy_Disk_Cont ... ting_Media and it says:
Detecting Media
The user can swap media out of a floppy drive at any moment. If your driver sends a command to the drive, and the
command fails -- this may be the reason why.
Turn the drive motor bit on.
Read DIR. If the "Disk Change" bitflag is set to "true", then the floppy drive door was opened, so the OS needs to test if a
new disk is in the drive.
I've tried looking around online but I can't find anything related to "Disk Change" bitflag. Is it something I would have to keep track of or can it be read from the floppy controller? If it's the latter can you either provide an example of how you would get it or if possible refer me to somewhere that has a little bit of information about it.
I've come across https://wiki.osdev.org/Floppy_Disk_Cont ... ting_Media and it says:
Detecting Media
The user can swap media out of a floppy drive at any moment. If your driver sends a command to the drive, and the
command fails -- this may be the reason why.
Turn the drive motor bit on.
Read DIR. If the "Disk Change" bitflag is set to "true", then the floppy drive door was opened, so the OS needs to test if a
new disk is in the drive.
I've tried looking around online but I can't find anything related to "Disk Change" bitflag. Is it something I would have to keep track of or can it be read from the floppy controller? If it's the latter can you either provide an example of how you would get it or if possible refer me to somewhere that has a little bit of information about it.