Hacker News new | ask | show | jobs
by sowbug 2186 days ago
The Apple II's disk controller could easily write "flaky bits" in software. By telling the controller to write three or more consecutive zero bits, you'd produce a sector that read back unpredictably. So your copy protection scheme would be to turn off sector checksums and then read your test sector a few times in a row. If the sector came back identical each time, then you were likely a copy rather than an original.

After reverse-engineering the verification code in a few different games, I wondered how the publishers produced those weird sectors. I called them "weak bits," coincidentally, because my theory at the time was that they modded the disk head to write the bit weakly so that it couldn't distinguish a one from a zero during readback. A friend at school had a copy of Don Worth's Beneath Apple DOS, which absolutely blew my teenage mind. Until reading that book, I didn't think that any single human could understand and clearly explain a complex system so thoroughly.

2 comments

Interesting, I didn't know the Apple II's controller could write the combined data and clock bits. That's unfair :) I was also pointed to this Twitter thread where it is explained that they wrote Mr. Do weak bits with a hacked up Commodore 64 drive controlled by an Apple II!

https://twitter.com/JBrooksBSI/status/936476972611334147

I've also been referred to this which definitely belongs here. It's a write up of fairly advanced weak bits usage on the 1984 Apple II educational title "Kingdom of Facts".

https://ia800600.us.archive.org/2/items/TheKingdomOfFacts4am...