elishacloud / dxwrapper

Fixes compatibility issues with older games running on Windows 10/11 by wrapping DirectX dlls. Also allows loading custom libraries with the file extension .asi into game processes.
zlib License
1.16k stars 83 forks source link

Is a "Direct3D7 to Direct3D9" option possible? #101

Closed SlyCooperReloadCoded closed 9 months ago

SlyCooperReloadCoded commented 3 years ago

I've been looking all over the internet and I can't find a single Direct3D7 wrapper. Several games I play use Direct3D7 and don't get along with Windows 10 that well. Is this possible to create? There is a Dd7to9 option in here, but that's DirectDraw, not Direct3D, and causes all Direct3D7 programs to crash.

mirh commented 3 years ago

Dd7to9 is also supposed to cover d3d7. It's just that at the moment its support is quite "in progress". You can try some other wrapper meanwhile.

SlyCooperReloadCoded commented 3 years ago

DXGL is the only other wrapper that goes from Direct3D7 to other renderers, but all games crash when using it. I've gone though their technical support and they don't know what's up. I guess I'll just wait for this since I've already found lots of uses for this program.

mirh commented 3 years ago

There's also wined3d and dgVoodoo2.

elishacloud commented 3 years ago

You could also try DDrawCompat. It does not go to anther renderer, but it is pretty good about making Direct3D7 game run well on Windows 10. It is certainly worth a try. Also, what Direct3D7 game are you trying to get working?

BTW: I am working on getting Dd7to9 fully functional with Direct3D7, as @mirh mentioned. However, this project is one of my many hobbies and I don't have a lot of time to work on it...

SlyCooperReloadCoded commented 3 years ago

The game itself runs fine on Windows 10, but I'd like to get it to at least Direct3D9 so I can use things like ReShade. It's an old 2003-era game called Stranded 2, you might've heard of it. Stranded 3 is still in development, but Stranded 2 is stuck with Direct3D7.

elishacloud commented 3 years ago

dgVoodoo2 will convert Direct3D7 to Direct3D12. ReShade does support Direct3D12.

SlyCooperReloadCoded commented 3 years ago

I've tried using dgVooDoo, it fails to hook into any game. I set it up following tutorials, click play, and it launches the games without dgVooDoo hooking into it. I've tried everything, and their technical support also doesn't know what's up. All I need is one singluar DLL file (think dxvk) that does all this automatically.

RibShark commented 3 years ago

GOG has custom a DLL bundled with some games (e.g. Metal Gear Solid) that can do this (D3D7 to 9), but it's compatibility is iffy.

elishacloud commented 3 years ago

Yeah, I have seen the ddraw.dll file in some of the games. I have not investigated the file much, but could be interesting to log the API calls and see what they are done. Thanks.

eddmanx commented 1 year ago

I've tried using dgVooDoo, it fails to hook into any game. I set it up following tutorials, click play, and it launches the games without dgVooDoo hooking into it. I've tried everything, and their technical support also doesn't know what's up. All I need is one singluar DLL file (think dxvk) that does all this automatically.

It's working fine with that game. Just copy over the D3DImm.dll and DDraw.dll files from the MS/x86 folder to the game's base directory (where StrandedII.exe is).

If you want to customize its options, also copy over the dgVoodooCpl.exe and dgVoodoo.conf files.

elishacloud commented 10 months ago

With the latest unreleased build I have gotten Dd7to9` working with some Direct3D7 games. For example, it is fully working with Unreal Gold, Black & White and Avernum: Escape From The Pit (just to name a few). I plan to release the update later this year.

eddmanx commented 10 months ago

With the latest unreleased build I have gotten Dd7to9` working with some Direct3D7 games.

That's some great work. Would it be compatible with XP? Any plans for D3D2-6?

elishacloud commented 10 months ago

