Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!mips!news.cs.indiana.edu!purdue!smb From: smb@cs.purdue.EDU (Scott M. Ballew) Newsgroups: comp.sys.atari.8bit Subject: Re: Copy Protection Scheme Message-ID: <14288@medusa.cs.purdue.edu> Date: 12 Apr 91 13:34:36 GMT References: <40060005@hpopd.pwd.hp.com> Sender: news@cs.purdue.EDU Reply-To: smb@tristram.cs.purdue.edu (Scott M. Ballew) Organization: Department of Computer Science, Purdue University Lines: 54 In article <40060005@hpopd.pwd.hp.com> simonh@hpopd.pwd.hp.com (Simon Hunt) writes: >Does anyone know how the disk was manufactured such that reading the same >sector gave TWO different, but CONSISTANT, sets of data? >Observations: > 1. The two sets of data NEED to be consistant to produce the correct code > when EOR'd together. > 2. It doesn't matter which order the data sets arrive in as EOR is > commutative. > 3. Reading the sector several times did not guarantee alternation of the > two data sets. > 4. There wasn't any provision for checking that the second read of the > sector had produced the OTHER data set. >What puzzles me is 3. and 4. Together they seem to imply that occasionally, >two consecutive reads of the sector would produce the same result which when >EOR'd together would, of course, produce a zero filled buffer. This in >turn would halt the program with the JSR call. However, in the numerous >times I have loaded and played the game in the past, I have NEVER seen this >happen.. it's always loaded fine. This is a very old copy protection scheme that relies on some timing properties of disk drives. Consider a single track of data which contains 18 sectors. These are normally numbered from 0 to 17 but are NOT in order around the disk surface. I forget what the optimal format is but basically, sector 1 is almost 180 degrees around the disk from sector 0 and then sector 2 is almost 180 degrees from sector 1, etc. This is because while the computer and disk drive transfer the data across the SIO cable, the disk is still spinning and it just so happens that it is almost 180 degrees later when the drive and computer are ready to read the next sector. Now, in the case you mention above, if you labeled two sectors with the same sector number in a track, which one you got would now depend on the timing of other reads around you. Various methods have used the idea that if you read the sectors in the order of say 0 - 1 - 3 - 1, then you got two different reads for sector 1. With what you describe, they are counting on the following fact: If I read a sector "1" from the track and immediately read another sector "1" from the track and these two sector "1"s are approx 180 degrees apart, I am all but guaranteed that I will get two different sets of data, ie., I will read both of the sector "1"s on the disk. As to how they did it, it is simply a matter of reprogramming the drive (not possible on a stock 810 or 1050) to format the disk in a different manner than the normal way. It turns out that Happy enhanced drives have been able to do this for some time and have absolutely no problem duplicating the format on the destination disk. By the way, you probably do not really have as many "unformatted" sectors as you think since if you have 18 sectors and renumber one of them to be a duplicate number, one of the 18 sector numbers will not exist so the drive will treat it as if it were unformatted. Scott M. Ballew