OK, Not to get sappy or anything, but I think most wine users have a 'holy grail' application, an app that they would do almost anything to get working. Mine was a game from about 5 years back called Battlezone II. Wonderful game, one of my all time favs. I have spent the better part of 2 years trying to install and run it under wine. Every monthly release I would download fresh source, compile, test, always with varying degrees of success. I've googled for hours on end, tried every native dll imaginable, every tweak, every tip, every hint, sacrificed a few goats, prayed to the linux gods and pledged to give up my soul, but the game was never playable......
....until now.
Everything works. EVERYTHING. Graphics are flawless, with the exception of the fonts being a bit funky, but I can deal. Everything else is exactly as it should be. I was, frankly (and no insult intended), stunned.
So, thank you, everyone, all the devs, the testers, everyone, for doing what you do. (and for giving us linux gamers a little light at the end of the tunnel). I would have to say, from my single experience at least, that the 0.9 release has been well worth the wait, and has delivered in a way I didn't think possible.
I'll throw something in the appdb just as soon as I can figure out how to get a screenshot or two.
Randall Walls
On 10/28/05, Randall Walls rwalls@gwi.net wrote:
Not to get sappy or anything, but I think most wine users have a 'holy grail' application, an app that they would do almost anything to get working. Mine was a game from about 5 years back called Battlezone II. ... Everything works. EVERYTHING. Graphics are flawless, with the exception of the fonts being a bit funky, but I can deal. Everything else is exactly as it should be. I was, frankly (and no insult intended), stunned.
Hey, cool! That game uses my networking layer (http://kegel.com/anet). Nice to hear it works properly under Wine finally! - Dan
I think this particular patch: http://cvs.winehq.org/patch.py?id=20640 stopped the game from crashing right after the load screen :)
I'm curious though, when you say the graphics are flawless, does that include the "intro movie" at the start? For me it seems to get the first frame / background wrong. Note that the pattern used is the same as the one used for the initial X root window, but with the colors inverted.
Something else that's wrong, for me at least, is the fact that fog seems to be missing. I suspect this particular err indicates the reason: err:ddraw:set_render_state Unhandled dwRenderStateType D3DRENDERSTATE_RANGEFOGENABLE (00000030) value : 00000000 !
However, as far as I'm concerned neither of those are major issues, just the kind of stuff that makes the difference between "decent" and "great" support for an application.
No, I do have the same issue with the small intro movie as you do. I had not enabled fog for the moment so I can't confirm if that is an issue as well. The only other thing that I noticed is that the sound has some small 'pops' in it. My guess is that this may be the same issue described in the directsound mixer.c thread that Davin McCall seems to be working on.
Everything else though (with the exception of the fonts, I'm not sure if you can confirm that as well) is exactly as it should be. I can run with all the graphics options on max and I haven't had any graphical issues at all. Framerate is more than acceptable. When I first started the game I fully expected SOMETHING to be wrong... like the textures would be reversed or some of the models would be deformed or something. That was half the reason for my original e-mail. I played the game for about an hour and I kept waiting for something to break, but it ran, for the most part, flawlessly for that entire time and more.
The only other issue is upon exiting the game I get an 'error writing to address' that pops up in a separate window and I have to kill X and then log back in to get the proper resolution back.
Randall Walls
H. Verbeet wrote:
I think this particular patch: http://cvs.winehq.org/patch.py?id=20640 stopped the game from crashing right after the load screen :)
I'm curious though, when you say the graphics are flawless, does that include the "intro movie" at the start? For me it seems to get the first frame / background wrong. Note that the pattern used is the same as the one used for the initial X root window, but with the colors inverted.
Something else that's wrong, for me at least, is the fact that fog seems to be missing. I suspect this particular err indicates the reason: err:ddraw:set_render_state Unhandled dwRenderStateType D3DRENDERSTATE_RANGEFOGENABLE (00000030) value : 00000000 !
However, as far as I'm concerned neither of those are major issues, just the kind of stuff that makes the difference between "decent" and "great" support for an application.
The only other issue is upon exiting the game I get an 'error writing to address' that pops up in a separate window and I have to kill X and then log back in to get the proper resolution back.
No need to kill X to get back your resolution, just use 'xrandr' to set it back to what you want.
Lionel
However, as far as I'm concerned neither of those are major issues, just the kind of stuff that makes the difference between "decent" and "great" support for an application.
Could you raise a bug on bugzilla attaching a +ddraw trace so that I can take a look at it when I find the time ?
I tried to d/l the BZ2 demo but no site seems to host it anymore so I will be restricted to look at traces to find out what goes wrong :-)
Lionel
* On Sat, 29 Oct 2005, Lionel Ulmer wrote:
I tried to d/l the BZ2 demo but no site seems to host it anymore so I will be restricted to look at traces to find out what goes wrong :-)
That could not be! There is one nice site (only it is in russian language and contains heavy HTML/JS/GFX content), which offers demos, patches and intro movies to the most games. It is Absolute Gaming. [1]
In [2] you will find two download buttons. First one is for VIP only, and second one is public. Press it and on the next page you will find first link near the start of the russian explanation text.
Using AG I found old version of Gothic demo, which was unavailable on the inet otherwise. :-/
[1] http://www.ag.ru/ [2] http://www.ag.ru/files/demos/battlezone_2_combat_commander/2751
I found one at http://bzscrap.com/downloads/Demos/?C=D;O=A Didn't try it, though.
On 10/29/05, Saulius Krasuckas saulius2@ar.fi.lt wrote:
[1] http://www.ag.ru/ [2] http://www.ag.ru/files/demos/battlezone_2_combat_commander/2751
Also: http://download.activision.com/activision/battlezone2/demo/bzii_demo.exe
However, there are a few differences between the demo and the full game. For one, the demo crashes right after loading because it creates a couple of lights (more than MAX_LIGHTS), never checks the results, and then tries to use them. (On Windows you can create as much lights as you want, only the number of active lights is limited).
It doesn't have the intro movie either, but it might help with the fog.
H. Verbeet wrote:
On 10/29/05, Saulius Krasuckas saulius2@ar.fi.lt wrote:
[1] http://www.ag.ru/ [2] http://www.ag.ru/files/demos/battlezone_2_combat_commander/2751
Also: http://download.activision.com/activision/battlezone2/demo/bzii_demo.exe
However, there are a few differences between the demo and the full game. For one, the demo crashes right after loading because it creates a couple of lights (more than MAX_LIGHTS), never checks the results, and then tries to use them. (On Windows you can create as much lights as you want, only the number of active lights is limited).
IIRC, a patch fixing this problem was commited about 2 or 3 months ago.
It doesn't have the intro movie either, but it might help with the fog.
On 10/30/05, Christian Costa titan.costa@wanadoo.fr wrote:
IIRC, a patch fixing this problem was commited about 2 or 3 months ago.
This one? http://cvs.winehq.org/patch.py?id=18002
It doesn't touch CreateLight. The crash happens because of this check in GL_IDirect3DImpl_3_2T_1T_CreateLight:
if (fl == MAX_LIGHTS) { return DDERR_INVALIDPARAMS; /* No way to say 'max lights reached' ... */ }
The application is sloppy for not checking the result of course, but on Windows the call never fails, at least not for creating more lights than the hardware supports.
H. Verbeet wrote:
On 10/30/05, Christian Costa titan.costa@wanadoo.fr wrote:
IIRC, a patch fixing this problem was commited about 2 or 3 months ago.
This one? http://cvs.winehq.org/patch.py?id=18002
It doesn't touch CreateLight. The crash happens because of this check in GL_IDirect3DImpl_3_2T_1T_CreateLight:
if (fl == MAX_LIGHTS) { return DDERR_INVALIDPARAMS; /* No way to say 'max lights reached' ... */ }
The application is sloppy for not checking the result of course, but on Windows the call never fails, at least not for creating more lights than the hardware supports.
This one, yes ! I've just taken a look at it again and it seems the patch only fixed the D3D7 API. Older ones should be fixed too. I'll try to fix it today if nobody is working on it.
On Sun, Oct 30, 2005 at 12:46:13PM +0000, Christian Costa wrote:
I've just taken a look at it again and it seems the patch only fixed the D3D7 API.
Do not check the commit mail, but the patch itself:
http://www.winehq.org/hypermail/wine-patches/2005/06/0103.html
And you will see that the real patch fixes this issue.
Lionel
Lionel Ulmer wrote:
On Sun, Oct 30, 2005 at 12:46:13PM +0000, Christian Costa wrote:
I've just taken a look at it again and it seems the patch only fixed the D3D7 API.
Do not check the commit mail, but the patch itself:
http://www.winehq.org/hypermail/wine-patches/2005/06/0103.html
And you will see that the real patch fixes this issue.
Well, no. Antoine's patch fixed only the d3d7 light APIs. Old light APIs (light object + CreateLight method of direct3d object) were wrong. In fact when modifying that code to use d3d7, some part had been forgotten. My patch only finish the job by cleaning things up.
Btw, I've just checked cvs commit and Antoine's patch seems to be commited entirely !?!
Christian
Well, no. Antoine's patch fixed only the d3d7 light APIs. Old light APIs (light object + CreateLight method of direct3d object) were wrong.
Ah must have been drunk when I got the CreateLight but report in the channel and compared Antoine's patch to my tree :-)
Lionel
Lionel Ulmer wrote:
Well, no. Antoine's patch fixed only the d3d7 light APIs. Old light APIs (light object + CreateLight method of direct3d object) were wrong.
Ah must have been drunk when I got the CreateLight but report in the channel and compared Antoine's patch to my tree :-)
Lionel
;-)
Btw, when do you plan to finish and submit your patch that fixes the mouse cursor issue in Dungeon Keeper ? :-)
A+ Christian
On Tue, Nov 01, 2005 at 12:07:58PM +0000, Christian Costa wrote:
Btw, when do you plan to finish and submit your patch that fixes the mouse cursor issue in Dungeon Keeper ? :-)
Found the patch again. Now I just need to write a proper test case in the Wine framework and submit both to be sure Alexandre commits it this time :-)
It should be done today I hope.
Lionel
Lionel Ulmer wrote:
On Tue, Nov 01, 2005 at 12:07:58PM +0000, Christian Costa wrote:
Btw, when do you plan to finish and submit your patch that fixes the mouse cursor issue in Dungeon Keeper ? :-)
Found the patch again. Now I just need to write a proper test case in the Wine framework and submit both to be sure Alexandre commits it this time :-)
It should be done today I hope.
Cool ! :-)
H. Verbeet wrote:
On 10/30/05, Christian Costa titan.costa@wanadoo.fr wrote:
IIRC, a patch fixing this problem was commited about 2 or 3 months ago.
This one? http://cvs.winehq.org/patch.py?id=18002
It doesn't touch CreateLight. The crash happens because of this check in GL_IDirect3DImpl_3_2T_1T_CreateLight:
if (fl == MAX_LIGHTS) { return DDERR_INVALIDPARAMS; /* No way to say 'max lights reached' ... */ }
The application is sloppy for not checking the result of course, but on Windows the call never fails, at least not for creating more lights than the hardware supports.
Could you try this patch ?
? dlls/ddraw/.d3d_private.h.swp ? dlls/ddraw/.device_opengl.c.swp ? dlls/ddraw/.direct3d_opengl.c.swo ? dlls/ddraw/.direct3d_opengl.c.swp ? dlls/ddraw/.light.c.swp ? dlls/ddraw/.opengl_private.h.swp ? dlls/ddraw/device_opengl.c.fog ? dlls/ddraw/device_opengl.c.work ? dlls/ddraw/lights.diff ? dlls/ddraw/t.txt Index: dlls/ddraw/direct3d_opengl.c =================================================================== RCS file: /home/wine/wine/dlls/ddraw/direct3d_opengl.c,v retrieving revision 1.2 diff -u -r1.2 direct3d_opengl.c --- dlls/ddraw/direct3d_opengl.c 26 Jul 2005 20:10:51 -0000 1.2 +++ dlls/ddraw/direct3d_opengl.c 30 Oct 2005 12:10:01 -0000 @@ -98,23 +98,31 @@ { ICOM_THIS_FROM(IDirectDrawImpl, IDirect3D3, iface); IDirect3DGLImpl *glThis = (IDirect3DGLImpl *) This->d3d_private; - int fl; + DWORD light_index; IDirect3DLightImpl *d3dlimpl; HRESULT ret_value;
TRACE("(%p/%p)->(%p,%p)\n", This, iface, lplpDirect3DLight, pUnkOuter); - for (fl = 0; fl < MAX_LIGHTS; fl++) { - if ((glThis->free_lights & (0x01 << fl)) != 0) { - glThis->free_lights &= ~(0x01 << fl); + for (light_index = 0; light_index < glThis->max_lights; light_index++) { + if (!glThis->used_lights[light_index]) break; - } } - if (fl == MAX_LIGHTS) { - return DDERR_INVALIDPARAMS; /* No way to say 'max lights reached' ... */ + if (light_index == glThis->max_lights) { + int new_max_lights = glThis->max_lights ? 2 * glThis->max_lights : 1; + BOOL *new_used_lights = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, new_max_lights * sizeof(BOOL)); + if (!new_used_lights) + return E_OUTOFMEMORY; + CopyMemory(new_used_lights, glThis->used_lights, glThis->max_lights); + HeapFree(GetProcessHeap(), 0, glThis->used_lights); + glThis->max_lights = new_max_lights; + glThis->used_lights = new_used_lights; } - ret_value = d3dlight_create(&d3dlimpl, This, GL_LIGHT0 + fl); + ret_value = d3dlight_create(&d3dlimpl, This, light_index); *lplpDirect3DLight = ICOM_INTERFACE(d3dlimpl, IDirect3DLight);
+ if (ret_value == D3D_OK) + glThis->used_lights[light_index] = TRUE; + return ret_value; }
@@ -306,10 +314,10 @@ return res; }
-static void light_released(IDirectDrawImpl *This, GLenum light_num) +static void light_released(IDirectDrawImpl *This, DWORD light_index) { IDirect3DGLImpl *glThis = (IDirect3DGLImpl *) This->d3d_private; - glThis->free_lights |= (light_num - GL_LIGHT0); + glThis->used_lights[light_index] = FALSE; }
#if !defined(__STRICT_ANSI__) && defined(__GNUC__) @@ -453,7 +461,6 @@ ICOM_INIT_INTERFACE(This, IDirect3D3, VTABLE_IDirect3D3); ICOM_INIT_INTERFACE(This, IDirect3D7, VTABLE_IDirect3D7);
- globject->free_lights = (0x01 << MAX_LIGHTS) - 1; /* There are, in total, 8 lights in OpenGL */ globject->light_released = light_released;
This->d3d_private = globject; Index: dlls/ddraw/light.c =================================================================== RCS file: /home/wine/wine/dlls/ddraw/light.c,v retrieving revision 1.2 diff -u -r1.2 light.c --- dlls/ddraw/light.c 26 Jul 2005 20:10:51 -0000 1.2 +++ dlls/ddraw/light.c 30 Oct 2005 12:10:01 -0000 @@ -158,39 +158,43 @@
static void update(IDirect3DLightImpl* This) { IDirect3DDeviceImpl* device; - if (!This->active_viewport||!This->active_viewport->active_device) + if (!This->active_viewport || !This->active_viewport->active_device) return; device = This->active_viewport->active_device; - IDirect3DDevice7_SetLight(ICOM_INTERFACE(device,IDirect3DDevice7),This->dwLightIndex,&(This->light7)); + IDirect3DDevice7_SetLight(ICOM_INTERFACE(device,IDirect3DDevice7), This->dwLightIndex, &(This->light7)); }
static void activate(IDirect3DLightImpl* This) { IDirect3DLightGLImpl *glThis = (IDirect3DLightGLImpl *) This; + IDirect3DDeviceImpl* device; + if (!This->active_viewport || !This->active_viewport->active_device) + return; + device = This->active_viewport->active_device;
TRACE("(%p)\n", This);
- ENTER_GL(); update(This); /* If was not active, activate it */ if ((glThis->parent.light.dwFlags & D3DLIGHT_ACTIVE) == 0) { - glEnable(glThis->light_num); + IDirect3DDevice7_LightEnable(ICOM_INTERFACE(device,IDirect3DDevice7), glThis->light_index, TRUE); glThis->parent.light.dwFlags |= D3DLIGHT_ACTIVE; } - LEAVE_GL(); }
static void desactivate(IDirect3DLightImpl* This) { IDirect3DLightGLImpl *glThis = (IDirect3DLightGLImpl *) This; - + IDirect3DDeviceImpl* device; + if (!This->active_viewport || !This->active_viewport->active_device) + return; + device = This->active_viewport->active_device; + TRACE("(%p)\n", This);
- ENTER_GL(); /* If was not active, activate it */ if ((glThis->parent.light.dwFlags & D3DLIGHT_ACTIVE) != 0) { - glDisable(glThis->light_num); + IDirect3DDevice7_LightEnable(ICOM_INTERFACE(device,IDirect3DDevice7), glThis->light_index, FALSE); glThis->parent.light.dwFlags &= ~D3DLIGHT_ACTIVE; } - LEAVE_GL(); }
ULONG WINAPI @@ -203,7 +207,7 @@ TRACE("(%p/%p)->() decrementing from %lu.\n", This, iface, ref + 1);
if (!ref) { - ((IDirect3DGLImpl *) This->d3d->d3d_private)->light_released(This->d3d, glThis->light_num); + ((IDirect3DGLImpl *) This->d3d->d3d_private)->light_released(This->d3d, glThis->light_index); HeapFree(GetProcessHeap(), 0, This); return 0; } @@ -233,7 +237,7 @@
-HRESULT d3dlight_create(IDirect3DLightImpl **obj, IDirectDrawImpl *d3d, GLenum light_num) +HRESULT d3dlight_create(IDirect3DLightImpl **obj, IDirectDrawImpl *d3d, DWORD light_index) { IDirect3DLightImpl *object; IDirect3DLightGLImpl *gl_object; @@ -249,7 +253,7 @@ object->desactivate = desactivate; object->update = update; object->active_viewport = NULL; - gl_object->light_num = light_num; + gl_object->light_index = light_index;
ICOM_INIT_INTERFACE(object, IDirect3DLight, VTABLE_IDirect3DLight);
Index: dlls/ddraw/opengl_private.h =================================================================== RCS file: /home/wine/wine/dlls/ddraw/opengl_private.h,v retrieving revision 1.2 diff -u -r1.2 opengl_private.h --- dlls/ddraw/opengl_private.h 12 Jun 2005 10:43:11 -0000 1.2 +++ dlls/ddraw/opengl_private.h 30 Oct 2005 12:10:02 -0000 @@ -48,14 +48,15 @@ /* This structure is used for the 'd3d_private' field of the IDirectDraw structure */ typedef struct IDirect3DGLImpl { - DWORD free_lights; - void (*light_released)(IDirectDrawImpl *, GLenum light_num); + BOOL *used_lights; + int max_lights; + void (*light_released)(IDirectDrawImpl *, DWORD light_index); } IDirect3DGLImpl;
typedef struct IDirect3DLightGLImpl { struct IDirect3DLightImpl parent; - GLenum light_num; + DWORD light_index; } IDirect3DLightGLImpl;
/* This structure is used for the 'private' field of the IDirectDrawSurfaceImpl structure */ @@ -185,7 +186,7 @@ /* All non-static functions 'exported' by various sub-objects */ extern HRESULT direct3d_create(IDirectDrawImpl *This); extern HRESULT d3dtexture_create(IDirectDrawImpl *d3d, IDirectDrawSurfaceImpl *surf, BOOLEAN at_creation, IDirectDrawSurfaceImpl *main_surf); -extern HRESULT d3dlight_create(IDirect3DLightImpl **obj, IDirectDrawImpl *d3d, GLenum light_num); +extern HRESULT d3dlight_create(IDirect3DLightImpl **obj, IDirectDrawImpl *d3d, DWORD light_index); extern HRESULT d3dexecutebuffer_create(IDirect3DExecuteBufferImpl **obj, IDirectDrawImpl *d3d, IDirect3DDeviceImpl *d3ddev, LPD3DEXECUTEBUFFERDESC lpDesc); extern HRESULT d3dmaterial_create(IDirect3DMaterialImpl **obj, IDirectDrawImpl *d3d); extern HRESULT d3dviewport_create(IDirect3DViewportImpl **obj, IDirectDrawImpl *d3d);
On 10/30/05, Christian Costa titan.costa@wanadoo.fr wrote:
Could you try this patch ?
Seems to work, at the very least the application doesn't crash right after loading anymore, and at first sight the lighting doesn't seem off.
H. Verbeet wrote:
On 10/30/05, Christian Costa titan.costa@wanadoo.fr wrote:
Could you try this patch ?
Seems to work, at the very least the application doesn't crash right after loading anymore, and at first sight the lighting doesn't seem off.
Ok. I will clean it up and submit it.
On Sun, Oct 30, 2005 at 10:55:36AM +0000, Christian Costa wrote:
IIRC, a patch fixing this problem was commited about 2 or 3 months ago.
Yes but because this patch conflicted with your 'rename everything' patch, AJ did merge it himself ... and forgot a part of the patch (the one about light creation).
It was in my plans to resubmit the parts which were left off during the merge but it seems that you beat me to it :-)
Lionel
I have the demo and could throw it on my FTP server if necessary. It is still available, just hard to find.
Randall Walls
Lionel Ulmer wrote:
However, as far as I'm concerned neither of those are major issues, just the kind of stuff that makes the difference between "decent" and "great" support for an application.
Could you raise a bug on bugzilla attaching a +ddraw trace so that I can take a look at it when I find the time ?
I tried to d/l the BZ2 demo but no site seems to host it anymore so I will be restricted to look at traces to find out what goes wrong :-)
Lionel