Group coded recording
In computer science, group coded recording or group code recording refers to several distinct but related encoding methods for magnetic media. The first, used in bpi magnetic tape since 1973, is an error-correcting code combined with a run length limited encoding scheme, belonging into the group of modulation codes. The others are different mainframe hard disk as well as floppy disk encoding methods used in some microcomputers until the late 1980s. GCR is a modified form of a NRZI code, but necessarily with a higher transition density.
GCR for magnetic tape
Group coded recording was first used for magnetic tape data storage on 9-track reel-to-reel tape. The term was coined during the development of the IBM 3420 Model 4/6/8 Magnetic Tape Unit and the corresponding 3803 Model 2 Tape Control Unit, both introduced in 1973. IBM referred to the error correcting code itself as "group coded recording". However, GCR has come to refer to the recording format of bpi tape as a whole, and later to formats which use similar RLL codes without the error correction code.In order to reliably read and write to magnetic tape, several constraints on the signal to be written must be followed. The first is that two adjacent flux reversals must be separated by a certain distance on the media. The second is that there must be a flux reversal often enough to keep the reader's clock in phase with the written signal; that is, the signal must be self-clocking and most importantly to keep the playback output high enough as this is proportional to the density of flux transitions. Prior to bpi tapes, bpi tapes satisfied these constraints using a technique called phase encoding, which was only 50% efficient. For bpi GCR tapes, a RLL code is used, or more specifically a block code. This code requires five bits to be written for every four bits of data. The code is structured so that no more than two zero bits can occur in a row, either within a code or between codes, no matter what the data was. This RLL code is applied independently to the data going to each of the nine tracks.
Of the 32 five-bit patterns, eight begin with two consecutive zero bits, six others end with two consecutive zero bits, and one more contains three consecutive zero bits. Removing the all-ones pattern from the remainder leaves 16 suitable code words.
The bpi GCR RLL code:
11 of the nibbles have their code formed by prepending the complement of the most significant bit; i.e. abcd is encoded as abcd. The other five values are assigned codes beginning with 11. Nibbles of the form ab00 have codes 11ba, i.e. the bit reverse of the code for ab11. The code 0001 is assigned the remaining value 11011.
Because of the back then extremely high density of bpi tape, the RLL code is not sufficient to ensure reliable data storage. On top of the RLL code, an error-correcting code called the Optimal Rectangular Code is applied. This code is a combination of a parity track and polynomial code similar to a CRC, but structured for error correction rather than error detection. For every seven bytes written to the tape, an eighth check byte is calculated and written to the tape. When reading, the parity is calculated on each byte and exclusive-ORed with the contents of the parity track, and the polynomial check code calculated and exclusive-ORed with the received check code, resulting in two 8-bit syndrome words. If these are both zero, the data is error free. Otherwise, error-correction logic in the tape controller corrects the data before it is forwarded to the host. The error correcting code is able to correct any number of errors in any single track, or in any two tracks if the erroneous tracks can be identified by other means.
In newer IBM half-inch 18-track tape drives recording at bpi, GCR was replaced by a more efficient modulation code, mapping eight bits to nine bits.
GCR for hard disks
In the mid 1970s, Sperry Univac, ISS Division was working on large hard drives for the mainframe business using group coding.GCR for floppy disks
Like magnetic tape drives, floppy disk drives have physical limits on the spacing of flux reversals.Micropolis
Offering GCR-compatible diskette drives and floppy disk controllers, Micropolis endorsed data encoding with group coded recording on 5¼-inch 100 tpi 77-track diskette drives to store twelve 512-byte sectors per track since 1977 or 1978.Micro Peripherals
marketed double-density 5¼-inch disk drives and a controller solution implementing GCR since early 1978.Durango
The Durango Systems F-85 used single-sided 5¼-inch 100 tpi diskette drives providing 480 KB utilizing a proprietary high-density 4/5 group coded encoding. The machine was using a Western Digital FD1781 floppy disk controller, designed by a former Sperry ISS engineer, with 77-track Micropolis drives. In later models such as the Durango 800 series this was expanded to a double-sided option for 960 KB per diskette.Apple
For the Apple II floppy drive, Steve Wozniak invented a floppy controller which imposed two constraints:- Between any two one bits, there may be a maximum of one zero bit.
- Each 8-bit byte must start with a one bit.
,
Close to a month prior to the shipment of the disk drive in spring 1978, Wozniak realized that a more complex encoding scheme would allow each eight-bit byte on disk to hold five bits of useful data rather than four bits. This is because there are 34 bytes which have the top bit set and no two zero bits in a row. This encoding scheme became known as 5-and-3 encoding, and allowed 13 sectors per track; it was used for Apple DOS 3.1, 3.2, and 3.2.1, as well as for the earliest version of :
,
Reserved GCR-codes: 0xAA and 0xD5.
Wozniak called the system "my most incredible experience at Apple and the finest job I did".
Later, the design of the floppy drive controller was modified to allow a byte on disk to contain up to one pair of zero bits in a row. This allowed each eight-bit byte to hold six bits of useful data, and allowed 16 sectors per track. This scheme is known as 6-and-2 encoding, and was used on Apple Pascal, Apple DOS 3.3 and ProDOS, and later with Apple FileWare drives in the Apple Lisa and the 400K and 800K 3½-inch disks on the Macintosh and Apple II. Apple did not originally call this scheme "GCR", but the term was later applied to it to distinguish it from IBM PC floppies which used the MFM encoding scheme.
,
Reserved GCR-codes: 0xAA and 0xD5.
Commodore
Independently, Commodore Business Machines created a group coded recording scheme for their Commodore 2040 floppy disk drive. The relevant constraints on the 2040 drive were that no more than two zero bits could occur in a row; the drive imposed no special constraint on the first bit in a byte. This allowed the use of a scheme similar to that used in bpi tape drives. Every four bits of data are translated into five bits on disk, according to the following table:Each code starts and ends with at most one zero bit, ensuring that even when the codes are concatenated, the encoded data will never contain more than two zero bits in a row. With this encoding at most eight one bits in a row are possible. Therefore, Commodore used sequences of ten or more one bits in a row as synchronization mark.
This more efficient GCR scheme, combined with an approach at constant bit-density recording by gradually increasing the clock rate and storing more physical sectors on the outer tracks than on the inner ones, enabled Commodore to fit 170 kB on a standard single-sided single-density 5.25-inch floppy, where Apple fit 140 kB or 114 kB and an FM-encoded floppy held only 88 kB.