dxwrapper
dxwrapper copied to clipboard
Transport Giant Crashes After Launch
Hi. I was testing if dxwrapper works with Transport Giant (Steam Edition, as well as the Gog Version). It seems like there's an AppCrash right after game starts and the main menu is about to load (FaultingOffset 00373e39).
The log doesn't show anything useful for me, but maybe it's just me :) dxwrapper-transportgiant.log
I wonder what settings in dxwrapper.ini I could try to run it?
From the log it looks like dxwrapper is not even doing anything in the game. What settings do you have enabled?
If the game is using DX7 or older I recommend enabling dd7to9.
If the game is using DX8 then I recommend enabling d3d8to9
If the game is using DX9 then I recommend enabling EnableD3d9Wrapper
If the game is using a version of DX higher than DX9 then dxwrapper probably won't help anything with this game.
It's 2003 game, so it's using DX7. 'Dd7to9' was already enabled, but I managed to "skip" the crash by setting HandleExceptions to 1, however there are hundreds of graphics bugs, no buildings or vehicles are displaying, and the game is blinking. So I suppose the game would need a lot of debugging to figure out what's wrong.
At the same time I started using dgVoodoo2 and it seems to work perfectly fine, and even allowed me to use 2k / 4k resolution with my small program: TransportGiantScreenResolutionLauncher.
So I suppose dv2 is still overpowered wrapper for directX 7 thanks to their video card emulation.
Ok, I didn't notice this before but it appears that dxwrapper is having an issue loading. It thinks it is already loaded. I may have a logic issue here. What stub(s) are you using and does dxwrapper only exist once in the folder? You don't accidentally have a renamed version of dxwrapper in there?
16296 04:41:58.647 DxWrapper already running!
Here is an updated dxwrapper and ddraw stub. Let me know what happens with this update: dxwrapper.zip
I only have ddraw.dll, dxwrapper.dll, dxwrapper.asi and dxwrapper.ini from the new files in the original folder (I have multiple backups of the unmodified game folder to make sure).
The new log is: dxwrapper-transportgiant.log
I guess it shows more now since there are unsupported instruction errors.
And of course in the game it looks... bad.
Just out of curiosity, I found this small .dll: https://github.com/UCyborg/LegacyD3DResolutionHack
Which seems to allow higher screen resolutions without dgVoodoo2. Is such a fix available in dxwrapper? I suppose it is, because there are DdrawCustomWidth entries in the configuration file, but just want to confirm :)
I only have
ddraw.dll,dxwrapper.dll,dxwrapper.asianddxwrapper.inifrom the new files in the original folder (I have multiple backups of the unmodified game folder to make sure).
You shouldn't have both dxwrapper.dll and dxwrapper.asi. I can see from the log that it is loading dxwrapper.asi and it should be also loading dxwrapper.dll, which isn't good.
Try deleting dxwrapper.asi.
Ahhh... I didn't expect the game to load .asi. But that's actually ddraw.dll's DLL doing this, so makes sense.
The new log is: dxwrapper-transportgiant.log
However, there are many graphical bugs:
The windowed mode worked, so dxwrapper is loading correctly.
I'm still using HandleExceptions on 1, otherwise game crashes after launch.
Ok, that looks a lot better. The only thing I can see wrong are these:
17876 00:57:35.453 UnhandledExceptionFilter: exception code=0xc0000005 flags=0 addr=00A23E39
17876 00:57:35.468 UnhandledExceptionFilter: NOP opcode=f len=4
17876 00:57:35.468 UnhandledExceptionFilter: exception code=0xc0000005 flags=0 addr=00A23D64
17876 00:57:35.468 UnhandledExceptionFilter: NOP opcode=f len=4
17876 00:58:00.176 UnhandledExceptionFilter: exception code=0xc0000005 flags=0 addr=00A22860
17876 00:58:00.176 UnhandledExceptionFilter: NOP opcode=f len=4
17876 00:58:02.646 UnhandledExceptionFilter: exception code=0xc0000005 flags=0 addr=00CA6B4C
17876 00:58:02.646 UnhandledExceptionFilter: NOP opcode=ƒ len=4
Try enabling only dd7to9. Let the game/Windows try and handle any exceptions.
With the default config and only Dd7to9 the game still crashes (closes) after launch:
I suppose it's at the moment when the game is trying to set a screen resolution.
It always starts in 1024x768, and then switches to the saved (supported) or the other screen resolution.
Ok, thanks. This looks like a similar issue to another game I have. I will have to debug this later.
BTW: did you say that the game works in Windowed mode? Are you using dxwrapper's windowed mode or the game's windowed mode?
The game has very limited graphics settings, so it only starts in the Full Screen mode, and since on-launch resolution is always 1024x768 it moves all other windows to different screens... very annoying, because I then need to move everything back with Win+Shift+Arrows. So by the Windowed mode, I meant that the game started in the windowed mode when I set it up to start this way in dxwrapper. That's how I knew that it's loading correctly.
By the way, does dxwrapper use the screen resolution fix, like: https://github.com/UCyborg/LegacyD3DResolutionHack ?
For me it looks like with dxwrapper and:
DdrawCustomWidth = 2560
DdrawCustomHeight = 1440
DdrawUseNativeResolution = 0
DdrawOverrideWidth = 2560
DdrawOverrideHeight = 1440
It still fallbacks to FullHD, from 2560x1440. Even if in the game config it's:
<DisplaySettings ScreenHeight="1440"/>
<DisplaySettings ScreenWidth="2560"/>
This config-screen-resolution modification works fine in dgv2 as well as with that mentioned LegacyD3DResolutionHack, but not with dxwrapper.
does dxwrapper use the screen resolution fix, like: https://github.com/UCyborg/LegacyD3DResolutionHack ?
Yes. That code is enabled by default in dxwrapper, but is not needed when using dd7to9 because that resolution limiter is only for DirectX7 and older.
For me it looks like with dxwrapper and:
I don't recommend setting those options. Those are for specific use cases where you need to stretch the game window in dxwrapper.
Try using this ini file: dxwrapper.zip
Yeah, the same AppCrash with that .ini, and with HandleExceptions on 1 it has the mentioned graphics bugs.
Regarding the resolution tweak, it still behaves differently. Normally that LegacyD3DResolutionHack or dgvoodo allow higher resolutions, but with dxwrapper it's never getting set to that one.
but with dxwrapper it's never getting set to that one.
I believe there is an exception in dxwrapper and some code is getting nulled out. dxwrapper queries all the resolutions and gives them all to the game. So you should see all resolutions in the game. However, when there is an exception it could cause any kind of effect.
Try enabling the DdrawLimitDisplayModeCount. Some games cannot handle a large list of resolutions and crash with modern computers that support so many resolutions.
Edit: some games remember the resolution based on the video card. With dxwrapper the game may think there is a different video card and thus set the resolution differently (i.e. back to default). Once the game is working you can then set the in game resolution as you like.
Ahh, somehow it worked now for the resolution. It's still not displaying in the game settings, but started after config file modification. I had to set the Windowed Mode to get there.
So only this weird graphics bug is remaining where buildings / vehicles are invisible. Possibly related to that AppCrash. It's not a big deal though, since I still can play fine with dgv2, just wanted to report this issue to help improve dxwrapper.
So only this weird graphics bug is remaining where buildings / vehicles are invisible. Possibly related to that AppCrash.
Is the game still crashing with DdrawLimitDisplayModeCount enabled?
Is the game still crashing with
DdrawLimitDisplayModeCountenabled?
Yes. and if additionally HandleExceptions is 1 (so it ignores the crash), then less resolutions are visible in Settings.
I don't think they hardcoded the resolutions on the list though. I did a lot of searching to find HEX with screen resolutions int displayed in not-too-long-code-distance (generally searched for multiple decimals in chunks of the binary to find the area with some of screen resolutions, but didn't find any).