Sector Interleave

Charles Anthony charles.unix.pro at gmail.com
Tue Dec 1 11:25:21 CST 2015


On Tue, Dec 1, 2015 at 9:09 AM, Paul Koning <paulkoning at comcast.net> wrote:

>
> > On Nov 30, 2015, at 8:39 PM, Johnny Billquist <bqt at update.uu.se> wrote:
> >
> > On 2015-12-01 02:19, Paul Koning wrote:
> >>
> >>> On Nov 30, 2015, at 8:12 PM, Johnny Billquist <bqt at Update.UU.SE>
> wrote:
> >>>
> >>> ...
> >>> DECtape never did interleaving that I know of.
> >>
> >> Sure it does.  The DOS format, which was adopted by RSTS, has 4 way
> interleaving.  If you write a 500 block file, it writes every 4th block
> forward, then fills in one set of gaps reverse, then forward and backward
> again, resulting in finally all blocks used.
> >>
> >> This is a software function, of course, and actually implemented in the
> file system, but it's certainly interleaving.  It doesn't apply to
> contiguous files (supported in DOS but not RSTS), which is why RSTS V4A
> sysgen with output to DECtape took so long -- writing a contiguous CIL
> file, in block order, madly seeking back & forth.
> >
> > Oh. You mean that the software decided to use blocks 0,4,8,12,...
> >
> > Yes, that would be doable. I was thinking of interleaving at the format
> level.
> >
> > But such interleaving means the software have to keep rather good track
> of things...
>
> True.  Interleaving, as described in this thread, is typically a software
> function; the software uses the blocks in an order different from the
> "ascending by 1" natural ordering.
>
> I suppose it's possible to do something like interleaving where
> consecutive sector addresses are not physically adjacent on the media.
> Come to think of it, that's exactly what the MSCP RX50 controllers do,
> since MSCP implements the mapping from LBA to physical addresses in the
> controller, not the host.  But in older systems where the controllers
> handle physical addresses and the mapping from LBA is in the driver,
> interleave is handled there (or above).
>
> A long time ago, I reverse-engineered an Atari 800/400 copy protection
scheme which was based on using multiple sectors with the same sector
number. Apparently the floppy controller put sector number information in a
date preamble when formatting the floppy. The scheme (somehow) overwrote
the preamble on some of the sectors, changing their number; the track
contained something like:

   1   2   3  4   5   6  7  4

This meant that a command to "read sector 4" would return whichever sector
4 passed under the head first. If you did 'read sector 2', 'read sector 4'
you would get the first one; 'read sector 6', 'read sector 4', you would
get the second.

Interleaving for obfustication, not efficiency.

-- Charles


More information about the cctalk mailing list