Page 1 of 1

What kind of copyright does the 1991 Lemmings disk use?

Posted: Mon Nov 16, 2020 9:00 am
by Videogamer555
I have the Lemmings (1991 version, I think this is the original) PC game on 3.5 inch floppy. Using it with my normal USB floppy drive (I don't have a KryoFlux) I notice I can access the disk in normal Windows explorer, and even copy files to my harddrive with no problem. The problem comes when I try to use disk dumping software to dump the raw sectors of the disk. Some of the sectors are unreadable, and depending on the software I'm using to dump, it may test each sector and dump only the good ones, or it may stop dumping altogether.

I suspect the problem isn't actually bad sectors, but rather a copy protection mechanism in place. I read somewhere that this game uses the "weak bits" method of copy protection. However, weak bits should be readable, just that when read, they will show different random data each time. Of course this feature isn't writable, but it should be readable, even on normal USB floppy hardware. Of course it can't be written, but it should be able to be read, but this disk has sectors that seem to not even be able to be read.

What kind of copy protection mechanism is that, that the sectors themselves are unreadable? I've done a lot of research on floppy disk copy protection, but nothing I can find online talks about a copy protection scheme where the sectors are unreadable.

Also, there are some folders on the disk, when viewing the A drive in Windows Explorer, that have some strange filenames, including graphical characters like solid boxes. I suspect these may have something to do with the copy protection mechanism involved. I've attached a screenshot of this to this post. And by the way, attempting to browse into one of those folders in Windows Explorer, triggers an error that says the location is not available.

If anybody here knows what kind of copy protection may be involved here, please let me know.

Re: What kind of copyright does the 1991 Lemmings disk use?

Posted: Mon Nov 16, 2020 10:49 am
by brightcaster
Sectors with weak bits get a crc error by design because you allways get different data and the checksum will never fit! So this sectors will show up bad and therefor can't be read with the usual routines...

The OS itself can only read sectors which are valid, otherwise it does some retries and after that pops up with a read error. So you can't read weak bit sectors without a special driver or direct floppy access!

David

Re: What kind of copyright does the 1991 Lemmings disk use?

Posted: Mon Nov 16, 2020 11:20 am
by Videogamer555
brightcaster wrote: Mon Nov 16, 2020 10:49 am Sectors with weak bits get a crc error by design because you allways get different data and the checksum will never fit! So this sectors will show up bad and therefor can't be read with the usual routines...

The OS itself can only read sectors which are valid, otherwise it does some retries and after that pops up with a read error. So you can't read weak bit sectors without a special driver or direct floppy access!

David
I ended up writing my own floppy dumping program for Windows to handle dumping this game, and using only normal Windows API functions, no custom drivers needed. And it works! I found that if I try 2 read operations on a bad sector, it ALWAYS reads it successful on the second read attempt, even if it failed on the first. Just for safety, I allow up to 3 reading attempts, and to skip that sector (not quit the dumping process) if it fails the 3rd attempt. However it has never failed on the 2nd attempt, so the 3rd attempt allowed in my program's code is just an extra safety net.

As for which sectors fail on the 1st attempt, sector 10 (assuming your sectors start with sector 1) ALWAYS fails the first reading attempt. Sectors between 10 and 100 fail randomly. For example, the first read attempt of sector 24 may fail the first time you dump the disk, requiring a second read to get it. But the second time you dump the disk it may read the sector on the first attempt. However, every time you try to dump the disk, sector 10 ALWAYS fails the first reading attempt, and requires a second reading attempt to read it.

I wonder what's going on with that?

By tye way. I've dumped the disk a couple times, and compared the dosk images, byte-by-byte using HxD hex editor's file comparison on the 2 disk images, and they are exactly the same, so no randomness in the data in the sectors once they are read correctly. I wonder how thst has to do with weak bits? Those should be random.
Also once read correctly, those sectors contained valid data (filenames of all the files on the disk, so I assume that's part of the disk's FAT). If they were intended to be weak, they never would contain real data.

It seems some other copyprotection technique may be in use here, and NOT the weak bits technique.

Anybody here know what copy protection technique this might be?

Re: What kind of copyright does the 1991 Lemmings disk use?

Posted: Mon Nov 16, 2020 1:12 pm
by brightcaster
If it can be read in the second or later attempt, it must be a different copy protection. Weak, flaky or fuzzy bits will produce errors!

BTW: Did you see this: viewtopic.php?t=1091

https://www.dosbox.com/comp_list.php?sh ... 2&letter=L

Re: What kind of copyright does the 1991 Lemmings disk use?

Posted: Mon Nov 16, 2020 10:30 pm
by Videogamer555
brightcaster wrote: Mon Nov 16, 2020 1:12 pm If it can be read in the second or later attempt, it must be a different copy protection. Weak, flaky or fuzzy bits will produce errors!

BTW: Did you see this: viewtopic.php?t=1091

https://www.dosbox.com/comp_list.php?sh ... 2&letter=L
What kind of copy protection would make it guarentied to work on the second read of these sectors (which in fact contains important FAT data for reading the files on the disk), but not on the first read? Is it some timing related copy protection? Despite the thread you pointed to saying weak bits were used, given my analysis, it seems that weak bits weren't used, but something else instead, as it is guarantied to work on the second read. Any idea what copy protection type this might be?

I hope to be able to document this, so as to add to the pool of knowledge of DOS game copy protections that are known to be used. If this is an as-of-yet unknown type of copy protection, it should certainly be documented.

Important Update:
I discovered something. The way I dumped the disk I mentioned before, while it did produce a correct disk image, able to be opened and viewed and used in any software that can handle disk images, the game itself won't run from this image. Whenever I try to run the Lemmings game in DOSBox, it says to insert the disk into drive A, even when using the disk image in emulated drive A. It seems that the game is looking for the glitch in the original PHYSICAL disk, and can't find it in the disk image, so it knows it's a copy and not the original. It seems that the disk image was a TOO correct (no glitches), as far as the game is concerned. So I guess the only thing I can do at this point is to patch the game's EXE file itself.

Re: What kind of copyright does the 1991 Lemmings disk use?

Posted: Tue Nov 17, 2020 10:43 am
by brightcaster
There's no need to patch the exe file! Just read the second link I provided for a solution as easy as possible...

David

Re: What kind of copyright does the 1991 Lemmings disk use?

Posted: Wed Nov 18, 2020 9:27 am
by ZrX
Lemmings uses extra sectors as protection.

Disk has 9 sectors of data per track, but the first 5 tracks on both sides have 12 sectors. 10th extra sector is a shorter sector. 11th and 12th sectors have the sector headers next to each others so sector 12 is inside sector 11 and they also overlap the first sector if read producing bad data.

So a rotation of those 10 tracks look like:
1--------2--------3--------4--------5--------6--------7--------8--------9--------10---1112-1--------2--------...

While normal tracks are laid out as:
1---------2---------3---------4---------5---------6---------7---------8---------9--------- 1--------2--------...