OS Coding philosophy
Re:OS Coding philosophy
Hmm, are you sure it's a problem only reading 1 sector at a time and not crossing a cylinder boundary?
Re:OS Coding philosophy
I use to have a problem...my BIOS supported loading over 17 sectors ( about 24 or something )...then I ran my OS in BOCHS and it wouldn't load so...I found that 17 sectors is a best standard...right?
Re:OS Coding philosophy
Maybe.
But there's 18 sectors per tracks and 80 tracks per disk. So if you load by 17 sectors blocks, you will fail loading the last sector of each track (if you load more than 1 track, of course...)
Or maybe I'm wrong. Could you remind me what is the correct structure of a 1.44M floppy disk ?
But there's 18 sectors per tracks and 80 tracks per disk. So if you load by 17 sectors blocks, you will fail loading the last sector of each track (if you load more than 1 track, of course...)
Or maybe I'm wrong. Could you remind me what is the correct structure of a 1.44M floppy disk ?
Re:OS Coding philosophy
Sorry...my mind is acting like a computer...I included 0 as a whole number in my post...so 18 sectors is correct.
I sometimes think in 0x's too :-\ :-[
I sometimes think in 0x's too :-\ :-[
Re:OS Coding philosophy
..
Last edited by Perica on Sun Dec 03, 2006 8:25 pm, edited 1 time in total.
Re:OS Coding philosophy
..
Last edited by Perica on Sun Dec 03, 2006 8:25 pm, edited 1 time in total.
Re:OS Coding philosophy
OK, before I go on, I want you to try and get an image in your head of what the tracks and sectors 'really are', using this borrowed illustration:Perica Senjak wrote: How many Sectors are there per head?
How many heads are there per Cylinder?
How many Cylinders are there on the Whole Floppy?
What the heck are Tracks?
This shows the logical layout of a single disk platter, equal to one floppy disk. The disk's magnetic material is conceptually divided into a series of equally spaced concentric rings, called tracks. It is also split radially by thin gaps of equal spacing and angle (this is modified in hard disks, however). The part of a track bounded by two gaps is one sector.
In an actual floppy disk, there are two magnetic read heads which hover close to the surface of the disk, one on each side of the disk (in a conventional setup, that places one head above disk and one below it). As the disk moves under the read head, it can read successively read the sectors in the track which it is currently over. Each head has a stepper motor which can move in a straight line, back and forth; the head n tracks at a time, according to the controller's instructions. To read from a given sector, the appropriate read head first must move to the track the sector is in, then wait for the sector to pass under the read head.
On the standard 1.44M floppy disk with 512 byte sectors, there are 80 tracks divided into 18 sectors, meaning that each of the two read heads can read 18 sectors in a given track, for a total 2880 sectors per disk (1440 per disk side).
To understand cylinders, you have to know that in most hard disks, there are several disk platters, and that each platter has a read head on each side (except for the reference disk, in which one of the heads is removed for the sectoring reference reader). Conceptually, all of the matching tracks on the platters can be visualized as forming a hollow cylinder going through each of the platters at a given track, hence the terms cylinder. Thus, a cylinder is the logical combination of all the sides for all the platters at a given track, and the number of cylinders is equal to the number of tracks, or at least was in the original CHS geometry system.
Sources:
http://www.pcguide.com/ref/fdd/mediaGeometry-c.html
http://www.rundegren.com/software/floppyimage/faq/
http://www.howstuffworks.com/floppy-disk-drive2.htm
http://www.cknow.com/tutorcom/term08_floppy.htm
http://www.upscale.utoronto.ca/GeneralI ... n_disk.pdf
Re:OS Coding philosophy
..
Last edited by Perica on Sun Dec 03, 2006 8:26 pm, edited 1 time in total.
Re:OS Coding philosophy
He helps alot...he helped me too...
some people think his info is alot and bother some...
I don't since he helps people learn.
some people think his info is alot and bother some...
I don't since he helps people learn.
Re:OS Coding philosophy
..
Last edited by Perica on Sun Dec 03, 2006 8:26 pm, edited 1 time in total.
- Pype.Clicker
- Member
- Posts: 5964
- Joined: Wed Oct 18, 2006 2:31 am
- Location: In a galaxy, far, far away
- Contact:
Re:OS Coding philosophy
hmm ... i guess you meant "post scriptum" ... (latin for "after the signature")DarylD wrote: PS stands for Postscript.
Re:OS Coding philosophy
..
Last edited by Perica on Sun Dec 03, 2006 8:26 pm, edited 1 time in total.
- Pype.Clicker
- Member
- Posts: 5964
- Joined: Wed Oct 18, 2006 2:31 am
- Location: In a galaxy, far, far away
- Contact:
Re:OS Coding philosophy
sectors are counted 1..N, tracks and heads are 0..N-1 (iirc)
This should be described in any valuable BIOS interrupts list.
This should be described in any valuable BIOS interrupts list.