Page 1 of 2
Floppy Driver
Posted: Tue Aug 23, 2005 9:07 pm
by Cjmovie
I've tried searchig for floppy info, but I can't seem to find a single source example - I've already got it to detect floppy drives (mainly because it's only 10 lines of code worth work), and I've got all the other stuff it relies on (IRQ, PIT, etc.).
Any suggestions? (Checked the FAQ, it only has info on setting DMA for it.
Just a well commented code example will do (a complete one) or a tutorial - whatever or wherever I can get a full supply of information.
Oh, I'd also like to say
that my paging system works! That I now have a physical memory manager, paging (backend only), standard (Video, time only) library that can be linked to any program and hook into OS calls.
After I get the floppy driver done, i'm going to introduce a FAT12 file system for floppys. Then paging (frontend), task switching. Then my full Kernel library, followed finally, after gettting a few drivers done (for video, mouse, MAYBE parrallel for old-style IBM printers, I have an Epson one), by a GUI.
Yes, things look bright once I finish the farthest point ever in my OS design history (I've started over 7 times.....)
Re:Floppy Driver
Posted: Tue Aug 23, 2005 10:28 pm
by Solar
Cjmovie wrote:
Just a well commented code example will do (a complete one) or a tutorial - whatever or wherever I can get a full supply of information.
Checked the
example kernels linked in the FAQ?
Re:Floppy Driver
Posted: Wed Aug 24, 2005 7:52 am
by Dex4u
All the info you need to write a floppy driver is in this doc
http://www.osdever.net/documents/82077A ... ?the_id=41
just study it.
Re:Floppy Driver
Posted: Wed Aug 24, 2005 2:47 pm
by Cjmovie
@Solar: Nope. BOS v.04 seems to have promising code.......
@Dex4u: Saw that, it makes me feel to much like I'm reading another chip doc., not a programming doc....(although it really is a chip doc.
Thanks Guys!
Re:Floppy Driver
Posted: Wed Aug 24, 2005 5:15 pm
by DruG5t0r3
Programming a floppy driver is just so ugly (check the linux source code)...I'm considering not supporting it, or at least, it's not my priority. Besides some new computers don't even have one anymore
Re:Floppy Driver
Posted: Wed Aug 24, 2005 5:54 pm
by Slasher
Floppy driver programming is not that bad. Linux is not a measuring yard stick. You just have to understand what is going on.
Here is my tutorial
http://www.mega-tokyo.com/forum/index.p ... eadid=4077
Re:Floppy Driver
Posted: Wed Aug 24, 2005 8:30 pm
by Cjmovie
@Code Slasher: I saw your tutorial on bos.asmhackers.com, it's rather good, but it's missing some functions that I don't get. I mean, it's all there but around 2 functions I think it was. Although it did serve as a very good introduction/algoritham help.
I think it was FloppyWaitData or something like that.....
@DruG5t0r3: It is not! The ONLY computers I can think of that don't ship with floppys standard, are the DELL $299 sucky budget PC's, no where near modern. That and rack-mount servers.
Re:Floppy Driver
Posted: Wed Aug 24, 2005 9:04 pm
by Cjmovie
It was missing SeekTrack, what st0 and cylinder (global) are, and the IRQ initializer, (I think)..............
Re:Floppy Driver
Posted: Thu Aug 25, 2005 6:22 am
by DennisCGc
Hi,
Cjmovie wrote:
@DruG5t0r3: It is not! The ONLY computers I can think of that don't ship with floppys standard, are the DELL $299 sucky budget PC's, no where near modern. That and rack-mount servers.
No, actually DruG5t0r3 seems to be right. I see, everytime, more PCs which don't have a floppy drive. Yeah, DELL started the whole 'compaign', but other vendors are doing the same.
What I can conclude, looking at my class mates f.e., is that MP3 players/USB sticks are now 'the' media. And why not? It's supported by popular operating systems and it's a lot more solid than the floppies are... (taking this point of view of an average computer user..)
Now, for my OS, floppy support is not planned. Maybe there will be support one day.. but I think, in my case, network support is sooner than floppy support.
DennisCGc.
PS. I still think disks are important, but are far less important than it used to be...
Re:Floppy Driver
Posted: Thu Aug 25, 2005 6:27 am
by Dex4u
Cjmovie wrote:
@Solar: Nope. BOS v.04 seems to have promising code.......
@Dex4u: Saw that, it makes me feel to much like I'm reading another chip doc., not a programming doc....(although it really is a chip doc.
You do not know how funny the above statement is, As i wrote the floppy drive in BOS v.04, and it is based on the info from the Intel manual, i have even commented it to the per-do code in the manual.
@DennisCGc, I read something differant about your OS plan's and a f*****g floppy driver on your site ;D .
Re:Floppy Driver
Posted: Thu Aug 25, 2005 6:31 am
by JoeKayzA
IMHO, a floppy drive is still much easier to program than an ATA drive. And for USB-mass-storage you'll need USB support first, which is also a bit more than just getting interrupts working...
For me, floppy support is planned as the first mass storage media in my current OS, as it was in the last one. (if you want to call 1,44 MB a 'mass'
)
cheers Joe
Re:Floppy Driver
Posted: Thu Aug 25, 2005 8:05 am
by Solar
A significant percentage of modern laptops doesn't have a floppy drive anymore. (Neither do they have serial, parallel, or PS/2 ports.)
Re:Floppy Driver
Posted: Thu Aug 25, 2005 8:35 am
by DennisCGc
Hi,
IMHO, a floppy drive is still much easier to program than an ATA drive.
I really tend to disagree with this.. I haven't completed my ATA driver completely (it's working in legacy mode and doesn't have any CDROM support yet..) but it's a lot easier of what I already implemented of the ATA-specs.
Dex4u wrote:
@DennisCGc, I read something differant about your OS plan's and a f*****g floppy driver on your site ;D .
lol, yeah.. it was... Bubach was helping me with the code :/ but didn't work.. (even when I rewrote the part, works in Bochs), anyway, before that I decided I didn't need it.. one of the reasons I decided I didn't need it, is my laziness ;D ...(plans to update my website, again ::) )
Re:Floppy Driver
Posted: Thu Aug 25, 2005 9:20 am
by JoeKayzA
Solar wrote:
A significant percentage of modern laptops doesn't have a floppy drive anymore. (Neither do they have serial, parallel, or PS/2 ports.)
It seems to get similar to the discussion if new OS developers should deal with legacy-stuff or go for the state of the art straight ahead.
cheers Joe
Re:Floppy Driver
Posted: Thu Aug 25, 2005 9:30 am
by Warrior
Even if they arn't being shipped widely anymore, it isn't likely they are going to phase out fast of use for moving small data withought wasing a CD-R. I'd support it so the compatability is there, besides after reading a bit of the floppy datasheet and comparing what I take notes on to some of the ASM code in BOS (:) Dex) , I was able to throw together a pretty nice (in my eyes) floppy driver in C.
Good luck,
Nelson