Welcome to the new Woodmann RCE Messageboards Regroupment
Please be patient while the rest of the site is restored.

To all Members of the old RCE Forums:
In order to log in, it will be necessary to reset your forum login password ("I forgot my password") using the original email address you registered with. You will be sent an email with a link to reset your password for that member account.

The old vBulletin forum was converted to phpBB format, requiring the passwords to be reset. If this is a problem for some because of a forgotten email address, please feel free to re-register with a new username. We are happy to welcome old and new members back to the forums! Thanks.

All new accounts are manually activated before you can post. Any questions can be PM'ed to Kayaker.

How to calculate angular distance between sectors?

Interesting low-level stuff, operating system related issues, packer/vx acrobatics, drivers and non-newbie programming in general, including win32 assembly and whatever else.
Locked
DEEP CRACK
Junior Member
Posts: 2
Joined: Sun Mar 30, 2014 10:38 am

How to calculate angular distance between sectors?

Post by DEEP CRACK »

Hi
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?
Thanks
User avatar
Woodmann
Posts: 3605
Joined: Fri Jan 26, 2001 6:28 pm

Post by Woodmann »

How do you know they are both running at the same speed ?

Conjure up an ioctl to check them.

Woodmann
Learn Or Die.
DEEP CRACK
Junior Member
Posts: 2
Joined: Sun Mar 30, 2014 10:38 am

Post by DEEP CRACK »

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?
naides
Posts: 1655
Joined: Sat Jan 12, 2002 12:00 pm
Location: Planet Earth

Post by naides »

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. . .
User avatar
disavowed
Posts: 1290
Joined: Mon Apr 01, 2002 3:00 pm

Post by disavowed »

People still release software on physical media??
Locked