http://bugs.winehq.org/show_bug.cgi?id=26459
Summary: Dragon Age: Origins doesn't recognize dvd? Product: Wine Version: 1.3.15 Platform: x86 OS/Version: Linux Status: NEW Severity: normal Priority: P2 Component: -unknown AssignedTo: wine-bugs@winehq.org ReportedBy: dank@kegel.com
This is a followon to bug 20887.
Installing Dragon Age goes ok (I do winetricks vcrun2005 physx first), but running the game fails with "Failed to authenticate the disk. Please insert the correct disk and try again."
Oddly, IIRC, installing from an .iso image works around this.
http://bugs.winehq.org/show_bug.cgi?id=26459
Cùran debian@carbon-project.org changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |debian@carbon-project.org
--- Comment #1 from Cùran debian@carbon-project.org 2011-07-12 02:04:08 CDT --- First of all: all my test/attempts were done with "Dragon Age: Origins Ultimate Edition", which includes most/all DLC, the expansion pack and automatically patches the game to 1.04 on a successful installation.
(In reply to comment #0)
Installing Dragon Age goes ok (I do winetricks vcrun2005 physx first),
AFAICT the winetricks stuff isn't required, at least not for the UE, as it installs both of the above named packages by itself (I wasn't asked whether I want to or not). What was required however, was to read the two DVDs in as ISOs and install from them, because if I tried to install directly from the DVDs, the setup failed at the "insert disc 2" step (there is a small message box asking you to insert the second disc and you can either click "retry" or "cancel", after inserting/mounting disc two and clicking "retry" nothing would happen except, that the message box appeared again, in one odd case the disc was actually ejected from the drive). @Dan Kegel: just FYI: winetricks games dragonage_ue didn't work either, with the DVDs
but running the game fails with "Failed to authenticate the disk. Please insert the correct disk and try again."
This bug is still there with Wine 1.3.24 for DA: O 1.04 as installed by the UE installer. And it doesn't matter whether I have run "wineticks physx vcrun2005 d3dx9" or not.
Oddly, IIRC, installing from an .iso image works around this.
Either you didn't remember this correctly or this isn't true for me with the UE (as you can see from the beginning of this post).
I'm not sure what kind of debugging channels or tests would be most helpful in getting to the core of this, thus I created a +all log ([0]). If I don't add any debugging channels I get six lines of output ([1]) and the message box [2] telling me, the disc couldn't be verified (if I try to start with the ISO mounted, it get a different message box, telling me, that the disc couldn't be found).
[0] http://dev.carbon-project.org/debian/wine.bugs/26459/DAO_fail_to_start_DVD_WINEDEBUG+all.log.xz [1] http://dev.carbon-project.org/debian/wine.bugs/26459/DAO_fail_to_start_DVD.log [2] http://dev.carbon-project.org/debian/wine.bugs/26459/DAO_error_message.png
http://bugs.winehq.org/show_bug.cgi?id=26459
--- Comment #2 from Cùran debian@carbon-project.org 2011-10-29 13:22:59 CDT --- Still there with 1.3.31.
The only change I can see when invoking DA:O is, that now only the "no FESL allocator defined" is printed on the console, the FIXMEs and ERRs from [1] in comment #1 are gone.
http://bugs.winehq.org/show_bug.cgi?id=26459
--- Comment #3 from Cùran debian@carbon-project.org 2012-01-15 11:32:25 CST --- And still there with 1.3.37
http://bugs.winehq.org/show_bug.cgi?id=26459
Anastasius Focht focht@gmx.net changed:
What |Removed |Added ---------------------------------------------------------------------------- Keywords| |obfuscation CC| |focht@gmx.net Summary|Dragon Age: Origins doesn't |Dragon Age: Origins DVD |recognize dvd? |authenticity checks fail | |(IOCTL_DVD_READ_STRUCTURE | |fails, structures in | |"ntddcdvd.h" need to be | |byte packed with no | |padding)
--- Comment #4 from Anastasius Focht focht@gmx.net 2012-01-21 05:22:10 CST --- Hello,
bought the game for a few bucks to look into it ;-) It seems there is a problem with packing size of structures.
While verifying the authenticity of original DVD, the game loader tries to retrieve the DvdPhysicalDescriptor using IOCTL_DVD_READ_STRUCTURE.
--- snip --- 0009:Call KERNEL32.DeviceIoControl(0000009c,00335140,0032e510,00000011,36518b90,00000804,0032e4f8,00000000) ret=00453065 0009:trace:cdrom:CDROM_DeviceIoControl 0x9c IOCTL_DVD_READ_STRUCTURE 0x32e510 17 0x36518b90 2052 0x32e400 0009:trace:cdrom:CDROM_Open 0, 6 0009:Ret KERNEL32.DeviceIoControl() retval=00000000 ret=00453065 ... 0029:Call user32.MessageBoxW(00000000,00aa8328 L"Failed to authenticate the disk. Please insert the correct disk and try again.",00aa83c8 L"Dragon Age: Origins",00000010) ret=004023dc --- snip ---
Winedbg:
--- snip --- =>0 0x7bc3247a CDROM_DeviceIoControl(hDevice=0x80, hEvent=0x0(nil), UserApcRoutine=(nil), UserApcContext=0x0(nil), piosb=0x33e49c, dwIoControlCode=0x335140, lpInBuffer=0x33e510, nInBufferSize=0x11, lpOutBuffer=0x36518b90, nOutBufferSize=0x804) [/home/focht/projects/wine/wine-git/dlls/ntdll/cdrom.c:2810] in ntdll (0x0033e464) 1 0x7b84011d DeviceIoControl+0x2fe(hDevice=0x80, dwIoControlCode=0x335140, lpvInBuffer=0x33e510, cbInBuffer=0x11, lpvOutBuffer=0x36518b90, cbOutBuffer=0x804, lpcbBytesReturned=0x33e4f8, lpOverlapped=(nil)) [/home/focht/projects/wine/wine-git/dlls/kernel32/file.c:2423] in kernel32 (0x0033e4c4) ... 3093 sz = sizeof(DVD_LAYER_DESCRIPTOR); Wine-dbg>n 3094 if (lpInBuffer == NULL || nInBufferSize != sizeof(DVD_READ_STRUCTURE)) status = STATUS_INVALID_PARAMETER; --- snip ---
The app passes 17 for DVD_LAYER_DESCRIPTOR structure size. Due to default structure padding/member alignment, Wine's "sizeof(DVD_LAYER_DESCRIPTOR)" will be larger hence the ioctl gets rejected.
Source:
http://source.winehq.org/git/wine.git/blob/750e7e072cd8bb36921545cb2beea9a6c...
All structures in "ntddcdvd.h" need to be byte packed with no padding (#include <pshpack1.h> [...] #include <poppack.h>).
Though with that fix and IOCTL_DVD_READ_STRUCTURE actually returning data it still doesn't pass the game authenticity checks due to other bugs.
I'll file them as separate bugs.
Regards
http://bugs.winehq.org/show_bug.cgi?id=26459
Anastasius Focht focht@gmx.net changed:
What |Removed |Added ---------------------------------------------------------------------------- Blocks| |29667
http://bugs.winehq.org/show_bug.cgi?id=26459
--- Comment #5 from Dan Kegel dank@kegel.com 2012-01-21 15:17:59 CST --- Created attachment 38483 --> http://bugs.winehq.org/attachment.cgi?id=38483 Test app source code
The attached program gives different results when compiled with the WDK and with wine:
-sizeof(struct _DVD_COPY_PROTECT_KEY) is 24 +sizeof(struct _DVD_COPY_PROTECT_KEY) is 32 sizeof(struct _DVD_RPC_KEY) is 4 sizeof(struct _DVD_ASF) is 4 sizeof(struct _DVD_REGION) is 4 -sizeof(struct DVD_READ_STRUCTURE) is 17 -sizeof(struct _DVD_LAYER_DESCRIPTOR) is 17 +sizeof(struct DVD_READ_STRUCTURE) is 24 +sizeof(struct _DVD_LAYER_DESCRIPTOR) is 20 sizeof(struct _DVD_COPYRIGHT_DESCRIPTOR) is 4 sizeof(struct _DVD_DISK_KEY_DESCRIPTOR) is 2048 -sizeof(struct _DVD_BCA_DESCRIPTOR) is 4 +sizeof(struct _DVD_BCA_DESCRIPTOR) is 1 sizeof(struct _DVD_MANUFACTURER_DESCRIPTOR) is 2048
It also exposed the curious fact that DVD_READ_STRUCTURE is defined in WDK 7.1 without a leading _; I had to remove that to get the test to compile with the WDK.
(I suspect the DVD_BCA_DESCRIPTOR difference doesn't matter; nobody should be taking the size of that struct.)
I'll send a patch.
http://bugs.winehq.org/show_bug.cgi?id=26459
Anastasius Focht focht@gmx.net changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution| |FIXED Regression SHA1| |b94fabfb5bfe9a19af22b9e28f7 | |b6176ab1de00a
--- Comment #6 from Anastasius Focht focht@gmx.net 2012-01-24 14:52:14 CST --- Hello,
thanks, fixed by commit http://source.winehq.org/git/wine.git/commitdiff/b94fabfb5bfe9a19af22b9e28f7...
Regards
http://bugs.winehq.org/show_bug.cgi?id=26459
--- Comment #7 from Dan Kegel dank@kegel.com 2012-01-24 15:39:29 CST --- Thank you for looking into it!
http://bugs.winehq.org/show_bug.cgi?id=26459
Alexandre Julliard julliard@winehq.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |CLOSED
--- Comment #8 from Alexandre Julliard julliard@winehq.org 2012-01-27 14:16:29 CST --- Closing bugs fixed in 1.4-rc1.
http://bugs.winehq.org/show_bug.cgi?id=26459
Nikolay Sivov bunglehead@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Fixed by SHA1| |b94fabfb5bfe9a19af22b9e28f7 | |b6176ab1de00a Regression SHA1|b94fabfb5bfe9a19af22b9e28f7 | |b6176ab1de00a |