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

SimCity 4 Deluxe Resolutions higher than 1080p in hardware mode #87

Closed Durfsurn closed 3 years ago

Durfsurn commented 3 years ago

Is there a way to get dxwrapper to play nicely with SimCity 4? All I could get were DDraw errors and defaulting back to software mode. What configuration + .dll files should I be using?

Any help would be wonderful, many thanks.

mirh commented 3 years ago

Try https://www.pcgamingwiki.com/wiki/SimCity_4#Poor_performance_on_modern_systems

Durfsurn commented 3 years ago

The restriction on resolution is a dx7 one not a sc4 one afaik. I am aware about the tricks on that page, they won't help here unfortunately.

mirh commented 3 years ago

Uh, if we are talking about the usual dx7 limitation then it's should be DDrawResolutionHack=1

elishacloud commented 3 years ago

SimCity 4 only supports 4 resolutions: 800x600, 1024x768, 1280x1024, 1600x1200

dxwrapper will remove the DirectX 2k limit, but the game does not take advantage of this. This game will not work on higher resolutions unless the game itself is modified or patched.

You can see that even the GUI does not allow for any more resolutions, as this is a static pre-rendered options page. There is no room on the page for more resolutions. Furthermore, my computer supports many more resolutions lower than 2k that are not listed, because the game itself limits the resolution to these 4 resolutions only.

As far dxwrapper working with this game, it works with both the Dd7to9 option in software render mode or with EnableDdrawWrapper with software and hardware rendering. DDrawResolutionHack is enabled by default if EnableDdrawWrapper is enabled, unless you manually disable it in the ini file.

If course if you are using the Dd7to9 option then DDrawResolutionHack is not needed since the 2k resolution limit only exists on DirectX 1-7 and this option will convert the game to DirectX 9.

dxwrapper.zip

image

Durfsurn commented 3 years ago

Thanks for your input, I'll have to mess around a bit more with the options.

One thing to note though is SimCity 4 does infact natively support widescreen resolutions through the use of command-line arguments. The game crashes however when going bigger than about 1920x1440 due to what I believe is a constraint of dx7, of which I was hoping to circumnavigate with the wonderful tools available in this repo. The game itself can render in software mode above the limit mentioned however this introduces many rendering bugs and isn't conducive to gameplay.

Thanks again for your information on the configuration above though, I'll definitely keep persevering :).

elishacloud commented 3 years ago

Ok, I just realized that there is a command line option that allows you to specify any resolution. I tested dxwrapper and 4k resolutions work fine.

Command line option is:

"SimCity 4.exe" -CustomResolution:enabled -r3840x2160x32

Here is a screenshot of it running at 4k.

image

Durfsurn commented 3 years ago

I can confirm that it does now work in hardware rendering above the previous limit! I appreciate your help with this! This repo is truly wonderful for breathing life into some new games!