Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Vampire: The Masquerade - Bloodlines fails to display menu/game #101

Open
jstraarup opened this issue Mar 28, 2015 · 31 comments
Open

Vampire: The Masquerade - Bloodlines fails to display menu/game #101

jstraarup opened this issue Mar 28, 2015 · 31 comments

Comments

@jstraarup
Copy link

Intro video shows, but image hangs when going to menu.
Menu music plays in background, mouse/keyboard works, game loads/plays through blind navigation.
Without Nine, it works.

WINEDEBUG=d3d9 WINEPREFIX=/games/bloodlines WINEARCH=win32 wine vampire.exe

fixme:winediag:start_process Wine Staging is a testing version containing experimental patches.
fixme:winediag:start_process Please report bugs at http://bugs.wine-staging.com (instead of winehq.org).
trace:d3d9:Direct3DCreate9 sdk_version 0x1f.
fixme:d3d9:d3dadapter9_new
Native Direct3D 9 is active.
For more information visit https://wiki.ixit.cz/d3d9
trace:d3d9:d3dadapter9_GetAdapterIdentifier DeviceName overriden: .\DISPLAY1
trace:d3d9:d3dadapter9_GetAdapterIdentifier DeviceId:VendorId overridden: 6610:1002
trace:d3d9:d3dadapter9_GetAdapterModeCount 38 modes.
trace:d3d9:d3dadapter9_GetAdapterIdentifier DeviceName overriden: .\DISPLAY1
trace:d3d9:d3dadapter9_GetAdapterIdentifier DeviceId:VendorId overridden: 6610:1002
trace:d3d9:d3dadapter9_AddRef 0x131798 increasing refcount to 2.
fixme:d3dadapter:DRI3PresentGroup_GetMultiheadCount (0x13cff0), stub!
fixme:d3dadapter:DRI3PresentGroup_GetMultiheadCount (0x13cff0), stub!
trace:d3d9:d3dadapter9_Release 0x131798 decreasing refcount to 1.

System:
mesa [git, iXit - 2015-03-28]
wine [1.37] - think it's the same error msg with 1.38
xorg-server [1.7.1]
xf86-video-ati [git, anongit.freedesktop - 2015-03-28] - doesn't work with iXit driver either

Gfx card: Radeon R7 250
Wine overrides: d3dcompiler_43.dll and d3dx9_24.dll - d3dx9_43.dll

@axeldavy
Copy link

Can you get log with mesa with debug enabled and NINE_DEBUG=all ?

@jstraarup
Copy link
Author

Thank you for your reply.
Yes - it is huge though (51 MB):
https://s3-eu-west-1.amazonaws.com/triplejim/vampire_bloodlines_nine_all

