..............F...F..............    .    .    .    .    .    .    .    .    .    .    .    .    .    .    .    .    .    .    .    .    .    .    .    .    .    .    .    .    .    .    .    .    .    .    .    .    .    .    .    .    .    .    .    .    .    .    .    .    .    .    

       THE BASICS OF A SECTOR

           by nir darey



A disk can be formatted in different
formats. Single Density,Dual density
(enhanced density) and Double-
Density.
A sector is one of 18 sectors in a
track at Single Density, and one of
26 sectors in Enhanced Density.
Becuse the track is a ring of
magnetic disk,(means that the track
is circular) there is no way to
distinguish between the beginning of
a track from the middle.
Therefore a sector needs to be able
to identify itself to the drive
controller.
A sector has two parts to it: the
header and the data.
the purpose of the sector header is
to identify itself to the drive
controller. The headers are written
only when the diskette is being
formated, when reading or writing
the drive is automatically reading the headers to know what sector it is.
The sector data is the content that
being reading or writing to the
sector.

  THE FIGURE OF THE SECTOR LAYOUT
  SHOUT BE PRINTED HERE

the floppy disk controller requests
each byte in a turn and places it
directly into the surface of the
diskette. The bytes sequence is
shown in the figure.
as you see in the sector there are
several spaces to protect the
different contents.
SPACE 1: this space should be at
least 1 byte long.
SPACE 2: this space must be 17 bytes
long.
SPACE 3: this space should be over
nine bytes long, this is to protect
the next sector header from being
over written.
When a sector is being readed the
floppy disk controller is searching
for the sector header. When the
sector header is founded it compares
the sector number and the track
number to those given by the
computer. If the comparison fails,
the search continues. If all is
correct, the floppy disk controller
begins searching for the data AM.
if the data AM is found within 28
bytes, the sector is been readed and
transferred to the computer. now the
CRC status is checked for validity.
If the sector is never found the
processor will reposition the drive
head in hope that the head had been
on the wrong track.
The write process is identically to
the read command except that when the
sector is founded, a write occurs.

There are different kinds of sectors
that being used in protecting the
disk from being copied.

BAD or MISSING SECTOR: this error
is occurred when junk data is written
into the sector header.

CRC ERROR SECTOR: this error is
occurred when the CRC status at the
end of a sector is checked, when
these bytes do not match with the
data that being read from the sector
a CRC error will occur.

DOUBLE SECTOR: this is occurred when
two or more sectors have the same
id number, if you will read the
sector you will get different sets of
data.

SHORT SECTOR: short sector is a
sector with less then 128 bytes.

FUZZY OR PHANTOM SECTOR: when reading
this sector you will get a CRC error
and random data set.

DELETED DATA MARK SECTOR: this
sector is a good sector but the data
type flag had been changed to
reflect a bad data mark.

it is almost impossible to control
and change the sector header with an
unmodified disk drive.

Well that's all what i can say about
the sector, please forgive me if i
missed something.
