##4 **** PC99 SECTOR LAYOUT **** ============================ ' The info provided in the next two documents, Single and Double Density PC99 disk format, do not come from CaDD Electronics. I simply studied a little some PC99 disks, and wrote down my own docs. I included them in this document for your convenience. Please don't assume they are surely right. Paolo Bagnaresi: paolo_bagnaresi@libero.it ##4.1 **** SINGLE DENSITY PC99 DISK FORMAT **** ========================================= 9 sectors per track (0-8) 40 tracks (0-39) 2 sides (0-1) 720 total sectors 180 KBytes Format disk layout PC 99 Double Side/Single Density format layout is very similar to the standard pattern you would find on a normal diskette, formatted with a WD 1770-1772 chip in FM mode (Single Density). There are only minor differences, namely: 1) Start of track gap is shorter than normal: 16 bytes instead of the normal 40.'Start of track = 16 00 2) CRC is always F7,F7. On a normal diskette you would write just 1 F7 byte and that would create 2 CRC bytes. The value of these CRC bytes would depend on what you had written previously. Not so on a PC99 disk! You have to write 2 F7 bytes and, of course, then you will find your 2 F7 bytes.' 3) The After Data Gap is longer than normal: 45 FF bytes instead of 10.' 4) End of track gap is shorter than normal, 231 FF bytes instead of 369.' +------------------------------------------------------------- ' | Pre_ID gap = 6 00 ' | ID = 1 FE ID Address Mark ' Each | Track # = 1 .. Track # (00-39) ' sector | Side # = 1 .. Side # (00 or 01) ' (repeat | Sector # = 1 .. Sector # (0-8) ' for 9 | Sector length = 1 01 256 bytes/sector ' times) | CRC before Data = 2 F7 always F7 ' | Gap 1 before Data = 11 FF ' | Gap 2 before Data = 6 00 ' | Data Address Mark = 1 FB Data Address Mark ' | Data = 256 .. your real data, ' | or E5 if a blank disk! ' | After Data Gap = 45 FF ' +------------------------------------------------------------- ' 'End of track = 231 FF ' Used space Sector length = 334 bytes 334 x 9 sectors = 3006 bytes + 16 (start track) + 231 (end track) = 3253 bytes 3253 x 40 tracks x 2 sides = 260,240 bytes/disk. As a matter of fact, a PC99 disk DS/DD is 260,240 bytes. ___________________________________________________________________________ Note: (Not relevant for formatting, but important for copying purposes). Following the TI-99/4A convention, the logical sectors will first have to fill entirely the lower Side (Side 1). Further logical sectors have to go first to last track (the inner track) of Side 2. Next sectors will go backward, from the inner tracks to the outer tracks of side 2. The highest sectors will go to track zero of Side 2 Interleave: Interleave is 4:1 (+7) on both disk sides, while you are on the same track. At track shift, the starting sector is different and it depends on the side. On side 0, at track shift, the starting sector is +4 of the last sector on previous track, while on side 1 is +1. These data have been detected by close examination of files DSK1, DSK2, DSK3, WNY23B of PC99. See the table below. Side 0 Sector 0 = 0 7 5 3 1 8 6 4 2 1 = 6 4 2 0 7 5 3 1 8 2 = 3 1 8 6 4 2 0 7 5 3 = 0 7 5 3 1 8 6 4 2 4 = 6 4 2 0 7 5 3 1 8 . . . . . . . . . . . . 38 = 3 1 8 6 4 2 0 7 5 39 = 0 7 5 3 1 8 6 4 2 ________________________ Side 1 Sector 0 = 0 7 5 3 1 8 6 4 2 1 = 3 1 8 6 4 2 0 7 5 2 = 6 4 2 0 7 5 3 1 8 3 = 0 7 5 3 1 8 6 4 2 4 = 3 1 8 6 4 2 0 7 5 5 = 6 4 2 0 7 5 3 1 8 . . . . . . . . . . . . 37 = 3 1 8 6 4 2 0 7 5 38 = 6 4 2 0 7 5 3 1 8 39 = 0 7 5 3 1 8 6 4 2 The interleave (or the gap length) must be important on a PC99 diskette. One of the two have to be the method by which PC99 finds its sectors. On a real diskette, the start of a new sector is detected by the missing clock signal generated by the FE and FB values (ID Address Mark and Data Address Mark at format time). The missing clock is a very special signal to the disk drive head, and it is correctly understood by its logic: it means "something important is coming up. Watch out". On a PC 99 disk that method can't work. For instance, all the FB values are identical. They don't have a Missing Clock. How can PC99 understand that particular FB is not a simple data in the Data field of a sector? It simply can't. In order not to make mistakes, it must rely on the length of the gaps. For the above reasons, the format pattern shown above must used as it is, with no variation at all. ##4.2 **** DOUBLE DENSITY PC99 DISK FORMAT **** ============================================ 18 sectors per track (0-17) 40 tracks (0-39) 2 sides (0-1) 1440 total sectors 360 KBytes Format disk layout PC 99 Double Side/Double Density format layout is very similar to the standard pattern you would find on a normal diskette, formatted with a WD 1770-1772 chip in MFM mode (Double Density). There are only minor differences, namely: 1) Start of track gap (filled with 4E) is shorter than normal: 40 bytes instead of the normal 60. 2) CRC is always F7,F7. On a normal diskette you would write just 1 F7 byte and that would create 2 CRC bytes. The value of these CRC bytes would depend on what you had written previously. Not so on a PC99 disk! You have to write 2 F7 bytes and, of course, then you will find your 2 F7 bytes. 3) End of track gap is longer than normal, 712 4E bytes instead of 668. 'Start of track = 40 4E ' +-------------------------------------------------------------- ' | Pre_ID gap = 10 00 ' | First 3 A1 = 3 A1 ' Each | ID = 1 FE ID Address Mark ' sector | Track # = 1 .. Track # (00-39) ' (repeat | Side # = 1 .. Side # (00 or 01) ' for 18 | Sector # = 1 .. Sector # (0-8) ' times) | Sector length = 1 01 256 bytes/sector ' | CRC before Data = 2 F7 always F7 ' | Gap 1 before Data = 22 4E ' | Gap 2 before Data = 12 00 ' | Second 3 A1 = 3 A1 ' | Data Address Mark = 1 FB Data Address Mark ' | Data = 256 .. your real data, ' | or E5 if a blank disk! ' | CRC after data = 2 F7 always F7 ' | After Data Gap = 24 4E ' +-------------------------------------------------------------- ' 'End of track = 712 4E '___________________________________________________________________________ Used space Sector length = 334 bytes 334 x 9 sectors = 3006 bytes + 16 (start track) + 231 (end track) = 3523 bytes 3523 x 40 tracks x 2 sides = 260,240 bytes/disk. As a matter of fact, a PC99 disk DS/DD is 260,240 bytes. ____________________________________________________________________________ Note: (Not relevant for formatting, but important for copying purposes). Following the TI-99/4A convention, the logical sectors will first have to fill entirely the lower Side (Side 1). Further logical sectors have to go first to last track (the inner track) of Side 2. Next sectors will go backward, from the inner tracks to the outer tracks of side 2. The highest sectors will go to track zero of Side 2. Interleave: Interleave is 4:1 (+7) on both disk sides, while you are on the same track. At track shift, the starting sector is different and it depends on the side. On side 0, at track shift, the starting sector is +4 of the last sector on previous track, while on side 1 is +1. These data have been detected by close examination of files DSK1, DSK2, DSK3, WNY23B of PC99. See the table below. Side 0 Sector 0 = 0 7 5 3 1 8 6 4 2 1 = 6 4 2 0 7 5 3 1 8 2 = 3 1 8 6 4 2 0 7 5 3 = 0 7 5 3 1 8 6 4 2 4 = 6 4 2 0 7 5 3 1 8 . . . . . . . . . . . . 38 = 3 1 8 6 4 2 0 7 5 39 = 0 7 5 3 1 8 6 4 2 ________________________ Side 1 Sector 0 = 0 7 5 3 1 8 6 4 2 1 = 3 1 8 6 4 2 0 7 5 2 = 6 4 2 0 7 5 3 1 8 3 = 0 7 5 3 1 8 6 4 2 4 = 3 1 8 6 4 2 0 7 5 5 = 6 4 2 0 7 5 3 1 8 . . . . . . . . . . . . 37 = 3 1 8 6 4 2 0 7 5 38 = 6 4 2 0 7 5 3 1 8 39 = 0 7 5 3 1 8 6 4 2 The interleave (or the gap length) must be important on a PC99 diskette. One of the two have to be the method by which PC99 finds its sectors. On a real diskette, the start of a new sector is detected by the missing clock signal generated by the FE and FB values (ID Address Mark and Data Address Mark at format time). The missing clock is a very special signal to the disk drive head, and it is correctly understood by its logic: it means "something important is coming up. Watch out". On a PC 99 disk that method can't work. For instance, all the FB values are identical. They don't have a Missing Clock. How can PC99 understand that particular FB is not a simple data in the Data field of a sector? It simply can't. In order not to make mistakes, it must rely on the length of the gaps. For the above reasons, the format pattern shown above must used as it is, with no variation at all.