doitsujin / dxvk

Vulkan-based implementation of D3D8, 9, 10 and 11 for Linux / Wine
zlib License
12.72k stars 813 forks source link

[d3d9] Scarface: The World Is Yours doesn't even boot with DVXK 2.4 #4147

Open Sagatt opened 1 month ago

Sagatt commented 1 month ago

Software information

System information

Apitrace file(s)

Log files

Describe the issue: Game doesn't even boot.

Blisto91 commented 1 month ago

Please post dxvk logs and make a apitrace if able. Then it will be easier to take a look. The logs usually appear next to the exe.

mirh commented 1 month ago

Does the version in the title imply that it was working for you with 2.3.1?

koffiato commented 1 month ago

Game gets stuck on black screen on my setup. Works fine with native DirectX 9, apitrace and logs are attached. Will try making the game run windowed as my monitor blacks out for a bit, the game may be changing exclusive fullscreen resolution in a funky way.

System information

Apitrace file(s)

Log files

doitsujin commented 1 month ago

If the log is anything to go by it locks up before even creating a swap chain, which is weird. Has this game ever worked with any version of DXVK?

Trace replays fine here, so there might be window message shenanigans going on perhaps, but not sure.

Sagatt commented 1 month ago

Never did work with any version at all, simply gives me a black screen.

koffiato commented 1 month ago

I tried going back to ancient versions with RADV driver, no dice; it never worked with DXVK. WINED3D works fine however.

Blisto91 commented 1 month ago

Can you also post a apitrace where it doesn't work with dxvk. Might get something from comparing them

K0bin commented 1 month ago

The apitrace replays fine on my system (with an Nvidia GPU) as well. The fact that you cannot buy this game anymore, makes looking into this very problematic.

Blisto's idea was pretty good. Please try to make an apitrace with DXVK where the game crashes during recording of the trace.

Sagatt commented 1 month ago

But the game barely runs, literally the screen is blacked out

koffiato commented 1 month ago

@Blisto91 How do I do that exactly? Game boots into black screen and crashes whenever I click around. I tried putting dxgitrace.dll from apitrace along with d3d9.dll and dxgi.dll of DXVK next to the game executable; didn't work. Tried using apitrace trace scarface.exe but that also didn't create any trace files on desktop. In all of the cases, the game boots into black screen.

Blisto91 commented 1 month ago

On Windows or Linux?

koffiato commented 1 month ago

Oh, sorry, I tried taking apitraces on Windows.

Blisto91 commented 1 month ago

Put the apitrace d3d9.dll next to the game exe and the dxvk d3d9.dll in some folder you've created, where ever. Then in the Windows environment variable gui set APITRACE_FORCE_MODULE_PATH to the path of the folder with the dxvk dll. This will make apitrace use it instead of the system one. You can just delete the env var again when you are done.

koffiato commented 1 month ago

Thank you for the instructions. I started the game, waited a few minutes then force quit. The resulting scarface.trace is just 2 bytes. Also tried running the apitrace with -a d3d9 argument, same result; unable to replay. image

Sagatt commented 1 month ago

If the log is anything to go by it locks up before even creating a swap chain, which is weird. Has this game ever worked with any version of DXVK?

Trace replays fine here, so there might be window message shenanigans going on perhaps, but not sure.

Based on what you seen, what does that mean?

Blisto91 commented 1 month ago

@koffiato thank you for the attempt but the trace with dxvk is sadly empty yes. I have managed to find a cheap copy of the game so I should be able to give it a poke here next week.

Sagatt commented 1 month ago

@koffiato thank you for the attempt but the trace with dxvk is sadly empty yes. I have managed to find a cheap copy of the game so I should be able to give it a poke here next week.

I could've just given you a copy bru

Blisto91 commented 1 month ago

Apitrace from Windows with and without dxvk: https://drive.proton.me/urls/206PB23WP0#yAyK1z1Fq12Z

These are made with the game also using the SilentPatch but it freezes/crashes the same with dxvk on first frame.

Sagatt commented 1 month ago

Try using GangstaPatch, it's here on GitHub too

niresh1234 commented 1 month ago

@K0bin @mirh @doitsujin @Blisto91

Installing D3D9 Wrapper by ThirteenAG in game root

Replacing d3d9.dll of DXVK with C:\Windows\SysWOW64\d3d9.dll

Its not solution but game works with DXVK.... and the wrapper repository available in GitHub

Blisto91 commented 1 month ago

I'm not sure i understand what you mean

niresh1234 commented 1 month ago

@Blisto91 the game not working with DXVK if install dxvk(d3d9.dll) in game root only, and shows only black screen...

but if install d3d9-wrapper also in the game.. then game work with DXVK..... but both have some .dll which is d3d9.dll..........

so I put and replace dxvk d3d9.dll in system folder

Screenshot-(254)

Blisto91 commented 1 month ago

You probably already know this but i am just going to put out a disclaimer to others.

DO NOT REPLACE THE WINDOWS SYSTEM DLLS WITH DXVK UNLESS YOU KNOW WHAT YOU ARE DOING. YOU'LL LIKELY BRICK YOUR INSTALL

But yes thanks. I assume it is working around the dxvk issue via windowed mode or some other tweaks.

niresh1234 commented 1 month ago

Its not solution but game works with DXVK....

Yes, I know.... Thats why I write above

Sagatt commented 1 month ago

You probably already know this but i am just going to put out a disclaimer to others.

DO NOT REPLACE THE WINDOWS SYSTEM DLLS WITH DXVK UNLESS YOU KNOW WHAT YOU ARE DOING. YOU'LL LIKELY BRICK YOUR INSTALL

