NetBSD-Users archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: noob Question: How to format a floppy on a USB floppy disk drive (on RPi 4) ?
Yes, the process for making a floppy useful to an OS is the same as any
other computer media.
The common "1.44" MB floppy is actually 2.0 MB (12 Mbits) worth of data.
However, a controller chip (usually an NEC 765 or equivalent) is used to
write certain patterns onto the diskette; for a standard 3.5" 1.44 floppy,
the 'formatter' writes 18 sectors per track, each sector is 512 bytes.
http://www.bitsavers.org/components/nec/_dataSheets/uPD765_App_Note_Mar79.pdf
These 'sectors' have extra info that the disk controller chip uses to
figure out where the actual data is; that is, each of those 18 sectors has
some info for synchronization, and also has the Sector Number. Even though
there is an 'index' pulse once per revolution that tells you where to start
looking for data, the controller chip scans the magnetic
domains/transitions (encoded as Modified FM, aka MFM) and finds the proper
sector it was commanded to. It then proceeds to read / write the data as
commanded on that sector.
The low-level format leaves the diskette with 18 sectors per track, and
there are a total of 80 tracks; there are also 2 read/write heads, one on
each side, so there are 36 tracks per 'cylinder' (a cylinder holds all the
sectors can can be read/written without moving the disk drive head).
36 sectors per cylinder x 80 cylinders = 2,880 sectors
Times 512 bytes per sector = 1,474,560 (formatted) bytes.
But yes, you're right, when you do
*# newfs_msdos -f 1440 /dev/rsd1a*
you get an MS-DOS filesystem, which is described here:
https://www.eit.lth.se/fileadmin/eit/courses/eitn50/Literature/fat12_description.pdf
And yes, sectors 0 through 32 are used up by the Filesystem (FAT1, FAT2,
and Root Dir); that means there are only 2880 - 33 = 2,847 sectors
(1,457,664 bytes) available for actual user data.
And, yes, one consequence is that since there are an odd # of sectors
available for user data, it is not possible to have 2 *identical* files
that completely fills up a diskette -- thanks for spotting my error on this
Home |
Main Index |
Thread Index |
Old Index