dxwrapper icon indicating copy to clipboard operation
dxwrapper copied to clipboard

[ddraw] Driver - FMV cutscenes issue (audio only - no video) in Glide mode (nglide)

Open casasfernando opened this issue 5 months ago • 12 comments

I'm trying to get Driver (https://www.pcgamingwiki.com/wiki/Driver) to fully work under Wine (10.7) in both Glide (nglide) and Direct3D mode. The game uses DirectX 6.

Going in-game works fine in either mode, but unfortunately for some reason, when in Glide mode FMV cutscenes are not working. I can hear the audio playing just fine but there is no video while in Direct3D everything works as expected. I suspect the issue is related to ddraw so I'm trying to make it work with the help of dxwrapper (also tested cnc-ddraw). With cnc-ddraw the game can only be played in Glide mode since cnc-ddraw doesn't work with Direct3D (I believe) but FMV works fine. With dxwrapper I tried two different configs: EnableDdrawWrapper only and EnableDdrawWrapper+Dd7to9. I didn't modify any other settings in the ini file. One thing I noticed is that if I enable the Dd7to9 option, then I can't run the game in Glide mode anymore since the option it's not available in the configuration program:

EnableDdrawWrapper only:

Image

EnableDdrawWrapper+Dd7to9 (3Dfx Glide option is not available):

Image

Not sure if this is expected or not since I'm new to dxwrapper and I maybe I did something wrong while configuring it.

The results are summarized below:

Direct3D Glide (nglide)
Wine (no ddraw wrapper) FMV_OK FMV_Audio_Only
Wine + cnc-ddraw N/A FMV_OK
Wine + dxwrapper (EnableDdrawWrapper) FMV_OK FMV_Audio_Only
Wine + dxwrapper (EnableDdrawWrapper+Dd7to9) FMV_OK N/A

I collected logs for the following scenario: Wine + dxwrapper (EnableDdrawWrapper)

dxwrapper_logs_EnableDdrawWrapper_nglide_3dfx_fmv_not_working.zip

System details:

  • OS: Debian 13
  • Wine version: 10.7 staging
  • GPU: AMD Radeon RX 6700XT (mesa 25.0.7)
  • Stub file: ddraw.dll

Any help would be really appreciated.

On top of that I would like to ask/confirm if dxwrapper is supported under Wine since some projects explicitly do (e.g.: cnc-ddraw) , while others don't (e.g.: ddrawcompat and dgvoodoo2).

Thanks.

casasfernando avatar Oct 04 '25 12:10 casasfernando

The game uses DirectX 6.

Basically DirectX <= 7 is DDraw and DirectX >= 8 is D3D (i.e. D3D8 and up).

Glide is a separate graphics API by 3DFX. I don't think the game would mix these together. You either use Glide or you use DDraw--not both at the same time. (Diablo II is a good example: supports both playing with Glide3 or DDraw)

game can only be played in Glide mode since cnc-ddraw doesn't work with Direct3D (I believe)

cnc-ddraw's ddraw.dll can only be used to play 2D DDraw games. It doesn't work with 3D DDraw games (at least from my testing). The cnc-ddraw wrapper translates DDraw to either OpenGL or D3D9. On Linux, OpenGL is preferred as it is a native graphics API.

Wine's native wrapper is called WineD3D and translates DDraw, D3D8, D3D9, D3D10, and D3D11 to OpenGL. D3D12 is covered by VKD3D (which is separate from VKD3D-Proton).

FMV cutscenes are not working

