https://bugs.winehq.org/show_bug.cgi?id=40569
Michael Müller michael@fds-team.de changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |michael@fds-team.de
--- Comment #1 from Michael Müller michael@fds-team.de --- Created attachment 54476 --> https://bugs.winehq.org/attachment.cgi?id=54476 Hack to make game start (requires staging patch)
The backtrace is a bit misleading. The application fails to create a direct3d device and doesn't check for errors. The null pointer is then passed to d3d_material3_GetHandle resulting in the crash.
The creation of the device fails for two reasons. The application tries to create a render target in system memory which is only supported for the rgb emulation device / reference renderer on windows and not at all in Wine. Secondly the game tries to use a 8 bit surface as render target.
For the first problem (see bug 34906), Wine Staging contains a patch to work around this problem: https://github.com/wine-compholio/wine-staging/blob/master/patches/ddraw-Ren... The patch is not completely sufficient in this case as the game does not explicitly request a RGB device. I am not completely sure why this should work on windows, but there are different possible explanations (game expects a different ordering for ddraw devices, expects different d3d caps, ...). Anyway, I attached a hack which alters the patch to always allow creating render targets in system memory.
The second problem affects several older games as they expect that 8 bit surfaces can be used as render target. If I remember correctly, this is not possible with modern graphic cards and Wine therefore does not support it. You can easily add the necessary flags in the format array of Wine (see attached hack), but this will lead to some other issues as Wine does not properly handle color palettes for render targets. I have patches to fix some of them, but as long as Wine does not intend having support for P8 render targets at all, it does not make much sense to continue working on them.
The staging patch plus the attached hack are enough to make the game start and use the main menu.