FORMAT.DOC 11/04/82 The purpose of this file is to document the structure of the format byte used by Lifeboat, North Star and perhaps others. The CP/M bios implemented by Lifeboat and North Star contains several Disk Parameter Blocks that describe the format of the disk per the CP/M Alteration Guide. The bios contains a logical decoder that determines which of the several supported formats a particular diskette is written in. It determines this by reading the 5CH byte on track 0, sector 0 which is the storage location for the format byte. After a determination of which Disk Parameter Block is applicable to the diskette, the address of the Block is written into the Disk Parameter Header ( also described in the CP/M Alteration Guide) for use by the BDOS in reading and writing of disks. Here is the structure of the format byte as in these implementations: bit 80H ;0 = single density, 1 = double density bit 40H ;0 = single sided, 1 = double sided bit 20H ;0 = format 1, 1 = format 2 bit 10H ;always set to 1 bit 8H ;not assigned bit 4H ;not assigned bit 2H ;0 = 48 track/in., 1 = 96 track/in. bit 1H ;always set to 0 (see below) In the North Star implementation of the bios the 1H bit is used in a special way as follows: If a 48 track/in diskette is mounted in a 96 track/in drive, the copy of the format byte that is stored at the end of the bios to indicate the format of the diskette mounted in a particular drive has its 1H bit set to 1. This allows the bios to use special code to be able to read 48 tpi data on a 96 tpi drive. Head is double stepped for each track. Also, side flipping is done at the right track based on this info. To accomplish this, the bios uses an NDRV byte to indicate which drives are 96 tpi in addition to the CONFG byte which is structured the same as in the North Star dos. The 20H bit provides for two alternate formats for each combination of the other bits. Thus, the format bytes used in either or both the Lifeboat and North Star Bios's are as follows: 10H single density, single sided, 48 tpi 90H double density, single sided, 48 tpi (format 1) B0H double density, single sided, 48 tpi (format 2) F0H double density, double sided, 48 tpi (format 2) QUAD F2H double density, double sided, 96 tpi (format 2) OCTAL In addition to these, there are two others possible: D0H double density, double sided, 48 tpi (format 1) QUAD D2H double density, double sided, 96 tpi (format 1) OCTAL The actual format for format 1 and format 2 will depend on the par- ameters contained in the Disk Parameter Block for each format byte and the use of format 1 and format 2 here is not meant to imply that they have the same meaning when applied to the different actual formats. See the file NEWFORM (NEWFRM). ASM for a use of the last two format bytes. RLP