Profile picture
foone @Foone
, 25 tweets, 6 min read Read on Twitter
Fun fact: Lotus 1-2-3 2.01 comes on 5 disks, but they ship 6 of them.
They give you two copies of the System Disk, because it's very important, copy-protected, and any damage there makes the program unusable!

Now, guess which two of these disks have bad sectors?
correct, System Disk and Backup System Disk!
But hang on, there's something fishy going on here.
I tried to copy both of the System disks back to back.
They both have 10 bad sectors, right?
Look closer:

They both have THE SAME 10 bad sectors!
So this is not "oh no, these 32-year-old disks are failing". These disks are fine.
What this is is copy protection!
So they have 10 bad sectors on 'em. OK, so how does that work as copy protection?
Well, first of all, a simple disk-level copy will error out at these sectors. Nothing will copy, it'll just go "bad disk" and abort.
but a smarter disk-copier will let you continue, creating a new disk where those sectors are blank or F6 (the filler byte that FORMAT fills a disk with).
But here's the thing: you can't tell a drive "write a bad sector here".
That's impossible from standard PC drive controller. It's always going to write a valid sector. So no matter what value you put, it'll always succeed when Lotus 1-2-3 tries to read it back.
And that's how Lotus 1-2-3 can tell if it's a legitimate disk or not:
It checks these bad sectors, and if they succeed at being read, it knows the disk has been copied. It doesn't care what value is there, any value is wrong.
Lotus presumably had a specialized system for making these disks, which didn't use a standard disk controller.
You might also be able to create them manually if you wrote a custom format routine... and used it on a degaussed disk.
Cause if wipe a disk with a large magnet, all sectors become unreadable.
You then reformat it so that only the sectors you want to be readable are there, instead of all of them.
Although the normal BIOS formatting mechanism formats a whole track at a time.
That'd work for the errors we see on track 16 (you'd just have to not format track 16) but it looks like track 39 only has every other sector missing.
And it looks like that's just directly exposing what the 8272A/82078/82077SL/82077AA floppy controllers do, so you'd need a custom controller to be able to do this funky formatting.
BTW, I did mess up and say they had the same bad sectors: They don't. There's more bad sectors on the backup system disk.
They follow the same pattern, though, so I'm guessing that's used to tell the two disks apart?
BTW, there was a later, even more advanced form of copy protection related to this sort of thing: MISSING SECTORS.
Because these sectors are still physically on the disk, ie there is still some magnetic material there.
You could write to the disk and break your disk.
and maybe someone figures out a way to copy these. maybe they have a kryoflux or catweasel or some other hack that lets them write bad sectors.

So what if you change the scheme from failing on reading, to failing on writing?
if there was a tiny hole in the disk where the sector should be, that sector can be written to as many times as you like, and no data will be stored there. You can't store magnetic fields onto AIR, after all!
So some protected disks actually had a tiny hole cut through them with a laser.
The copy protection routine could then find that sector, and try to read it. That'd report a failure, which is expected. It'd then try to write it, and then read it back...
if the disk just has that sector unformatted, writing it and then reading it will succeed. Which means this is a copy, abort the program.
But if that part of the disk is physically missing? writing will succeed and reading will fail.
You'd think just write-protecting a copied disk would get around this, but no: if the disk is write protected, the floppy controller will notice and report a failure, rather than a success. So the program knows if it can't write, then something is wrong, and it's a copy.
BTW, if you're interested in the history of copy protection, @lazygamereviews did a neat video on the history of DRM/Copy Protection in computer gaming:
also I forgot about this OS/2 Museum article which explains much of the technique, but on the next release (R3)…
And @greatcodeholio points out that the format-a-track command on the PC floppy controller gets the sector-number-list from DMA, so you could possibly manually control which sector numbers get written and generate wrong ones to emulate bad sectors
Because you'd just have to set up your code to send sector 1, sector 99, sector 3, sector 99 (again), sector 5, sector 99, etc.
Then when the code tries to read sectors 1,2,3,4,5,6 it won't be looking for 99 and will ignore them.
I'm gonna have to kryoflux this disk and dig into the low-level formatting to see what's there, to tell if it has intentionally invalid sectors (custom controller) or nothing (custom formatting) or valid but wrong-id sectors (this trick)
I wonder if intentionally disabling the stepper motor on a drive would help, after pre-parking it over track 16?
Then the drive will always be reading/writing track 16, but thinking it can seek to other tracks.
So you could have it write track "0" into track 16.
Missing some Tweet in this thread?
You can try to force a refresh.

Like this thread? Get email updates or save it to PDF!

Subscribe to foone
Profile picture

Get real-time email alerts when new unrolls are available from this author!

This content may be removed anytime!

Twitter may remove this content at anytime, convert it as a PDF, save and print for later use!

Try unrolling a thread yourself!

how to unroll video

1) Follow Thread Reader App on Twitter so you can easily mention us!

2) Go to a Twitter thread (series of Tweets by the same owner) and mention us with a keyword "unroll" @threadreaderapp unroll

You can practice here first or read more on our help page!

Did Thread Reader help you today?

Support us! We are indie developers!

This site is made by just three indie developers on a laptop doing marketing, support and development! Read more about the story.

Become a Premium Member and get exclusive features!

Premium member ($30.00/year)

Too expensive? Make a small donation by buying us coffee ($5) or help with server cost ($10)

Donate via Paypal Become our Patreon

Thank you for your support!