I have no idea why it says:
Driver: nvd3dum.dll
Description: NVIDIA GeForce GTX 680
DeviceName: AMD OLAND
...
Seems strange to me, I do not have a NVIDIA card (on second thought, it's probably irrelevant).

@axeldavy
Copy link

Thanks for the log.
There is nothing in the log that let indicate of any error or problem.

Could you do a short trace with apitrace (see apitrace wiki on how to make recording with wine) ?

@jstraarup
Copy link
Author

I'm am not sure I am doing this correct, but i have made two traces.

  1. Linux host calls.
  2. Trace inside WINE.
  3. WINEPREFIX=/games/bloodlines WINEARCH=win32 apitrace trace wine vampire.exe
    Result:
    https://s3-eu-west-1.amazonaws.com/triplejim/wine-preloader.trace
  4. WINEDLLOVERRIDES='Z:\home\johan\Downloads\apitrace-mingw\x86\bin\wrappers\d3d9.dll=n' WINEPREFIX=/games/bloodlines WINEARCH=win32 wine ~/Downloads/apitrace-mingw/x86/bin/apitrace.exe trace -a d3d9 -v vampire.exe
    Result:
    https://s3-eu-west-1.amazonaws.com/triplejim/vampire.trace

@siro20
Copy link

siro20 commented Apr 20, 2015

Tested with latest:
https://github.com/iXit/xf86-video-ati (DRI3 and Glamor enabled)
https://github.com/siro20/Mesa-3D/
wine-1.7.40
HD6870
I replayed the trace file and I don't see any difference in WINE and Gallium Nine, the menu works as expected.

@jstraarup
Copy link
Author

This is very interesting.
I have not tried with your repo yet. Do you think it would help?
Since the game is very buggy by it self, and I see people on Windows getting the same problem - I am curious to what version of the game, and what settings you are using?
Are you using any patches (official/unofficial/"true patch")?
No CD patch/fixed exe?
What wine settings? Overrides/specific windows version? 32/64 bit?
Difference could be that you are using r600g, and I am using radeonsi driver.

@siro20
Copy link

siro20 commented Apr 21, 2015

I'm going to retest with ixit git, but the differences are minor.
I do not own a copy of this game, I just replayed the trace file "vampire.trace" you provided.
32bit WINE from https://github.com/iXit/wine, set to "Windows 7", d3dx9_* dll overrides

@siro20
Copy link

siro20 commented Apr 22, 2015

Tested again with latest https://github.com/iXit/Mesa-3D and it work's as it should. Probably a bug in the radeonsi driver. This should be tested on Nvidia too, just to be sure.

@jstraarup
Copy link
Author

Thank you, for helping narrowing it down.
If you have any idea how I can debug further, please let me know.

@siro20
Copy link

siro20 commented May 1, 2015

I tried again with Steam's Vampire: The Masquerade - Bloodlines, but I couldn't get it to start. It tries to create textures forever....
Looks like bug: https://bugs.winehq.org/show_bug.cgi?id=24701

I've made an apitrace and it looks quite different compared to the apitrace you provided.
I can start and play the game using WineD3D (so it's a Gallium Nine issue), but most textures are way to dark.

@jstraarup
Copy link
Author

I just bought the Steam version, and I am getting the same out of memory issue when using Nine (the same happens with a crack from gamecopyworld).

But it is different from the other issue that I am having.

I have been making the apitrace with the "true patch" applied, and applying the "true patch", to the Steam version is giving the same results (Black screen, sound in background, ability to click on menu items).
To get the "true patch" to work, I had to use a program called ResPatch.exe, from the "unoffical patch", to patch some files to 16:10 resolution, which I am using.

Patching with the "unofficial patch" and using the exe (and maybe vampire.dll, can't remember), from the "true patch" gives the same results.

The textures with WineD3D, look good with Wine 1.7.38. But dark with 1.7.40.

@siro20
Copy link

siro20 commented May 21, 2015

I was able to start the unpatched game with my latest mesa git, but it has trouble setting a correct screen resolution and keeping in the foreground. It changes the screen resolution three times and always loses it's focus. I was able to see the intro movies, but got an engine error due to E_OUTOFMEMORY once I reach the main menu.

@siro20
Copy link

siro20 commented May 23, 2015

The game requires vidmem accounting to work. It allocates textures in a loop until E_OUTOFMEMORY or D3DERR_OUTOFVIDEOMEMORY is beeing returned. It frees all textures and starts with "normal" operation, creating index and vertex buffers. As I'm using pipe_querry to get the actual vidmem, and the driver needs some time to free all resources, creating indexbuffer/ vertexbuffers receives an unexpected E_OUTOFMEMORY too. I've hacked around this issue and do not see a crash anymore, but a black screen with menu music playing as described in the first post.

@axeldavy
Copy link

The game is likely fixed now. Can you confirm ?

@jstraarup
Copy link
Author

Sorry about the late response.
Unfortunately I still experience the same issue.
Have tried with mesa from 12/12-2015, wine 1.7.55, xf86-video-ati 7.6.1, and also with an other graphics card (Radeon HD 7850 - Southern Islands - radeonsi).

@axeldavy
Copy link

"mesa from 12/12-2015": do you mean this mesa branch or not ?

@jstraarup
Copy link
Author

Yes, this branch.
I am installing it on gentoo, using this ebuild: https://github.com/okias/ixit/blob/master/media-libs/mesa/mesa-9999.ebuild

@sarnex
Copy link
Member

sarnex commented Dec 14, 2015

Try using mesa in the wine-a-holics overlay with the ixit and d3d9 use flags.

@jstraarup
Copy link
Author

Thank you for the suggestion, but there are no apparent difference; the same thing happens again.

I did try to click something in the menu, and was flooded with the message:
err:d3dadapter:PRESENTPixmap FATAL ERROR: Trying to Present a pixmap not released
I don't think I have seen that error before.

@axeldavy
Copy link

Could you give a log which shows this error message ?

@jstraarup
Copy link
Author

I found out that it only gives this error message, after switching to a different workspace, and then killing vampire.exe. So I guess a log is not of much use, but I have made one anyway:
https://s3-eu-west-1.amazonaws.com/triplejim/vampire_bloodlines_nine_all_change_workspace

If I quit the game by using the menu - through blind navigation - it gives this log:
https://s3-eu-west-1.amazonaws.com/triplejim/vampire_bloodlines_nine_all_new

@dhewg
Copy link

dhewg commented Mar 13, 2019

Problem still exists. It's because d3d9/ddraw coop is used in this game.
Setting DirectDrawRenderer to gdi fixes this to some degree.

On windowed mode (wine vampire.exe -windowed) that's all that's required.

For fullscreen mode there's a resolution mismatch between d3d9 and ddraw. With nine, the game doesn't change the resolution, so you have to set the game to your (virtual) display resolution: wine vampire.exe -full -width 1920 -height 1080

@dhewg
Copy link

dhewg commented Mar 14, 2019

Turns out the ddraw stuff is only used by binkw32.dll in this game. Renaming/deleting the Vampire/media folder gets rid of ddraw/coop, and the game can be played without setting DirectDrawRenderer. The resolution mismatch issue on fullscreen is still there though.

@dhewg
Copy link

dhewg commented Mar 14, 2019

Using WINEDEBUG=ddraw to see if ddraw is used, I tested different versions of binkw32.dll from a few other games:

GOG game ships with 1.6.3.0, which is using ddraw coop

1.5.21.0 from kotor1/2 - uses ddraw, no changes
1.8.21.0 from dragon age - not using ddraw, fixes game rendering
1.9.8.0 from witcher1 - not using ddraw, no changes
1.9.25.0 from rayman - not using ddraw, inverse, bink rendering broken, but game works

So apparently overwriting Bin/binkw32.dll with v1.8.x fixes the issue too

@dhewg
Copy link

dhewg commented Apr 4, 2019

The resolution mismatch is fixed on standalone master.
The bink/ddraw issue is still present. Unsure how to fix that, known workarounds:

  • Rename the Vampire/media folder so the game doesn't play the videos (it's just the 4 company logos anyway)
  • Use binkw32.dll v1.8.*
  • Set DirectDrawRenderer to gdi

@chewi
Copy link

chewi commented May 14, 2019

I can confirm that simply swapping in binkw32.dll v1.8 was enough to fix it for me.

@dhewg
Copy link

dhewg commented Oct 2, 2019

For the record: d9vk has the same ddraw coop issue

@dhewg
Copy link

dhewg commented Oct 10, 2019

VTMB Unofficial Patch v10.5-rc2 is shipping binkw32.dll v1.8x. GOG will eventually pick that up, but you can install it manually in any case.
With that and standalone v0.5 everything should work out of the box now!

@jstraarup
Copy link
Author

Wonderful! Thank you so much for following up on this old issue.
I am not able to test this at the moment, but will look forward to trying it out when I can :-)

@rox4d
Copy link

rox4d commented Jun 1, 2020

Looks like it work now (with recent wine) without dancing with binkw32.dll.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

8 participants