Floppy driver tutorial

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

Floppy driver tutorial

Post by AnonymOS »

I've created a tutorial on reading from a floppy disk. It's not perfect, of course, but it should help some. The code is in C++, though with minor modifications it can be converted to C. I'd of course welcome your feedback here, though be gentle -- it's my first tutorial. ;D

Go to the OS Development page and click on "Write a floppy driver".
ASHLEY4

Re:Floppy driver tutorial

Post by ASHLEY4 »

I am just finishing my floppy driver, so have a good idea of what is needed in a tut, and yours seems to to cover the most important parts.
My driver is done in asm, so your code does not mean much to me, but you tut makes full sense.

The only thing i found hard when writing my code was when i came to read sector, i got a screen full of 0, but no error from my code, i thought i may not of set dma up properly,
but it turned out that because my OS is not 0 based, i was reading from the wrong memory location.
So all though i have not tryed your code, the written bit is well written.

PS: Could not agree with you more about emulators.

\\\\||////
(@@)
ASHLEY4.
iamxiaohan

Re:Floppy driver tutorial

Post by iamxiaohan »

oh, It's very useful! Thank you very much!
AnonymOS

Re:Floppy driver tutorial

Post by AnonymOS »

Thanks for the feedback. I'm glad to hear it's helpful.

ASHLEY4, you say it covers the most important parts, which implies I'm missing a few things. What am I missing? I would like to make it as complete as possible. Thanks for your help. (I had a similar problem, where I assigned each DMA channel a specific memory location and then read from the wrong channel's memory location after reading a sector. Oops.)
ASHLEY4

Re:Floppy driver tutorial

Post by ASHLEY4 »

Sorry if it came a cross as you mist something, but it was meant, to mean you gave info on all the parts you need to know, to make a working floppy driver, without giving too much info, that people get confused.

\\\\||////
(@@)
ASHLEY4.
ASHLEY4

Re:Floppy driver tutorial

Post by ASHLEY4 »

Are you the same person, who started a OS in freepascal with the same name ?.
Available here: http://www.thegaineys.fsnet.co.uk/

\\\\||////
(@@)
ASHLEY4.
AnonymOS

Re:Floppy driver tutorial

Post by AnonymOS »

It didn't exactly come across as if I had missed something, but there was that possibility; so I just thought I'd make sure. As I said, I do want it to be as complete as possible.

No, I'm not the same person. It's news to me that someone was working on an operating system called AnonymOS. I just have a hard time thinking up a good user name, so thought I'd make a small little joke ("anonymous" on an OS development board). Though like him, I don't have a name for my operating system yet, either. ;D

Thanks again for the input.
ASHLEY4

Re:Floppy driver tutorial

Post by ASHLEY4 »

I think the pascal OS project, was abandoned some time ago.
May be in your floppy tut you could, add a part on how to locate and load a program from a fat12 disk, although not part of making a floppy driver, the interaction is.

\\\\||////
(@@)
ASHLEY4.
Post Reply