Main index | Section 8 | 日本語 | Options |
Commands are implemented to query the current device density settings as well as the underlying device hardware as registered with the driver, to manipulate debugging levels, and to adjust the device density settings. All the operations that manipulate the kernel settings are restricted to the superuser (by the device driver), while all inquiry requests only require read access to device.
The device argument should always be given as a full path name, e.g.amp; /dev/fd0.
In order to add some descriptive text that makes the output better
human readable, the flag
Specifying flag
2.88M and 1.44M drives:
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1.2M drives:
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
720K drives:
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
360K drives:
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
The second form to specify a device density uses
sectrac , secsize , datalen , gap , ncyls , speed,heads , f_gap , f_inter , offs2 , flags
The meaning of the parameters is:
sectrac | |
The number of sectors per track. | |
secsize | |
The sector size code, 0 = 128 bytes (or less), 1 = 256 bytes, 2 = 512 bytes, 3 = 1024 bytes. | |
datalen | |
The actual sector size if the size code is 0, or the (ignored) value 0xFF for larger size codes. | |
gap | The length of the gap 3 parameter for read/write operations. |
ncyls | The number of cylinders. |
speed | The transfer speed in kilobytes per second. Can be 250, 300, 500, or 1000, but each drive type only supports a subset of these values. |
heads | The number of heads. |
f_gap | The length of the gap 3 when formatting media. |
f_inter | |
The sector interleave to be applied when formatting. 0 means no interleave, 1 means 1:1 etc. | |
offs2 | The offset of the sector numbers on side 2 (i.e., head number 1). Normally, sector numbering on both sides starts with 1. |
flags |
A list from one of the following flag values:
|
+mfm | Use MFM encoding. |
-mfm | Use FM (single-density) encoding. |
+2step | Use 2 steps per each cylinder (for accessing 40-cylinder media in 80-cylinder drives). |
-2step | Do not use 2 steps per cylinder, i.e., access each physical cylinder of the drive. |
+perpend | |
Use perpendicular recording (for 2.88 MB media, currently not supported). | |
-perpend | |
Use longitudinal recording. | |
For any missing parameter, the current value will be used, so only actual changes need to be specified. Thus to turn off a flag bit (like +mfm which is the default for all drive types), the form with a leading minus sign must explicitly be used.
$ fdcontrol /dev/fd0 1.44M
Same as above, but with verbose output. Note that the result is about the drive type, as opposed to a device density, so it is independent from the actual subdevice being used for device.
$ fdcontrol -v /dev/fd0 /dev/fd0: 1.44M drive (3.5" high-density)
Inquiry about the density settings:
$ fdcontrol -F /dev/fd0 18,512,0xff,0x1b,80,500,2,0x6c,1,0,+mfm
The verbose flag makes this human readable:
/dev/fd0: 1440 KB media type Format: 18,512,0xff,0x1b,80,500,2,0x6c,1,0,+mfm Sector size: 512 Sectors/track: 18 Heads/cylinder: 2 Cylinders/disk: 80 Transfer rate: 500 kbps Sector gap: 27 Format gap: 108 Interleave: 1 Side offset: 0 Flags <MFM>
As indicated, trailing commas in the parameter list may be omitted.
In order to access archaic 160 KB single-density (FM encoded) 5.25 media in a modern 1.2M drive, something like the following definition would be needed. (Note that not all controller hardware is actually capable of handling FM encoding at all.)
# fdcontrol -s 16,128,0x80,0x2,40,300,,0x10,,,-mfm,+2step /dev/fd1.1
It is still possible to hook up 8" drives to most modern floppy controllers, given the right cable magic. (On PC hardware, tell the BIOS that it is a 5.25" drive.) The classical 128/26/2/77 format can be read with this entry
fdcontrol -s 26,128,0x80,0x2,77,500,2,0x10,,,-mfm /dev/fd0
FDCONTROL (8) | April 7, 2017 |
Main index | Section 8 | 日本語 | Options |
Please direct any comments about this manual page service to Ben Bullock. Privacy policy.
“ | It's a UNIX system, I know this! | ” |
— Lex Murphy, Jurassic Park |