Magnetic Disk Storage System

From Sinclair Wiki
Jump to navigation Jump to search

Magnetic Disk Storage System

Magnetic storage is a non-volatile storage of data.

The magnetic disk is a successor to magnetic tape. There are lot of common things: encoding, tracks, gaps, marks, etc. The magnetic tape is sequential media, but the disk is (quasi-)random access media.

A magnetic disk storage system practically divided into three part:

  • Disk controller
  • Disk drive
  • Disk(s)

There are two main magnetic disk storage system:

  • Fixed disk or Hard disk - disks are not removable
  • Floppy disk - disk is removable, the medium is changeable in the drive

Floppy disk storage

The parts of the system:

  • Floppy Disk Controller (FDC) - a high level interface between the CPU and the disk drive
  • Floppy Disk Drive (FDD) - the low level device for performing basic operations
  • Floppy Disk - the storage medium itself

Data recording

Data bits

Data is recorded on the magnetic media bit by bit with magnetic flux changes. Every data bit preceded by a clock bit. A magnetic transition represents a 1, a "not transition" a 0.

There are several encoding schema:

  • FM - Frequency Modulation - the clock bit always a 1 followed by the data bit (0 and 1 encoded as 10 and 11).
  • MFM - Modified Frequency Modulation - a zero is encoded as 10 if preceded by a zero, and 00 if preceded by a one; a one is always encoded as 01

Marked byte

MF and MFM coding can mark data bytes with missing clock bit. The storage format uses this marked bytes to mark the beginning of a track, header (id) and data block.

The low level format of a track

A track contains several area:

  • gaps between data blocks
  • sync areas (in order to data separator circuit can "lock" the clock bits and beginning of byte)
  • marks (index, id, data, deleted data)
  • data blocks
Index hole SYNC IAM GAP1 SYNC IDAM ID GAP2 SYNC DAM or DDAM DATA GAP3 ~ GAP4
FM O 6x #00 #FC* 26x #FF 6x #00 #FE* cyl head sec no crc crc 11x #FF 6x #00 #FB* or #F8* Nx data byte crc crc 20x #FF ... 8-300x #FF
MFM O 12x #00 3x #C2* #FC 50x #4E 12x #00 3x #A1* #FE cyl head sec no crc crc 22x #4E 12x #00 3x #A1* #FB or #F8 Nx data byte crc crc 40x #4E ... 16-600x #4E