X-Authentication-Warning: delorie.com: mail set sender to djgpp-bounces using -f From: "arizvi" Newsgroups: comp.os.msdos.programmer,comp.os.msdos.djgpp Subject: Creating a copy protected floppy Date: 12 Jul 2005 13:22:11 -0700 Organization: http://groups.google.com Lines: 30 Message-ID: <1121199731.361001.326030@g43g2000cwa.googlegroups.com> NNTP-Posting-Host: 66.32.211.247 Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" X-Trace: posting.google.com 1121199737 24418 127.0.0.1 (12 Jul 2005 20:22:17 GMT) X-Complaints-To: groups-abuse AT google DOT com NNTP-Posting-Date: Tue, 12 Jul 2005 20:22:17 +0000 (UTC) User-Agent: G2/0.2 Complaints-To: groups-abuse AT google DOT com Injection-Info: g43g2000cwa.googlegroups.com; posting-host=66.32.211.247; posting-account=Se-Idg0AAAC00LEpjdiQS7ZeyWGDYpCA To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Reply-To: djgpp AT delorie DOT com Hi everyone, I am trying to create a copy-protected floppy for distributing my application. I searched online and decided on bit-counting as perhaps the best way for me to implement copy protection. A description of bit counting is given below: "Two disk drives do not turn at precisely the same speed. Even the same disk has small variations in its speed. When a disk is formatted, there is some empty space remaining on each track between the end of the last sector and the beginning of the first sector. The formatting program fills this space with meaningless bits. The size of the space (the number of bits), and therefore the total number of bits on the track, depends on the rotational speed of the disk drive. If the bits are counted, and the count is recorded somewhere else in the disk, the software can find if the disk is original or copied and can bail out." However, I dont know how to implement this feature. If I use bios calls to read a sector, I believe that I will read exactly 512 bytes or the size of a standard sector. This will defeat my attempt to find the exact # of bits on a track. Is there some code to get at the number of bits directly from the floppy drive controller? Or can I somehow use the standard bios calls to read the number of bits? Any help will be appreciated. Thanks, Ahmad Rizvi