pl72ll65EPppPN17em OC694 DRIVE TYPES AND DISC FORMATSOC70 us40 and 80 Track Drivesue A 40 track drive is capable of moving it's head over 40 track positions, so a maximun of 40 tracks can be written to the disc. 40 track drives can pack 48 tracks into 1 inch across the surface of the disc, or 48 tracks per inch (48tpi). This means that 40 tracks occupy less than 1 inch across the surface of a disc. An 80 track disc drive is capable of moving it's head over 80 positions, so a maximum of 80 tracks can be written to the disc. 80 track drives can pack 96 tracks into 1 inch across the surface of the disc or 96 tracks per inch (96tpi). This means that 80 tracks occupy less than 1 inch across the surface of the disc. Because 80 track drives have twice as many tracks per inch, the hardware of the drive must be more precise. Consequently, 80 track drives are usually more expensive than 40 track drives. usSingle and Dual Drives ue A single drive means just 1 drive unit and a dual drive means 2 drive units. Both Single and Dual units can be single or double sided. usSingle sided and Double sided Drivesue A single sided drive means that only one side of the disc can be used, whereas a double sided drive means both sides can be used (provided the disc is double sided) usSingle Density and Double Densityue Single and double density is the ability of the FDC, not the drive or the disc, to write data on to the disc in FM (frequency modulation), or in MFM (modified frequency modulation). MFM can pack twice as many bytes on to a track as FM, but because of the overhead in gaps and CRC &c., the number of bytes used as data is not quite double. DFS uses 10 sectors per track, and ADFS (the double density system) uses 16. Double density discs should be used in a double density system. Quite often single density discs will work too, but these are less reliable than double double density discs. usWhat's on a track?ue Each track is divided into equal sized sectors, where the program data is stored. Each sector can store the same number of bytes, and will hold some, or all of the program, depending on its size. DFS uses 10 sectors per track and ADFS uses 16. Each sector on DFS and ADFS can store up to 256 bytes. A track contains not just the program data but lots of other information, which is not normally seen, although it is used every time the track is accessed. About 75% of the track contains program data, the rest contains information about the track, gaps and CRC bytes. usPost Index Gapue Usually called Gap 1., it is written starting from the index mark and consists of a specified number of &FF bytes followed by 6 bytes of 00's. The 00's are used during read and write operations to synchronize the data separation logic, with the data to be read from the ID field. The post index gap is written only when the track is formatted. usSector ID Fieldue This consists of 7 bytes and is written only when the track is formatted. The first byte is the ID address mark consisting of the data byte &FE. The next 4 bytes are the, track, head, sector, and length ID's respectively. These are used to indentiy a particular sector on subsequent read or write operations, the last 2 bytes are a 16bit CRC (cyclic redundancy check) od the first 5 bytes of this feild. The FDC can detect an ID CRC Field error from this CRC. usPost ID Field Gapue Usually called Gap 2. this, in FM, consists of 11 bytes of &FF and 6 bytes of &00. In MFM it consists of 22 bytes of &FF, 6 bytes of &00 and 3 bytes oif &a1. Gap 2 is written initially when the track is formatted. During subsequent write operations, the drive's write circuitry is enabled at byte 12 in FM and byte 23 in MFM and the six &00's are rewritten each time the sector is updated. During subsequent read operations, the last 6 bytes are used to synchronize the data separation logic with the incoming data field. usData Fieldue The length of the data field is determined when the track is formatted. DFS and ADFS use 256 bytes. The first byte of the data field is the data address mark which consists of byte &FB. When a deleted sector is to be written a deleted sector address mark is written which consists of the data byte &F8. The last two bytes of the data field are a 16 bit CRC. The FDC can detect a DATA Field CRC error from this CRC. usPost Data Field Gapue Usually called Gap 3., this is written when the track is formatted, and in FM consists of a selectable number of &FF bytes followed by 6 &00 bytes. In MFM it consists of a selectable number of &4E bytes. Gap 3 separates the precedingdata field from the next physical ID field on the track. Following a sector update operation, the drive's write logic is disabled during the first &FF bytes (&4E for MFM). Gap 3 is not written following the last physical sector on the track. usFinal Gapue Called Gap 4, is written when the track is formatted and consists of &FF's in FM and &4E's in MFM, extending from the last physical data field on the track to the end of the track. The sector ID Field, Post ID Field Gap, Data Field and Post Data Field Gap are repeated for each sector on the track. The Post Data Field is not written after the last physical sector. FIELD FM VALUE LENGTH MFM - VALUE LENGTH ============================================================ Post Index Field Gap (1) - &FF P - &4E P &00 6 ------------------------------------------------------------ ------------------------------------------------------------ Sector ID Field &00 12 &A1 3 ID Address Mark - &FE 1 - &FE 1 T/ID - Track 1 - Track 1 H/ID - Head 1 - Head 1 S/ID - Sector 1 - Sector 1 L/ID - Length 1 - Length 1 CRC - CRC 2 - CRC 2 ------------------------------------------------------------ Post ID Field Gap (2) - &FF 11 - &4E 22 - &00 6 - &00 12 - - &A1 3 ----------------------------------------------------------- Data Field Data Address Mark - &FB 1 - &FB 1 Data Bytes - Data Sector - Data Sector CRC - CRC 2 - CRC 2 ----------------------------------------------------------- Post Data Field Gap (3) - &FF P - &4E P - &00 6 ---------------------------------------------------------- Final Gap (4) - &FF - - &4E - (The length of the final field gap will depend upon the number of bytes per sector and the length of the program selectable gaps.) The number of bytes appearing as 'P' under the heading LENGTH are program selectable. The lengths are specified in the format command.The table shown above can be produced by typing *HELP TRACK. This is best done in mode 0 or 3. Using the READ TRACK DATA command it is possible to read all the bytes from a track and identify the different fields described above. Alternatively, examining the buffer after using the FORMAT command on a 1770 FDC system will reveal the exact format of the last track formatted. usDeleted Dataue Deleted Data or Deleted Sectors are sectors which have been marked as deleted so that they cannot be accessed by normal read and write sector commands. Physically the only difference between a deleted sector and a normal sector is the Data address Mark in the Data Field. usSkewue <<<<<<<<<<<<<<<<<<<<<<<<<<<<<< Skew is a physical offset of a sector on a track with the same logical sector on the next track. For example if a disc has sectors numbered 0-9 on track 0 with sector 0 as the first physical sector on the track, and track 1 has sectors 0-9, and the first physical sector is 1, then the disc has a skew of 1. The reason for offsetting the sectors like this is to minimize the access time due to the head stepping delay. In other words, by the time the drive head has stepped to the next track, the next sector to come under the drive head is the first logical sector to access next, in this example 0. DFS discs use a skew factor of 7, while ADFS discs use a skew factor of 0. usSector Interleavingue Sector interleaving is not necessary on the BBC or Electron systems. It is a similar technique to skew but for a different reason. Sector interleaving is the practice of selecting the order of sectors on a track to minimize the access time due to rotational delay. For example, instead of formating sectors 0-9 they could be formatted 0,3,6,9,2,5,8,1,4,7, usProtected Disc Formatsue There is nothing strange about the format of a protected disc, it is just different, like the format of an ADFS disc is different to the format of a DFS disc. Any format which is different to a normally formatted disc is classed as 'protected' and is unreadable by the normal disc filing system software. The FORMAT command and its parameters give a good indication as to how varied the formats can get. A protected disc will usually have a program on it which can read this different format. This is usually written in machine code to make it harder to read. All DFS protected discs must have at least 3 sectors which are normally formatted, since the disc must be BOOTable, ie run from SHIFT/BREAK. usProtected Disc Formats and the 1770 FDCue Although the 1770 FDC is very similar to the 8271 FDC it does not operate in exactly the same way and some discs which work with the 8271 won't work with the 1770. Software which addresses the 8271 directly will obvoiusly not work. Disc formats which use an incorrect Length ID in the sector ID field will also create problems. This is because the 1770 FDC reads the length of the sector from the Length ID, whereas the 8271 is supplied with the length by the read or write sector command, which may or may not be the same as the Length ID. Consequently if the 1770 thinks the size of the sector is 128 bytes, whereas it is really 256 bytes long, then only half the sector is read, and the FDC produces a Data Field CRC error. SP6