[Bug 29130] Where's Wally? The Fantastic Journey fails to recognize the CD in the drive (needs support for IOCTL_STORAGE_CHECK_VERIFY2)

wine-bugs at winehq.org wine-bugs at winehq.org
Mon Feb 6 16:49:20 CST 2012


http://bugs.winehq.org/show_bug.cgi?id=29130

Anastasius Focht <focht at gmx.net> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
                 CC|                            |focht at gmx.net
          Component|-unknown                    |ntdll
            Summary|Where's Wally? The          |Where's Wally? The
                   |Fantastic Journey fails to  |Fantastic Journey fails to
                   |recognize the CD in the     |recognize the CD in the
                   |drive                       |drive (needs support for
                   |                            |IOCTL_STORAGE_CHECK_VERIFY2
                   |                            |)
     Ever Confirmed|0                           |1

--- Comment #5 from Anastasius Focht <focht at gmx.net> 2012-02-06 16:49:20 CST ---
Hello,

confirming.
You can't really call this "copy protection" ;-)

--- snip ---
...
0028:Call KERNEL32.GetDriveTypeW(0032f8cc L"D:\\") ret=005f95c9
0028:Ret  KERNEL32.GetDriveTypeW() retval=00000005 ret=005f95c9
0028:Call KERNEL32.GetLastError() ret=005122c4
0028:Ret  KERNEL32.GetLastError() retval=000000ea ret=005122c4
0028:Call KERNEL32.CreateFileW(0032f434
L"\\\\.\\D:",80000000,00000003,00000000,00000003,00000000,00000000)
ret=005f7bb7
0028:Ret  KERNEL32.CreateFileW() retval=00000070 ret=005f7bb7
0028:Call
KERNEL32.DeviceIoControl(00000070,002d0800,00000000,00000000,00000000,00000000,0032f444,00000000)
ret=005f7be1
0028:trace:cdrom:CDROM_DeviceIoControl 0x70 IOCTL_CODE_2d0800 (nil) 0 (nil) 0
0x32f350
0028:trace:cdrom:CDROM_Open 0, 13
0028:fixme:ntdll:server_ioctl_file Unsupported ioctl 2d0800 (device=2d access=0
func=200 method=0)
0028:Ret  KERNEL32.DeviceIoControl() retval=00000000 ret=005f7be1
0028:Call KERNEL32.GetLastError() ret=005f7bea
0028:Ret  KERNEL32.GetLastError() retval=00000032 ret=005f7bea
0028:Call KERNEL32.CloseHandle(00000070) ret=005f7bf7
0028:Ret  KERNEL32.CloseHandle() retval=00000001 ret=005f7bf7 
...
0028:Call user32.MessageBoxW(00000000,008a20f8 L"Please insert the game disk in
the drive and try again.",008958c8 L"Where's Wally The Fantastic
Journey",00000010) ret=005f966c 
...
--- snip ---

0x2d0800 -> IOCTL_STORAGE_CHECK_VERIFY2

MSDN: http://msdn.microsoft.com/en-us/library/ff560538.aspx 

--- quote ---
IOCTL_STORAGE_CHECK_VERIFY2

Determines whether the media has changed on a removable-media device - the
caller has opened with FILE_READ_ATTRIBUTES. Because no file system is mounted
when a device is opened in this way, this request can be processed much more
quickly than an IOCTL_STORAGE_CHECK_VERIFY request.
Input Parameters

Input is identical to the input for IOCTL_STORAGE_CHECK_VERIFY.
Output Parameters

Output is identical to the output for IOCTL_STORAGE_CHECK_VERIFY.
I/O Status Block

I/O status is identical to the I/O status for IOCTL_STORAGE_CHECK_VERIFY. 
--- quote ---

Source:
http://source.winehq.org/git/wine.git/blob/f082eac97c3ec71de58eea85bb4de5a12b19f13f:/dlls/ntdll/cdrom.c#l2858

--- snip ---
2858     switch (dwIoControlCode)
2859     {
2860     case IOCTL_STORAGE_CHECK_VERIFY:
2861     case IOCTL_CDROM_CHECK_VERIFY:
2862     case IOCTL_DISK_CHECK_VERIFY:
2863         sz = 0;
2864         CDROM_ClearCacheEntry(dev);
2865         if (lpInBuffer != NULL || nInBufferSize != 0 || lpOutBuffer !=
NULL || nOutBufferSize != 0)
2866             status = STATUS_INVALID_PARAMETER;
2867         else status = CDROM_Verify(dev, fd);
2868         break;
2869 
2870 /* EPP     case IOCTL_STORAGE_CHECK_VERIFY2: */
2871 
--- snip ---

Adding IOCTL_STORAGE_CHECK_VERIFY2 to list of fallthroughs
(IOCTL_STORAGE_CHECK_VERIFY, ...), calling CDROM_Verify() allows to game to
recognize the disc.

Only simple file find is done on disc thereafter:

--- snip ---
0024:Call KERNEL32.GetDriveTypeW(0032f8cc L"D:\\") ret=005f95c9
0024:Ret  KERNEL32.GetDriveTypeW() retval=00000005 ret=005f95c9
0024:Call KERNEL32.GetLastError() ret=005122c4
0024:Ret  KERNEL32.GetLastError() retval=000000ea ret=005122c4
0024:Call KERNEL32.CreateFileW(0032f434
L"\\\\.\\D:",80000000,00000003,00000000,00000003,00000000,00000000)
ret=005f7bb7
0024:Ret  KERNEL32.CreateFileW() retval=00000068 ret=005f7bb7
0024:Call
KERNEL32.DeviceIoControl(00000068,002d0800,00000000,00000000,00000000,00000000,0032f444,00000000)
ret=005f7be1
0024:trace:cdrom:CDROM_DeviceIoControl 0x68 IOCTL_CODE_2d0800 (nil) 0 (nil) 0
0x32f350
0024:trace:cdrom:CDROM_Open 0, 13
0024:Ret  KERNEL32.DeviceIoControl() retval=00000001 ret=005f7be1
0024:Call KERNEL32.GetLastError() ret=005f7bea
0024:Ret  KERNEL32.GetLastError() retval=00000000 ret=005f7bea
0024:Call KERNEL32.CloseHandle(00000068) ret=005f7bf7
0024:Ret  KERNEL32.CloseHandle() retval=00000001 ret=005f7bf7
0024:Call KERNEL32.GetLastError() ret=005122c4
0024:Ret  KERNEL32.GetLastError() retval=00000000 ret=005122c4
0024:Call KERNEL32.FindFirstFileW(0032f6c4 L"D:\\Main\\Files\\eng\\Where's
Wally The Fantastic Journey.exe",0032f46c) ret=005f9618
0024:Ret  KERNEL32.FindFirstFileW() retval=00140290 ret=005f9618
0024:Call KERNEL32.FindClose(00140290) ret=005f9634
0024:Ret  KERNEL32.FindClose() retval=00000001 ret=005f9634 
--- snip ---

The game hangs at later point but that's a different bug, not related to "copy
protection".

Regards

-- 
Configure bugmail: http://bugs.winehq.org/userprefs.cgi?tab=email
Do not reply to this email, post in Bugzilla using the
above URL to reply.
------- You are receiving this mail because: -------
You are watching all bug changes.



More information about the wine-bugs mailing list