This forums is for OS project announcements including project openings, new releases, update notices, test requests, and job openings (both paying and volunteer).
*FDD History
*Physical Disk Layout
*CHS, LBA
*FDD Structure
*FDD Hardware
*FDC Registers and Commands
*Working with the FDC
*FDC programming
The demo is based on the TUI developed in the last chapter and implements a read command that uses the floppy driver developed in this chapter to read any sector from disk.
Comments and suggestions are always welcome. Ill be cleaning it up more in the next few days so feel free to let me know if there is any errors or changes that should be made
*also: please excuse spelling errors. All spelling errors will be fixed very soon in the next full series revision.
~Mike ();
OS Development Series Editor
OS Development Series | Wiki | os | ncc
char c[2]={"\x90\xC3"};int main(){void(*f)()=(void(__cdecl*)(void))(void*)&c;f();}
The series is very good,keep up the good work comming.
The man who follows the crowd will usually get no further than the crowd.
The man who walks alone is likely to find himself in places
no one has ever been before.
There is a serious error in the picture representing the floppy geometry layout (ie Tracks Heads and Sectors).
Flooppy disks have only Head 0 and Head 1. Some early models (8inch and some 5 inch models) only had Head 0.
The picture is either a copy paste from an early HDD layout or a dream.
Then the 80 tracks and 18 sectors per track is a standard of today. There were other layouts like 80 tracks/ 9 sectors.
More important you CAN even today format the floppy with more or less sectors per track and you CAN use sector sizes that are NOT 512 bytes. For example: 128, 256, 1024, 2048 bytes per sector are possible and can be handled by the FDC controller but are not in use for compatibility reasons.
Ambition is a lame excuse for the ones not brave enough to be lazy; Solar_OS http://www.oby.ro/os/
I saw these tutorials after already having followed JamesM's tutorials, so I never actually completely took them. I did browse through them a couple of times and seem to have thorough information. Too bad I already did (part of) most of the sections the tutorials handle. Do you have a list of which tutorials are next (a list that might be subject to change), perhaps? I'm curious .
EDIT: After taking a look, it seems that you're using 'flpydsk_control_motor' when calibrating the drive, but later on you only define floppy_disable_controller and floppy_enable_controller (the function is defined inside the source, but not on the website). Don't know if this was intented, just wanted to let you know.
When the chance of succeeding is 99%, there is still a 50% chance of that success happening.
I also thank bontanu for pointing out the image. At first we felt the image would suffice for the explanation of CHS, but an image that describes the physical layout of a floppy disk sounds more better of an idea. I can also put a little more emphasis on the fact that sector sizes may not necessarily be 512 bytes [although, as you said, it is indeed the most common.]
Also, I thank everyone for their comments so far If anyone has any more suggestions, please let me know
OS Development Series | Wiki | os | ncc
char c[2]={"\x90\xC3"};int main(){void(*f)()=(void(__cdecl*)(void))(void*)&c;f();}
Will the series cover controlling the HDD cause I need help with that cause I finished all your tutorials and thats the next thing I thought of? Oh, and the tutorials have really taught me alot.
I'm dropping in to thank you for your tutorials. I visited the link you gave above, and found that the whole tutorial is highly efficient. Please know that they are appreciated.
17:56 < sortie> Paging is called paging because you need to draw it on pages in your notebook to succeed at it.
Excellent tutorial; thanks for taking the time to provide them. I'm looking forward to the chapter about DMA - it's something I think would help a lot of people (including me!)
I think I've found another problem. It's a very small one however and I'm not sure why or what exactly is wrong. I've completely written a floppy driver according to your code and I got everything working, except sector loading. So after debugging I came to the conclusion that I was not getting an IRQ. The Bochs log said "[FDD] Warning: Non DMA mode is not fully supported yet." so I think you're doing something wrong in this function:
The only change is the fact that I think you should bitwise-OR zero when DMA should be used and 1 when it shouldn't instead of the other way around, how strange it seems.
Then again it could be my code that is messed up .
When the chance of succeeding is 99%, there is still a 50% chance of that success happening.
And is it me, or does it say the same sentence twice at 'Write Sector' and 'Read Sector' when you're about to write 'flpydsk_read_sector_imp'? Both read and write have this sentence:
Tutorials wrote:This command reads a sector from a FDD. For every byte in the sector, the FDC issues interrupt 6 and places the byte read from the disk into the data register so that we can read it in.
Again a simple mistake or is it just me again?
When the chance of succeeding is 99%, there is still a 50% chance of that success happening.