Floppy Driver

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.
Cjmovie

Floppy Driver

Post 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.....)
User avatar
Solar
Member
Member
Posts: 7615
Joined: Thu Nov 16, 2006 12:01 pm
Location: Germany
Contact:

Re:Floppy Driver

Post 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?
Every good solution is obvious once you've found it.
Dex4u

Re:Floppy Driver

Post 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.
Cjmovie

Re:Floppy Driver

Post 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!
DruG5t0r3

Re:Floppy Driver

Post 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
Slasher

Re:Floppy Driver

Post 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
Cjmovie

Re:Floppy Driver

Post 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.
Cjmovie

Re:Floppy Driver

Post by Cjmovie »

It was missing SeekTrack, what st0 and cylinder (global) are, and the IRQ initializer, (I think)..............
DennisCGc

Re:Floppy Driver

Post 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...
Dex4u

Re:Floppy Driver

Post 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 .
JoeKayzA

Re:Floppy Driver

Post 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' :D)

cheers Joe
User avatar
Solar
Member
Member
Posts: 7615
Joined: Thu Nov 16, 2006 12:01 pm
Location: Germany
Contact:

Re:Floppy Driver

Post 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.)
Every good solution is obvious once you've found it.
DennisCGc

Re:Floppy Driver

Post 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 ::) )
JoeKayzA

Re:Floppy Driver

Post 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
Warrior

Re:Floppy Driver

Post 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
Post Reply