Yes, it has features to support a number of Direct3D-Direct3D6 APIs. In fact, it already partially works for at least one game that uses the Direct3D3 interfaces, namely Wizards and Warriors. I hope to get it working on most Direct3D-Direct3D7 games.

elishacloud commented 9 months ago

The latest release of dxwrapper supports converting from "Direct3D7 to Direct3D9". It used the Dd7to9 option and it does not support very may games yet. I will add more support over time.

SlyCooperReloadCoded commented 9 months ago

Sorry if this is a stupid question, but where exactly is this option? It's been years since I remembered this program existed, and I can't find that option anywhere, even though I apparently found it before.

elishacloud commented 9 months ago

The option is in the dxwrapper.ini file. You can see what the file looks like here.

SlyCooperReloadCoded commented 9 months ago

I went ahead and tried this (and d3d8-to-d3d9 because I didn't know that existed) on all the games that I wanted to use this on. Half of them instantly crash on boot with their own game-specific generic errors, and the other half boot up with severe graphical corruptions and eventualy crash with their own game-specific errors. Looks like I'll have to wait longer!

elishacloud commented 9 months ago

Yeah, there are only a handful of games that work with Diect3D7 to Direct3D9. Unreal Gold is one of them. If you send me the logs I can see what function is missing for these games.

As far as Diect3D8 to Direct3D9, that is pretty mature and should work with most games. I am only aware of a handful of games with issues with this.

SlyCooperReloadCoded commented 9 months ago

The DivoGames AirStrike series uses Direct3D8, using d3d8-to-d3d9 causes black boxes instead of shadows in levels where there's barely any geometry. Levels with lots of geometry crash the game.

Unreal Software's Stranded II uses Direct3D7, I should ask, there is no d3d7.dll in the Stub folder, so I just used ddraw.dll. It immediately crashed on boot with the game's own "Memory access violation!" error. Is there a reason for a lack of d3d7.dll?

mirh commented 9 months ago

It never existed. https://superuser.com/questions/639265/what-dlls-does-directx-5-use

SlyCooperReloadCoded commented 9 months ago

Ah okay, so it's just broken.

elishacloud commented 9 months ago

Yes, Direct3D was built on top of DirectDraw (ddraw.dll) uses d3dim.dll for 1-6 and d3dim700.dll for Direct3D7. However, dxwrapper just implements all of it in a single dll called dxwrapper.dll. dxwrapper will then hook ddraw.dll (or d3d8.dll or whatever is needed).

As far as DivoGames AirStrike, you could make a report here.

For Unreal Software's Stranded II, it will probably be fixed later when I add more Direct3D7 support.

Raa2020740 commented 8 months ago

Hello elishacloud,

I have been tinkering with Braveheart (the game) for quite a while now but nothing works quite like it should. The best result I got was with DXWND and dgvoodoo2 (using the glide-version (Braveheart has 3 exe-files: Software-mode, Glide & DirectX) yet the movies still dont work in that constellation.

I tried every setting imaginable - with DXWND and dxwrapper and/or dxcompat (another wrapper), yet they all have problems. My last hope was dxwrapper, yet it doesnt work either. Foremost problem is the menue. Explanation: The "background" flickers like crazy and it has a weird "afterimage" problem: If you click in the menue (highlighted items are fine weirdly enough), the "backgrounds" stay like an echo and flicker like mad. Same effect occurs ingame in the strategy mode of the game.

I tried dxwrapper with many different ddraw-options but it all flickers or I get only a blackscreen etc.

I really would like to try out the Dd7to9 option, hoping it would solve these issues (maybe), yet it crashes if I start the game, sadly. I added my logfile for inspection (1680x1050 is my native resolution). Maybe you have an idea or could help any other way? I tried Dd7to9 troubleshooting but it doesnt work either. Only Software-mode works but flickering again.

As far as I can see Braveheart uses DirectX6.1 (and ddraw.dll). I'm out of ideas by this point.

For testing the game, it can be "found" online.

dxwrapper-bhd3d.iconfix.log