If FMV cutscenes are not working, it could be that they require 16bit color mode (I've ran into this issue with quite a few DDraw games). Some games will load with 32bit color mode (especially if they use a software renderer) but in-game videos fail to play. dxwrapper can force 16bit color so they play right by setting DdrawOverrideBitMode = 16. I think you have to set Dd7to9 = 1 for this to work.

I'd also recommend setting

DdrawUseNativeResolution   = 1
DdrawIntegerScalingClamp   = 1
DdrawMaintainAspectRatio   = 1

to get the game to scale cleanly using integer scaling for a nice sharp image. (personal preference)

Anyways, I would just try using dxwrapper without nglide first. If it plays well with dxwrapper after fiddling with the dxwrapper.ini options, just stick with DDraw. Glide is really weird and requires fullscreen to work right (cannot run windowed). If you insist on Glide, try compiling the openglide SDL2 port (I'll see if I can find the repo) it performs better. nglide is a bit wonky and often times dgvoodoo has better performance. The Vulkan 1.0 output option for nglide is a joke (performs poorly). The D3D9 output is vastly more performant and can be used with Gallium Nine / Wine-Nine-Stand-Alone (Mesa 25.1.x or older only) for very good performance. dgvoodoo outputs D3D11 or D3D12 which requires DXVK or VKD3D-Proton. While dxwrapper can be used with Gallium Nine, I'd recommend using DXVK 2.7.1 or older (current Github Actions builds break dxwrapper). Gallium Nine has a lot of bugs that affect wrappers like dxwrapper and doesn't always work with Intel GPUs (works well with AMD though). But when it works, you see a massive drop in GPU load / higher FPS.

The last version of dgvoodoo that works with Wine is 2.81.3 (still available on archive.org).

the-burrito-triangle avatar Oct 05 '25 10:10 the-burrito-triangle

Thanks for your detailed reply @the-burrito-triangle . Just to clarify, I obviously don't want to play the game in both rendering modes at the same time, but I want it to fully work with either mode and be able to decide.

For the sake of completeness the test I did with cnc-ddraw was using the D3D9 renderer and using nglide+DXVK FMV worked perfectly (although this approach only allows for Glide mode to be used).

I also tested dgvoodoo2 2.79.3 and it worked almost fine (to get FMV to work in Glide mode I had to enable Wine's virtual desktop) but since the developer doesn't support Wine I prefer to avoid the project completely and find another solution.

Having said that, I would try the configuration parameters you shared above. Thanks for the suggestions.

One last question, why when I enable Dd7to9, in the configuration tool I get six instances of Primary display driver and no 3Dfx Glide option? I'm wondering if it's maybe a limitation of the configuration tool that can only list a max number of options.

Thanks.

casasfernando avatar Oct 05 '25 12:10 casasfernando

I just tested all the supported values for DdrawOverrideBitMode and unless I set it to 0 (disabled) or 32 (32-bit), FMV is completely skipped. If I recall correctly, nglide will use 32-bit color depth. What escapes me is what nglide would have to do with FMV playback. I would expect it to be completely handled by ddraw but what do I know...

In any case, I believe the issue is ddraw related and for some reason cnc-ddraw gets it right while dxwrapper (and stock Wine) behave differently (maybe I'm just missing a config setting in dxwrapper).

casasfernando avatar Oct 05 '25 13:10 casasfernando

Okay, I can confirm that videos are not working right. The game itself works fine with dxwrapper when the FMVDATA folder is renamed or not present.

Update:

I can't get any combination of wrappers to play the videos correctly... I'm impressed you got them to work at all.

Update2:

As I expected, cnc-ddraw has no 3D DDraw support, so the game cannot be played using it.

All the other wrappers seem to work with this game when the FMVDATA folder is renamed or not present (OpenGlide, WineD3D, dgvoodoo's glide2x.dll and ddraw.dll / d3dimm.dll, nglide, and dxwrapper). However, I cannot get the video playback to work correctly with any of them. The game either plays audio with a black screen (dxwrapper), automatically skips them, or allows you to press Esc to skip and continues to the main menu.

From testing with WINEDLLOVERRIDES="ddraw=n", the game does indeed require DDraw even when using Glide. I guess this is because the game uses .mpg files for the videos rather than Smacker or Bink and needs DDraw to help play the videos.

dxwrapper needs to be tested on Windows with this game to see if the videos play there. If so, this issue is either a Wine bug or a missing media component that needs to be installed in the Wine prefix first.

the-burrito-triangle avatar Oct 06 '25 01:10 the-burrito-triangle

Thanks for taking the time to help with this @the-burrito-triangle . I learnt a lot from your flow chart and your previous comments, so really appreciate it. To be able to playback FMV I had to install the following with winetricks: - amstream - quartz

You can also get away by installing directshow but that will install additional libraries that are not really needed for FMV to play for this game (I tried and it didn't make any difference) and I prefer to keep the prefix as "clean" as possible. The two libraries above are enough. Then you also need to have the right gstreamer plugins installed (in my case I installed all of them -good, bad, ugly, etc.-).

With this, FMV should behave as described in the table in my original post. Still wondering if it's just coincidence that FMV works in Glide with cnc-ddraw.

casasfernando avatar Oct 06 '25 10:10 casasfernando

I was able to get the movies working fine with dxwrapper on Windows 10. I downloaded the iso and ran the game's installer and after running the installer I dropped the dxwrapper files in. Then ran the config tool set it up to 32-bit color and triple buffering. Then started the game and it started and played the video.

I tested with the latest build so maybe something I recently fixed got it working. Here is the latest build: dxwrapper.zip

I would like to ask/confirm if dxwrapper is supported under Wine

Yes, dxwrapper should work fine on Wine. I don't use Wine or know much about it but it should work fine. I have other users using it in Wine.

elishacloud avatar Oct 07 '25 02:10 elishacloud

Thanks for the latest build @elishacloud . I will try it later today and report back. Just to make sure that we are testing in the same way:

  1. Which feature(s) did you enable in dxwapper configuration? EnableDdrawWrapper, Dd7to9, both?
  2. Did you test the game's Glide renderer (with the help of NGlide) or Ddraw one? I can only reproduce the FMV playback issue with Glide renderer. Ddraw works fine.

Another thing I asked in my initial report that you may be able to answer is why if I enable Dd7to9 in dxwrapper I get six instances of Primary display driver while DirectDraw HAL and 3Dfx Glide are not available anymore in the config tool. Without enabling Dd7to9 both options are available again as you can see in the screenshots above. Was it the same for you in Windows 10?

Also really appreciate that you support Wine!

casasfernando avatar Oct 07 '25 12:10 casasfernando

  1. Which feature(s) did you enable in dxwapper configuration? EnableDdrawWrapper, Dd7to9, both?

I only had Dd7to9. You can see in the previously attached zip file (which includes the ini file).

  1. Did you test the game's Glide renderer (with the help of NGlide) or Ddraw one? I can only reproduce the FMV playback issue with Glide renderer. Ddraw works fine.

I just chose the default option, which was "Primary Display Adapter":

Image

Another thing I asked in my initial report that you may be able to answer is why if I enable Dd7to9 in dxwrapper I get six instances of Primary display driver while DirectDraw HAL and 3Dfx Glide are not available anymore in the config tool.

Yes, I see the same thing. As far as I can tell this is normal. Just choosing "Primary Display Adapter" should be fine and give you the best experience.

Note: Glide isn't supported with dxwrapper. "Primary Display Adapter" is better than "DirectDraw HAL".

elishacloud avatar Oct 07 '25 15:10 elishacloud

Thanks for clarifying. I didn't expect Glide to be supported by dxwrapper directly (in the sense of dxwrapper rendering Glide), but I did expect that it will work together with nglide in the sense that if Glide is selected in the configuration tool, then nglide will handle the 3D rendering, while dxwrapper would still handle the ddraw part (I think ddraw is still using in some way during FMV playback) and 3D rendering if "Primary Display Driver" is selected. Basically same as cnc-ddraw seems to be doing in the same scenario (with cnc-ddraw FMV is playing fine -both audio and video- when Glide is used as 3D device), except for the 3D part since cnc-ddraw only supports 2D.

Would that make sense?

casasfernando avatar Oct 10 '25 00:10 casasfernando

I didn't expect Glide to be supported by dxwrapper directly (in the sense of dxwrapper rendering Glide), but I did expect that it will work together with nglide in the sense that if Glide is selected in the configuration tool, then nglide will handle the 3D rendering,

I don't know anything about glide. No idea what would or wouldn't cause it to appear. However, I noticed that cnc-ddraw passes queries forward to the real ddraw. dxwrapper doesn't pass anything forward to the real ddraw. That might be the issue.

elishacloud avatar Oct 10 '25 00:10 elishacloud

That might be indeed. But just be aware that Wine’s ddraw implementation is behaving exactly the same as dxwrapper in terms of FMV playback (only audio, no video) when Glide is enabled, while with cnc-ddraw, FMV works. So I’m pretty sure that cnc-ddraw is doing something differently in this scenario, but I don’t think it’s passing queries directly to real drraw otherwise it shouldn’t work.

Would it help if a collect a log file from both to compare them in terms of how they are handle ddraw while FMV playback with Glide as 3D renderer? I don’t have a clue on what to look for in the logs since I’m absolutely unfamiliar with ddraw internals, though.

casasfernando avatar Oct 10 '25 00:10 casasfernando

many games back then implemented Glide in such a way that it was only utilised within game levels/missions but not on campaign screens, you would know these games well on actual hardware where the splash screen is played at the point the voodoo would kick in.

Menu's were then implemented on GDI or DDraw, and FMV's usually within a GDI based player that used one of the 4 codecs of the day, mpeg2, cinepak, Smacker Video or BInk

GDI could be used ontop of Glide, DirectDraw could not.

Squall-Leonhart avatar Oct 13 '25 07:10 Squall-Leonhart