View Full Version : How to calculate angular distance between sectors?

March 30th, 2014, 23:34
First of all I should mention that I don't want to speak about getting backup from protected discs or defeating them. In fact I'm developing my own copy protection scheme and also my main issue isn't some concepts like protecting my protection against debugging, cracking, ...
The problem I faced is extract some physical features from discs (Data Position Measurement or DPM). I think the best one of these features is angular distance between sectors. So for this I first calculate RPM or revolution period (in CAV mode) then calculate time of seeking to sector 2000 from sector 150 for example and finally calculate angular distance between these sectors. Up to now everything is good. but when I run the program on my laptop DVD drive I get a degree and when I do this on my PC with a different CD and DVD drive I get completely different degrees!

What do you think? Why do I get different degrees with constant speed in different drives? How can I solve this problem?

March 31st, 2014, 21:48
How do you know they are both running at the same speed ?

Conjure up an ioctl to check them.


April 1st, 2014, 18:43
I think you're right. I sent scsi command to set speed but when I checked current read speed I figured out it's not the speed which I commanded (for one of my drive only). I don't know why but when I multiply sX by 177 instead of 150 everything is ok. I posted this on another forum too. As you know the correct and reference value is 150 KB/s for each X. Do you know why?

April 1st, 2014, 19:18
The speed of a disk is dictated by the laws of physics. The time you read with your program depends on the potency of the motor spinning the disk, the settings on the circuit that decide when the speed is "not at par but good enough to read" plus some unpredictable interrupts that may happen while reading sectors: Previous sector check-sum did not check, lets spin and read again, before reading next sector. . . All that beautiful adaptability of a system that works in less than a perfect world.

On the other hand, the RAW position of a sector (At least in hard drives) is determined by a finite, definite combination of 3-4 numbers, which are used at the very bare metal of the disk reading routine. The track, the sector number, . . those are constant regardless of the physics of the drive reader. . .

April 2nd, 2014, 10:00
People still release software on physical media??