dxwrapper icon indicating copy to clipboard operation
dxwrapper copied to clipboard

[dd7to9] [Hitman Codename 47] black screen

Open mcmtroffaes opened this issue 9 months ago • 10 comments

First, thank you for your awesome work!

I've been trying to get dxwrapper to run Hitman Codename 47 with DirectX 9. The game uses DirectX 7 natively. With dxwrapper, the initial intro video plays, but flickers, and soon the entire game goes black. Sound works and the game itself does not crash at this stage. This is with the latest version of dxwrapper, using ddraw.dll, and with Dd7to9 = 1 in the ini file; all other values were left at their default. FWIW, the game works fine with dgVoodoo2, and also natively it works fine.

The following error repeats throughout the log:

m_IDirectDrawSurfaceX::GetAttachedSurface2 Error: failed to find attached surface that matches the capabilities requested: {{ DDSCAPS_MIPMAP  DDSCAPS_TEXTURE },0x0,0x0,0x0} Attached number of surfaces: 0 MaxMipMapLevel: 0 Caps: {{ DDSCAPS_LOCALVIDMEM  DDSCAPS_TEXTURE  DDSCAPS_VIDEOMEMORY },0x14,0x0,0x0}

The full log file is here: dxwrapper-hitman.log

mcmtroffaes avatar Mar 12 '25 18:03 mcmtroffaes

I don't know if that is the issue. That error about MipMaps can typically be ignored. However, you could try enabling DdrawForceMipMapAutoGen.

elishacloud avatar Mar 12 '25 21:03 elishacloud

Thanks so much for the quick response. I tested again with DdrawForceMipMapAutoGen = 1 however flickering followed by black screen issue remains. FWIW I also tried DdrawIntroVideoFix = 1, again to no avail.

Is there anything I can do to further help diagnose the problem?

mcmtroffaes avatar Mar 13 '25 09:03 mcmtroffaes

Make sure there is no instances of LAV in the tray when this game is running, if there are LAV tray icons it means the game is using the LAV filters and codecs, which are historically not compatible with games.

Squall-Leonhart avatar Mar 13 '25 13:03 Squall-Leonhart

Thanks for the suggestion. I don't use LAV codecs/filters.

mcmtroffaes avatar Mar 13 '25 15:03 mcmtroffaes

Here are a few options you can try that sometimes help when the screen is black like this:

  • SetSwapEffectShim
  • DisableMaxWindowedMode
  • ForceDirect3D9On12
  • GraphicsHybridAdapter

I would recommend trying each of these separately, don't enable them all at once. Otherwise, I can test the game and see what is happening when I have some time.

elishacloud avatar Mar 18 '25 00:03 elishacloud

Thank you for the suggestions. I've tested each of these individually, and unfortunately I'm still getting the same flicker followed by black screen.

If it is possible for you to have a look, that'd be really great. Where possible, I can also help with testing/diagnostics.

mcmtroffaes avatar Mar 18 '25 11:03 mcmtroffaes

Yes, I will have to try this game myself and see what the issues are.

elishacloud avatar Mar 18 '25 17:03 elishacloud

The latest build seems to work for me. Make sure you select the "Direct3D" option under the Graphics option in-game.

Here is the latest build: dxwrapper.zip

Note: I am using the GOG version of the game.

elishacloud avatar Oct 31 '25 22:10 elishacloud

Thanks for looking into this! I've had some time to test.

  • It works in fullscreen mode. I've tested the FPS limiter (the game has physics bugs at high fps so this is very helpful), show fps, and anti-aliasing (you can enable it in-game but it does not work without dxwrapper). These options all work fine, and this is extremely helpful! The steam overlay does not work, but that's acceptable.
  • In windowed mode I still get the same glitches as originally reported. The game does not work in this mode.
  • The widescreen patch does not work, and trying to load the game with it results in "Direct3D: Unable to find a suitable display mode for true color." It suggests changing to 16bit or 32bit color resolution but doing that in the configuration does not help.

mcmtroffaes avatar Nov 02 '25 19:11 mcmtroffaes

For the record, widescreen patch used is here (I ignored the old dxwrapper files bundled with it): https://community.pcgamingwiki.com/files/file/2788-hitman-codename-47-widescreen-fix/ The patch works fine in windowed mode with ultimate asi loader (dsound.dll) and the OpenGL renderer (so without dxwrapper).

mcmtroffaes avatar Nov 02 '25 19:11 mcmtroffaes