But yes thanks. I assume it is working around the dxvk issue via windowed mode or some other tweaks.

This is a bad "solution".

Blisto91 commented 1 month ago

No one has said it was a solution. The original issue stills stands ofc.

mirh commented 1 month ago

Unorthodox "chaining", but anything will do when grasping at straws I guess.. Can you track down which option may be the fix?

niresh1234 commented 1 month ago

ForceWindowedMode = 1 is working (if set to 0, then game stuck at black screen)

Which is i noticed but not remember, I will check tomorrow again

mirh commented 1 month ago

I reckon you already tried to play with dxvk's dpiAware, enableDialogMode, and deviceLossOnFocusLoss options?

niresh1234 commented 1 month ago

This is the only option used always enableDialogMode

niresh1234 commented 4 weeks ago

@mirh I Try with this, but still black screen stuck

dxvk.hud=full
d3d9.enableDialogMode=True
d3d9.dpiAware=True
d3d9.deviceLossOnFocusLoss=True

& In D3D9-Wrapper, This Line set to 1 is Working ForceWindowedMode = 1

mirh commented 4 weeks ago

My question was if you tried to toggle each of them, to see if anything changed. But I guess we already have some kind of lead. Either it's something with the screen dimensions or the window presentation parameters/styles?

You could try dxwrapper perhaps instead, to pinpoint this accurately (with the added benefit that AFAICT you wouldn't need this wacky ass system dll hackjob to use dxvk together). Just remember to also set EnableD3d9Wrapper=1 and then you have endless window knobs.

niresh1234 commented 4 weeks ago
  1. I try almost all options from d3d9-wrapper.... but without ForceWindowedMode = 1 game stuck

  2. dxwrapper only load other dll instead of system dll if dxwrapper renamed to that dll file eg. dxwrapper renamed to d3d9.dll then load dxvk dll from some location.... and these options still not give ability to load dxwrapper(d3d9.dll) and d3d9-wrapper (d3d9.dll) at same time

  3. also game still stucks when using dxwrapper WndowedMode Options (when using DXVK)

  4. currently i use these hex methods which is mentioned hare (Only for testing) eg. dxvk dll renamed to d9vk.dll and paste to SysWOW64 & hex edited d3d9-wrapper dll in game directory

mirh commented 4 weeks ago

You don't have to use d3d9-wrapper with dxwrapper (even though I guess you could try it for starters, to make sure you got the syntax of the RealDllPath value right). And if EnableWindowMode=1 doesn't do the trick.. then indeed it must not be just a matter of windowed mode alone (maybe check FullscreenWindowMode, WindowModeBorder and DisableMaxWindowedMode for starters).

niresh1234 commented 4 weeks ago

Yes! Try and working with dxwrapper windowed mode... but not stable like no-sound and also newGame stuck (even without DXVK)

But I think its Confirm! issue is fixed by WindowedModes related tweaks...

Sagatt commented 4 weeks ago

Yes! Try and working with dxwrapper windowed mode... but not stable like no-sound and also newGame stuck (even without DXVK)

But I think its Confirm! issue is fixed by WindowedModes related tweaks...

Have you tried using GangstaPatch?

niresh1234 commented 3 weeks ago

@Sagatt yes tried... But it's trusted?

Gangstapatch look like stealing entire code of silentPatch, fusionFix, d3d9Wrapper and some other mods (which is already open-source) and compile into one.... no mention credit and not mentioned what actually change? It really trusted?

Sagatt commented 3 weeks ago

@Sagatt yes tried... But it's trusted?

Gangstapatch look like stealing entire code of silentPatch, fusionFix, d3d9Wrapper and some other mods (which is already open-source) and compile into one.... no mention credit and not mentioned what actually change? It really trusted?

I never had any problems using it, BUT i also wish their code was open source, it used to be so frankly I think it's stupid to keep it closed, for that reason I get where you're coming from.

mirh commented 3 weeks ago

But I think its Confirm! issue is fixed by WindowedModes related tweaks...

Which one specifically?

niresh1234 commented 3 weeks ago

But I think its Confirm! issue is fixed by WindowedModes related tweaks...

Which one specifically?

ForceWindowedMode = 1 no matter which mode use like window or borderless

now one thing about DxWrapper

[General]
RealDllPath                = C:\DXVK\d3d9.dll

[Compatibility]
EnableD3d9Wrapper          = 1

This two work individually (no matter if use at same time or one ON and other OFF)

[d3d9]
EnableWindowMode           = 1      // like windowedmode
FullscreenWindowMode       = 1      // like borderkess windowedmode

something is working OTHER THEN EXCLUSIVE FULLSCREEN MODE

I Mean DXVK only Crash(notWorking) with Game Exclusive/Default Fullscreen Mode

mirh commented 3 weeks ago

I thought you had said the game still got suck when using dxwrapper WindowedMode options, but I guess you meant in the menu then? Anyhow, FullscreenWindowMode should be it then.

And even that has a bunch of things it does.. It changes the window style, it forces the window position and it peeks the window to avoid the desktop thinking it's unresponsive. Either there's some odd ass magic with the former, or the game is doing something weird with the window size..

Can you try to play with the windows compatibility settings (from the game executable properties), or with the InitialWindowPosition dxwrapper options?

niresh1234 commented 3 weeks ago

using InitialWindowPosition still same as before

and only newGame crash, not save game and its dxwrapper issue (without DXVK still new game crash after cutscene) Screenshot (265)