Home > CBM > Disk > Sector | |||
A physical sector is a region of a track of data on a disk. The number of sectors on a track varies by format between 5 and 26; the diagram below shows 5 sectors on a track. ![]() There are two types of sectors (sometimes called "blocks") which may appear on a CBM disk.
One is a "GCR"
sector; these are used by 8580, 1540, 1541, 1551, 1570, 1571 (and compatibles).
The other is an MFM
sector which is used by some 1571 CP/M formats and all sectors on a 1581 or CMD drive.
Note: a standard 1581 physical sector holds 2 blocks.
In my terminology, a sector is a PHYSICAL part of a disk... the operating system may split/combine physical sector(s) into a "block" (a logical concept).
A block, in Commodore terms, always holds 256 bytes of data (typical 254 bytes of user data preceded by a 2-byte file link).
For either GCR or MFM, a sector consists of 6 parts:
Even when a GCR sector holds a 256 byte block, the actual #bytes on the disk is way more than 256.
For example, the common GCR encoding of a sector actually uses 260 * 5 / 4 = 325 bytes of "data" (plus more for a sector header).
The 325 bytes are a special code (Group Code Recording = GCR) which adds some redundancy / synchronization for the hardware.
Those 325 bytes translate into 260 "internal" bytes (in the following order):
The other way to encode a sector, MFM, is more dynamic than the simple 5/4 expansion of GCR.
Standard GCR sectors always hold 256 bytes of file-stream data (a block), but MFM may hold one of: 128, 256, 512, or 1024 bytes.
For example 1581 and CMD disks store data in 512-byte sectors (in this case, a 256-byte block would need to be extracted from half a sector).
Some CP/M disks (usable by 1571) use 128-byte sectors (in this case, a 256-byte block would need to be assembled from two sectors).
Non-standard GCR sectors are used by some copy-protected software. Although they use a GCR code, they may not use the standard 5-to-4 encoding scheme. I've seen 3-to-2 and 2-1 encodings which are less effecient in terms of data storage, but are faster to process than the standard 5-to-4 scheme. © Hydrophilic.net, 2015, 2026 |