This is a tech-heavy question that I'm mainly asking Nifflas here - but maybe someone else knows something that may help?
I have been experimenting with WINE lately and have had mixed results getting the games here to run on Mac. Knytt, Knytt Stories and Within A Deep Forest run perfectly after installing the Microsoft Visual C++ runtime libraries to the WINE environment. However, I can't seem to get any of the Saira, NightSky or NightSky's Setting's exes to work. They all load, and will even play music - but the window never draws anything to it, rendering them useless.
They all have the same set of errors generated in the WINE log, and I'm trying to narrow down what the problem is exactly so that I can explain it on the WINE boards and such. It seems to do with the Direct 3D drawing system... but that's as far as I've gotten so far.
I *have* found a series of patterns in the error logs, however - and was wondering if anyone could provide some insight as to what is new in Saira / NightSky that could be causing them.
So, here we go...
First, the log spits out:
fixme:win:EnumDisplayDevicesW ((null),0,0x33f68c,0x00000000), stub!
fixme:win:EnumDisplayDevicesW ((null),0,0x33f7ac,0x00000000), stub!
Then it goes into a loop which has something to do with failing to create draw contexts. Each iteration of the loop varies. First there is an error that looks like:
wine[99527] <Error>: unknown error code: invalid drawable
The *first* iteration of this loop is accompanied by:
wine[99527] <Error>: kCGErrorFailure: Set a breakpoint @ CGErrorBreakpoint() to catch errors as they are logged.
Then the loop goes on...
set off screen: invalid drawable
err:d3d:context_set_current Failed to make GL context *CONTEXTADDR* current on device context 0x6bc, last error 0.
err:d3d:context_create Cannot activate context to set up defaults
Where "CONTEXTADDR" changes with each iteration.
If this is not the first iteration of the loop, this is followed by:
err:d3d:context_release Failed to restore GL context *PREVCONTEXTADDR* on device context 0x6bc, last error 0x7d0.
Where "PREVCONTEXTADDR" is the context address used in the *last* iteration of the loop.
Then the loop branches into one of four directions. Sometimes it just continues past this point, but the other times one of the following sets of errors is generated:
fixme:d3d:getFormatDescEntry Can't find format WINED3DFMT_R24_UNORM_X8_TYPELESS(73) in the format lookup table
fixme:d3d:getDepthStencilBits Unsupported stencil format: WINED3DFMT_UNKNOWN
Or
err:d3d:WineD3D_ChoosePixelFormat Can't find a suitable iPixelFormat
Or, if it is the last time going through the loop:
err:d3d:WineD3D_ChoosePixelFormat Can't find a suitable iPixelFormat
This is always followed by the following log:
path: *SEQUENTIALADDR*
Where "SEQUENTIALADDR" goes up by an arbitrary amount with each loop
Finally, the loop again branches - this time in three directions. Sometimes it just continues past this point, but roughly half the time the following error is generated:
err:d3d:context_create wglShareLists(0x0, *NEXTCONTEXTADDR*) failed, last error 0.
Where "NEXTCONTEXTADDR" is the context address used in the next iteration of the loop.
If it happens to be the *last* iteration of the loop, this branch instead produces:
fixme:msvcr90:__clean_type_info_names_internal (0x3d89a0) stub
fixme:msvcr90:__clean_type_info_names_internal (0x78507750) stub
In practice, this looks like this (NightSky used in example):
Monday, January 10, 2011 8:02:03 PM America/New_York
fixme:win:EnumDisplayDevicesW ((null),0,0x33f68c,0x00000000), stub!
fixme:win:EnumDisplayDevicesW ((null),0,0x33f7ac,0x00000000), stub!
path: 62387_0x400129
Mon Jan 10 20:02:26 new-host.home wine[99527] <Error>: unknown error code: invalid drawable
Mon Jan 10 20:02:26 new-host.home wine[99527] <Error>: kCGErrorFailure: Set a breakpoint @ CGErrorBreakpoint() to catch errors as they are logged.
set off screen: invalid drawable
err:d3d:context_set_current Failed to make GL context 0x1e4b08 current on device context 0x6bc, last error 0.
err:d3d:context_create Cannot activate context to set up defaults
path: 62387_0x40012a
Mon Jan 10 20:02:26 new-host.home wine[99527] <Error>: unknown error code: invalid drawable
set off screen: invalid drawable
err:d3d:context_set_current Failed to make GL context 0x1e4ba8 current on device context 0x6bc, last error 0.
err:d3d:context_create Cannot activate context to set up defaults
err:d3d:context_release Failed to restore GL context 0x1e4b08 on device context 0x6bc, last error 0x7d0.
fixme:d3d:getFormatDescEntry Can't find format WINED3DFMT_R24_UNORM_X8_TYPELESS(73) in the format lookup table
fixme:d3d:getDepthStencilBits Unsupported stencil format: WINED3DFMT_UNKNOWN
path: 62387_0x40012b
err:d3d:context_create wglShareLists(0x0, 0x1e4c30) failed, last error 0.
Mon Jan 10 20:02:26 new-host.home wine[99527] <Error>: unknown error code: invalid drawable
set off screen: invalid drawable
err:d3d:context_set_current Failed to make GL context 0x1e4c30 current on device context 0x6bc, last error 0.
err:d3d:context_create Cannot activate context to set up defaults
err:d3d:context_release Failed to restore GL context 0x1e4ba8 on device context 0x6bc, last error 0x7d0.
path: 62387_0x40012c
Mon Jan 10 20:02:26 new-host.home wine[99527] <Error>: unknown error code: invalid drawable
set off screen: invalid drawable
err:d3d:context_set_current Failed to make GL context 0x1e4cb8 current on device context 0x6bc, last error 0.
err:d3d:context_create Cannot activate context to set up defaults
err:d3d:context_release Failed to restore GL context 0x1e4c30 on device context 0x6bc, last error 0x7d0.
err:d3d:WineD3D_ChoosePixelFormat Can't find a suitable iPixelFormat
path: 62387_0x40012d
err:d3d:context_create wglShareLists(0x0, 0x1de4e8) failed, last error 0.
Mon Jan 10 20:02:26 new-host.home wine[99527] <Error>: unknown error code: invalid drawable
set off screen: invalid drawable
err:d3d:context_set_current Failed to make GL context 0x1de4e8 current on device context 0x6bc, last error 0.
err:d3d:context_create Cannot activate context to set up defaults
err:d3d:context_release Failed to restore GL context 0x1e4cb8 on device context 0x6bc, last error 0x7d0.
err:d3d9:device_parent_CreateSwapChain (0x16ecec) CreateAdditionalSwapChain failed, returning 0x8876086a
err:d3d:IWineD3DDeviceImpl_Release Context array not freed!
path: 62387_0x40012e
fixme:msvcr90:__clean_type_info_names_internal (0x3f89a0) stub
fixme:msvcr90:__clean_type_info_names_internal (0x78507750) stub
Any ideas, anyone?