copy protection - was: Re: Is it time for playing games on WINE?

Zsolt Rizsanyi rizsanyi at myrealbox.com
Tue Nov 4 07:14:57 CST 2003


On Sunday 02 November 2003 03.58, Raphaël Junqueira wrote:
> > One other thought. At some point in time we will have to address copy
> > protection. I dont want to get into legal discussions and I dont intend
> > looking into it (yet), BUT would I be correct in saying that if someone
> > worked out the first point at which copy protection fails, and codes a
> > basic application which emulates this behaviour. Since this simple app
> > works on windows, then someone else could then work on getting the basic
> > program working under wine without being contaminated by knowledge of
> > the internals of the copy protection itself? If this is the case, it
> > would be a useful thing to put on the projects page. If the legality of
> > this is dodgy, forget it - there are always hacks around, its just
> > frustrating.
>
> For what i remember, copy protection is almost specific how cdrom windows
> driver work. We "only" have to completely emulate this behavior

AFAIK there is no problem with the cdrom handling. The problem is that copy 
protection is usually implemented in drivers (*.sys files), which cannot be 
loaded by wine.

If I remember correctly then Laurent Pincharts safedisk patch consisted of the 
next logical parts:
1. fix a process startup race - if the child process was created suspended, 
then some wineserver messages got overwritten by new messages.
2. add code to handle scsi cdrom ioctls (used by the copy protection to read 
some raw data from the cd).
3. return EXCEPTION_PRIV_INSTRUCTION instead of EXCEPTION_ACCESS_VIOLATION 
when a some exception was raised by the user
4. support shared memory beetween kernel space and user space  (see 
SharedUserData in ntddk.h)
5. implement SECDRV device handler

For all this to work it is necessary to set winver to nt40 (or some other from 
the nt line).

The current status is (AFAIK):
2 was committed to wine CVS.
The problems behind 1 and 3 were fixed in the meanwhile.
I have read a discussion about 4 on wine-devel. If I remember correctly it was 
aggreed that it should be added to wine sooner or later. But I dont see it 
yet in the CVS.

5 is the only part which is related to safedisc. The SECDRV device handler is 
implemented in the secdrv.sys file which comes with the copy protected CD. 
The problem is that wine can't load .sys files.
Laurent solved the issue by reimplementing the secdrv.sys in wine, but this 
brings fort the legal issues.

So this is what I think that the status of copy protection is. If I'm wrong 
somewhere then please correct me.

Regards
Zsolt




More information about the wine-devel mailing list