On Thu, 14 Sep 2017, Eric Christopherson via cctalk wrote:
Does interlace mean the same as interleave?

Usually.

But, each manufacturer develops their own terminology, so one thing can have different names in different companies, or different things can have the same name. For example, MS-DOS and 400K Mac have some similarities in their directory structure, including 2 copies of a linked list of 12 bit pointers starting in the second sector, (In MS-DOS, that is called the "File Allocation Table". What is it called on a Mac?) followed by an array of data structures that contain filename and the number of the location on disk of the first data block of the file. Q: With all of the possible data structures for a disk directory, why did they end up with ones almost identical? No, I do not think that it was because of obvious advantages over all other possible structure.


<pedantic>
INTERLACE/INTERLEAVE
When multiple sectors are read from a file and "put away", if you can process them quickly enough, then all of the sectors can be read in one revolution. But, what happens if the first sector is not completely processed before the disk rotation gets to the next sector? It will have to goallthe way around again to get to it. It's going to take one revolution per sector.
But, if you were to rearrange the sectors, instead of
1 2 3 4 5 6 7 8 9
instead arranging them as
1 6 2 7 3 8 4 9 5,
then you could read a sctor, and have the duration of the next sector to process it. If THAT is enough time, then you can read all of the sectors in two revolutions. If THAT is not enough time, then you could put two other sectors between the first and second, and read all of them in three revolutions. It's a lot longer than reading them all in one revolution, but a whole bunch quicker than taking one revolution per sector.

That is called "interlace" or "interleave".

Alternatively, you could leave the sectors in sequential order, but not put each data block of the file into the sector of the same number. Thus, you could put the first data block of the file into the first sector, but put the second data block of the file into the third sector, and the third data block of the file into the fifth sector. Again, if the time to read one sector is not long enough to process the incoming data, then you could skip two sectors before the next data block.

When you are analyzing an unfamiliar disk format, if you find that the sectors are not placed on the disk in sequential order, then you presumably have a physical interleave, and you just need to read the sectors in their sequential order, ignoring what sequence they physically are on the diskette.

If the sectors on the diskette are in sequential order, then either you have 1:1, or you may have a logical interleave. You need to look at sequential sectors and see whether the content seems to make sense in that order. Text files or source code are the easiest, of course. Look at the start and end of each sector, and see if you see "half a worm" - the first or last part of a word, and whether you can find the other half of it in another sector. With enough samples, you can determine the sequence.

System tracks and data tracks might not be the same interleave, sometimes not even the same number of sectors or density!

On double sided diskettes, the interleave is USUALLY the same on both sides, but not always, and sometimes you will encounter an interleave that uses a sector on one side followed by a sector on the other side, back and forth.


SKEW
It takes time to move from one cylinder to the next. Accordingly, after you read the last sector on one track, you might not be ready to read the first sector of the next track in time. Rearranging the sectors so that the first sector of the next track is not physically the first one can help with that. Of course, that means that the last sector of that track will no longer be the physically last one, so the next track will need to be changed, either further, or in some cases back to the previous sequence.

That is called "skew".


SIDE PATTERN
On a single sided disk, it makes sense that the tracks would be used in sequential order. There are a few rare exceptions, particularly on some of the formats where the directory is on a track in the middle of the disk.

It is much faster to switch sides, than it is to move to a different cylinder. Accordingly, it is efficient to use the sector on one track, and then change sides, and follow with the sectors on the other side. In some cases, each of those is considered to be a track. In some other cases, the sectors of both sides of the cylinder are considered together to be one long track. That often doesn't matter in data recovery, but becomes apparent if the interleave switches sides between sectors. Or, if the sector numbers on the second side don't restart, but are numbers continuing the count from the first side. Of course, the sector numbers on the second side need not have any relationship to the sector numbers on the first side, such as sector numbers starting with 1 on the first side, and starting with 129 on the second side.

BTW, Although track numbers start with zero, sector numbers often start with one, and sometimes with zero. Sometimes with a seemingly random number that might actually be an encoding to identify which of several formats that the manufacturer supports.

Head numbers, which are stored in the sector header of every sector, are traditionally zero for the first side and one for the second side. But, they don't have to be. WD 179x controllers can easily ignore the head number field, so it is not uncommon for the head number in the sector headers on the second side may also be zero! Or 16, or 128, . . . Fortunately, since the WD FDC can, and may, ignore that field, most of the formats with invalid head numbers on the second side, such as Kaypro!, don't mind if they are given a disk that happens to have the correct head numbers there. Thus, sometimes the process can be simplified by formatting a disk in the alien format on a PC, taking it back to that machine to copy files to that "pseudo" disk, and then bring it back as a disk of that format, but with valid head numbers. Especially if the manufacturer has chosen to not provide the user with a FORMAT program!


In some cases, a manufacturer may already have a successful format of single sided, and want to add double sided. In which case, they may make the tracks on the second side simply be MORE tracks following the tracks on the first side. It would seem that that would let a user with only a single sided system be able to read the first half of a double sided disk. Unfortunately, when files are written, erased, more files written, etc., a half full disk might not be all on the first side.

When the tracks of the second side follow the tracks of the first side, there are still complications. If the manufacturer changes the number of tracks, such as from 77 to 80, or 35 to 40, that will end up making a completely different format. Unlike alternating sides, where that only effects the total number of tracks.

Since the head is at the inside of the disk when finishing the first side, it would take time to bring it back out to the outer rim for the tracks of the second side. Therefore, some formats use tracks counting up the first side, and then use tracks on the second side, starting at the higher numbered (inner) and decrementing the track for the next.

If the second side is going to start at the outer rim (lower track number), then a decision has to be made whether to start at track zero, or skip a few tracks on the second side, to match the number of tracks that were skipped on the first side for the system tracks.

If a disk is more than half full ("less than half empty"?) then it is usually possible to figure out which sequence the tracks on the second side follow. If the sample disk to analyze is less than half full, or if it has many very small identical files, then it might not be possible to determine the side pattern.


WARNING: Sometimes a used disk from one machine might get reformatted single sided on another machine. If you encounter sectors numbered 1 through 10 on the first side, and 1 through 9 on the second side, or 512 bytes per sector on the second side, and something different on the first side, consider that it might have been a PC 360K disk that got reused (and partially reFORMATted single sided) on some other kind of machine! Likewise, different formats on tracks numbered 35 through 39, or on 70 or 77 through 79.

</pedantic>


I threw this together off the top of my head, and I have included MANY errors. Finding them is an exercise for the reader. I would especially appreciate it if Chuck, ARD, and Warner would identify corrections that need to be made. Unlike Zaphod Beeblebrox, my ego is less important than getting this accurate.

Reply via email to