Question about WINE and adding the "low-level" CD access APIs...

Robert Shearman R.J.Shearman at warwick.ac.uk
Mon Jul 14 14:22:25 CDT 2003


> Date: Mon, 14 Jul 2003 20:24:31 +0800
> From: Jonathan Wilson <jonwil at tpgi.com.au>
> To: wine-devel at winehq.com
> Subject: Question about WINE and adding the "low-level" CD access APIs...
>
> Many copy protections use special tricks on the CDs (I dont know the
> details). Presumably these protections use some kind of
> lower-level API to
> access the data on the CD directly (instead of going through the file I/O
> calls). Currently TransGaming does something specific for each
> kind of copy
> protection to make it work. Would it be possible to implement
> these APIs in
> WINE and have them redirect to whatever low level APIs are provided by
> linux/x/whatever? That way (assuming the implementation was
> complete), any
> copy protection would work (i.e. when the protection says "give
> me this bit
> of data from the CD in this form", WINE hooks that, gets the
> relavent data
> and returns it to the application.

I believe this can be done in ASPI, and has been already implemented. At
least this is how SafeDisc v1 worked.

> Same could be said for
> protections that
> use the "boot blocks" to store licence data (such as CDilla Licence
> Manager), for those you could hook the "read from boot block" and
> "write to
> boot block" calls and store the data somewhere (preferably not the real
> boot block :)

You would probably need to run Wine as root to do this (as you would need to
run the game as Administrator in WinNT), but the API's should be there.

> If someone can tell me what the low-level access that these
> protections use
> is actually called (i.e. what search term to use in MSDN to look for
> documentation etc) as well as info on whatever the relavent linux
> low-level
> access stuff would be, I can look at drawing up some kind of "here is how
> this could be done" document.

Again, I guess most protection methods (that would work on NT) would
probably use ASPI.

> Similar low-level hooks could be used to allow things like AudioCatalyst
> (program that converts audio-cd tracks to MP3 files) and anything
> else that
> does lower level access to CDs/DVDs than the high-level file I/O APIs and
> etc. (the day its possible to run Nero Burning Rom in WINE with
> no problems
> will be a great day indeed for the project :)

Well in that case, the great day was a while ago as I have already burnt a
CD in Nero (with version=Win2k). I'm not sure about AudioCatalyst but I see
no reason why our current ASPI implementation shouldn't work.

> If this isnt fesable for copy protection and so on, please explain why (I
> know nothing about copy protection or how to program the CD-ROM in win32)
> Basicly, I dont understand why there is a need for "protection-specific"
> code in WineX when you could emulate whatever the protection uses and
> appear just like real windows to the game...
>

Laurent Pinchart did a lot of work on this, but unfortunately a lot of it
wasn't accepted into the Wine tree. Though his patch is available at
http://www.winehq.com/hypermail/wine-patches/2002/04/0194.html. It may
require some major work to get it working now, as I believe some of the
hooks he used (in relation to NT kernel shared memory) have been removed
now. Note that I'm unsure the un-hackish parts weren't accepted, although a
good guess would be DMCA.

Rob





More information about the wine-devel mailing list