21

How did the vendors using copy protection create weak bits on the floppies?

This always fascinated me as a kid. I ended up finding a weak bit emulator that would intercept the floppy disk interrupt and substitute different values and would be configurable per game but that was clearly software.

11
  • 3
    I'm not going to make this an answer because it's so vague, but: specialised duplication machines that can maliciously write a flux transition exactly on a window boundary (or write areas at different strengths for the related fuzzy bits, or write at an arbitrary density, or ensure a specific spiral, or...). I'm optimistic someone else will be able to be more specific than "specialised duplication machines".
    – Tommy
    Commented Oct 4, 2018 at 19:47
  • 1
    @Tommy, I don't know the answer either, but I doubt that "spiral" is part of it. Floppy drives used open-loop stepper motors to position the heads. Even if the duplicator was capable of writing a spiral track, the consumer's drive would not be capable of following the spiral.
    – user10478
    Commented Oct 4, 2018 at 20:30
  • @besmirched by spiral I was referring to inter-track skew, which can be set up so that the read head effects what amounts to a quantised spiral; I didn't mean in the same manner as a CD or vinyl record.
    – Tommy
    Commented Oct 4, 2018 at 20:52
  • I am pretty convinced that the concept of "weak bits" on a floppy disk as "weak amount of magnetization", thus flipping bits on repeated reads as a means of copy protection is an urban legend (or at least a mis-interpretation of what's really done). While it might be technically possible, it's not something you could sustainably reproduce in mass production. What's done instead is try to write bits to the disk that violate the encoding rules and thus are returned as random when read back.
    – tofro
    Commented Oct 4, 2018 at 21:28
  • 1
    One trick that I used was to format a disk with duplicate sector ids. That was enough to confuse most disk copiers. Not an answer to your question, though.
    – Mick
    Commented Oct 5, 2018 at 1:22

2 Answers 2

25

"Weak bits" are a means of copy protection that generates areas on a disk that read back as random values, without the floppy disk controller actually detecting an error. When copying such a weak bit to a new disk with a standard FDC controller, it will end up as a distinct 0 or 1 depending on the random state that it was read in and never change as long as the disk remains intact. The copy protection check will repeatedly read such locations and check whether the bit value actually changes on repeated reads. Obviously, that check needs to be well hidden in the software, otherwise, it could easily be deactivated by malicious people.

The apparently common conception that this would be done with "weak magnetization" or a change in magnetic flux that is "smaller" than normal, is wrong. While this might theoretically be possible (ageing disks that can be read successfully after several re-tries seem to prove this), I very much doubt this could be reliably reproduced in mass-production of disks.

You can simply generate such weak areas by not formatting a specific track (or part of that track) on the disk at all. This will create a complete track of "weak bits" that are entirely unreadable by a normal FDC. Unfortunately, a software pirate can reproduce the same thing with a standard floppy disk controller by simply not formatting that track on his copied disk as well. So, this is maybe too simple.

What's instead done is described in detail in this article that describes in depth the analysis of a copy-protected game disk for the Atari ST (Dungeon Master) - scroll down about ⅔ of the page to where the action starts.

In a nutshell, the PLL on a disk drive controller relies on somewhat evenly spaced sync bits on the disk to sync its read window (that is, where it expects to be able to read a valid data bit) to the specific RPM of the drive. By deliberately placing some out-of-sync clock bits on the disk, placing a magnetic flux transition exactly where the FDC would assume a stable state and determine a data bit value, it can be confused so that it will in fact "read" a random value (within normal RPM variations of the drive it will either "see" a flux transition there or not). A standard floppy disk controller will not be able to write such a timing violation to the disk, thus not be able to copy the "weak" bit, but rather copy it as a "normal", non-changing bit. You need a disk controller that can record a raw MFM data stream, complete with its timing. So, weak bits are actually not "weak magnetization", but a violation of the MFM timing.

Standard disk copying machines will not use a standard floppy disk controller and simply copy the low-level MFM data stream with the standard-violating sync bits as-is. The master (at least the affected track) must obviously be written with a specific disk controller that can write such violations. Modern equipment like Kryoflux can do that, apparently. I would expect that back in the days similar equipment existed.

7
  • One piece of similar equipment was of course the Commodore Amiga.
    – Alan Cox
    Commented Oct 5, 2018 at 16:53
  • @AlanCox Hmm. Wouldn't bet on that - If you read the article I linked, Dungeon Keeper for the Amiga used the same copy protection scheme, even with an Atari ST-formatted track. I doubt they had used this scheme if the Amiga could simply copy it?
    – tofro
    Commented Oct 5, 2018 at 17:02
  • 4
    Let me rewrite that last comment more accurately. The Amiga can write almost anything. Copy gives the wrong impression. With the right commands and tight timing you can use the fact the hardware does almost all the processing in software (or with the blitter) to generate really strange disk I/O.
    – Alan Cox
    Commented Oct 5, 2018 at 23:09
  • If the bit patterns timings om disk are such that they can give either 0 or 1, it will invalidate the CRC. So it must be detected as a sector with CRC error.
    – Justme
    Commented Sep 13 at 15:37
  • @justme Yes, either "good" or "bad" - but you can't copy as "wobbly" when undergoing multiple reads.
    – tofro
    Commented Sep 13 at 16:02
6

The best copy protection is called “marching bits”. The transition is place at the window margin by using a write clock speed 10x faster than the actual playback clock on the floppy controller. This way each bit is actually written as 10 bits and allows for a production product accurate within a 25% window. Note floppy discs drives vary between units and within with flutter. However, using this technology allowed the creation of a hardware copy protection. The “protected” byte contains a bit that reads as a 1 in one of two bits because the bit is written on the window border. You cannot write this bit with a normal floppy disc controller because you cannot control where bits are written within the window. The software reads the byte 3 or more times and an allowable results is 1 bit shift between the 2 possible results. Also the sector CRC is not generated by the bytes written but part of the user SN. One very large company asked how a customer makes a backup copy. The answer: The disc is copy protected and NO copies can be made using a commercial floppy disc controller. Now game software companies loved this feature - no bootleg copies. Send in your old copy to receive a replacement. One of my favorites was a bootleg copy would appear to work expect you could never win because it ran a separate sub program to make you work very hard without ever advancing. When you called about the program not working you were identified as using stolen software.

4
  • 3
    When you called about the program not working you were identified as using stolen software. Well, that sort of "guilty until proven innocent" mindset isn't very good public relations. What about honest actors who had a floppy or two reserved for a copy of whatever they were currently playing to minimize wear and tear on their originals? ...or parents who did that because they didn't trust their kids with the originals?
    – ssokolow
    Commented Apr 15, 2020 at 22:26
  • 1
    On machines where the CPU reads out individual bytes, one can do even better by having some bytes be written somewhat fast and some written somewhat slow, and timing the arrivals of the bytes. Instead of merely having a pass/fail routine, one could have a routine which reads out one useful bit from each byte based upon timing.
    – supercat
    Commented Feb 14, 2022 at 18:58
  • @ssokolow: The better schemes were designed in such a way that validation of the copy protection would have two effects: (1) Prevent the program from stopping with an error message saying it can only be used with the original disk, and (2) adjusting some subtle aspect of the game's behavior, any failure which would result in incorrect game behavior would also show the message, but hacking the code to bypass the message wouldn't fix the errant game behavior.
    – supercat
    Commented Sep 13 at 22:31
  • @ssokolow Today companies with this mindset just use an always-online policy for their single-player games. Server overloaded? Bad for you. And when the sales no longer pay for server rental...
    – Therac
    Commented Sep 17 at 6:10

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .