• Welcome to SC4 Devotion Forum Archives.

How to run SimCity 4 Natively above 1920x1080 in Hardware Mode!!!

Started by Durfsurn, September 27, 2020, 05:23:40 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Durfsurn

So I recently bought a new computer screen with the jaw dropping resolution of 5120×1440 and was looking into getting SimCity 4 to run at something closer to native resolution.

It has been known to the community for some time that SimCity 4 is locked to resolutions under 2048ish pixels either wide or high in hardware mode, the source of this limit is DirectX 7 which cannot handle resolutions any higher. This could be circumnavigated by running SC4 in software rendering mode (CPU only) but this caused other issues and notably reduced the graphics.

However I have found a fantastic repository which can breathe new life into many games that use DirectX 9 or earlier called dxWrapper which includes a Legacy Hack for removing the resolution restriction, among other tricks.

Anyway, with the help of one of the fantastic developers (elishacloud), a configuration was found that enables resolutions such as 4k and beyond! You can follow the Github Issue here but I will provide a summary below;


  • IMPORTANT DO NOT SKIP THIS STEP: Make sure your game is patched with the NTCore 4GB patch!
  • Download the latest release of dxWrapper from this link: https://github.com/elishacloud/dxwrapper/releases
  • Open the .zip in 7zip or WinRar and separately navigate to your SimCity 4 Deluxe/Apps folder.
  • Extract the following files from the .zip: dxwrapper.dll, dxwrapper.ini, Stub/ddraw.dll and copy them into your Apps folder (next to your SimCity 4.exe file.
  • Open the dxwrapper.ini file and paste the code below into it.
  • Use a SimCity 4 Launcher to select any resolution you like!

I am hoping to follow up this post with a guide on how to run the game at higher than native resolutions and scale it down to provide the greatest graphical fidelity.

- Billy

dxwrapper.ini:
;; Config file for DirectX DLL Wrapper
[General]
RealDllPath                = AUTO
WrapperMode                = AUTO
LoadCustomDllPath          =
ExcludeProcess             =
IncludeProcess             =
RunProcess                 =
WaitForProcess             = 0
DisableLogging             = 0

[Plugins]
LoadPlugins                = 0
LoadFromScriptsOnly        = 0

[Compatibility]
Dd7to9                     = 0
D3d8to9                    = 0
DDrawCompat                = 0
Dinputto8                  = 0
DisableGameUX              = 0
DSoundCtrl                 = 0
DxWnd                      = 0
EnableDdrawWrapper         = 1
HandleExceptions           = 0
SingleProcAffinity         = 0

[DDrawCompat]
DDrawCompat20              = 0
DDrawCompat21              = 0
DDrawCompatExperimental    = 0
DDrawCompatDisableGDIHook  = 0
DDrawCompatNoProcAffinity  = 0

[ddraw]
ConvertToDirectDraw7       = 0
ConvertToDirect3D7         = 0
DdrawOverrideBitMode       = 0

[Dd7to9]
AutoFrameSkip              = 0
DdrawEmulateSurface        = 0
DdrawLimitDisplayModeCount = 0
DdrawUseNativeResolution   = 0
DdrawClippedWidth          = 0
DdrawClippedHeight         = 0
DdrawOverrideWidth         = 0
DdrawOverrideHeight        = 0
DdrawOverrideRefreshRate   = 0
DdrawIntegerScalingClamp   = 0
DdrawMaintainAspectRatio   = 0

[d3d9]
AntiAliasing               = 0
EnableVSync                = 0
EnableWindowMode           = 0
FullscreenWindowMode       = 0
WindowModeBorder           = 0

[FullScreen]
FullScreen                 = 0
ForceWindowResize          = 0
WaitForWindowChanges       = 0

[DSoundCtrl]
Num2DBuffers               = 0
Num3DBuffers               = 0
ForceCertification         = 0
ForceExclusiveMode         = 0
ForceSoftwareMixing        = 0
ForceHardwareMixing        = 0
PreventSpeakerSetup        = 0
ForceHQ3DSoftMixing        = 0
ForceNonStaticBuffers      = 0
ForceVoiceManagement       = 0
ForcePrimaryBufferFormat   = 0
PrimaryBufferBits          = 16
PrimaryBufferSamples       = 44100
PrimaryBufferChannels      = 2
ForceSpeakerConfig         = 0
SpeakerConfig              = 6

eggman121

Top work Billy  &apls

I don't have a screen larger than 1920x1080... However



So with some tweaks in your graphical settings, (If you have the right hardware), You can spread the game over multiple monitors.

Great work again Billy ;D

(+) 1 ;)

-eggman121

AsimPika3172

I loves Sim City forever!

jeffryfisher

Quote from: Durfsurn on September 27, 2020, 05:23:40 PM
It has been known to the community for some time that SimCity 4 is locked to resolutions under 2048ish pixels either wide or high in hardware mode, the source of this limit is DirectX 7...

1) Is DX-7 really involved, or is that a typo of DX-9? (I thought SC4 used DX-9)

2) Does the game now handle the region view ok after saving cities in modes with more than 1028 pixel-rows?

Thanks,

Jeff
Modding PC games since 1993 (back when we needed hex-editors)

Durfsurn

As far I as I can work out SC4 uses DX7. DX9 didn't have this resolution restriction.

Its still not recommended to use the Save to Region button.

jeffryfisher

Quote from: Durfsurn on September 28, 2020, 04:23:44 PM
As far I as I can work out SC4 uses DX7. DX9 didn't have this resolution restriction.

Its still not recommended to use the Save to Region button.
All my previous reading mentions DX9, but that could be based on backward compatibility to DX7 functionality.

I wasn't asking about the save-and-exit button. I was asking about the appearance of the region view after any save of any city when in a screen resolution having more than 1028 lines. In the past, such saves have produced short snapshots of the cities that don't fill and fit together in the region view (leaving dark-blue bands where the background shows through). Does this wrapper fix that?

And a new question: With this wrapper in place, how far can we go with graphics card driver support for DX versions? Can we now use drivers supporting DirectX 12 but not 9? Or are we still limited to legacy drivers supporting DX-9c?

Thanks!
Modding PC games since 1993 (back when we needed hex-editors)

Durfsurn

Ah the region preview bug? The one that fills in some of the city with weird black backgrounds on undeveloped land? Yeah that still exists unfortunately. I'm working through the massive amount of options in the dxWrapper and in theory yes SC4 could be mapped to dx9 using the wrapper but I'm almost certain that beyond that is impossible due to how DX10 and above works.

Just on the preview bug, I found that a fully developed tile (Large size) does in fact preview properly but when I saved a tile with untouched land it bugs out. More investigation is need I'm afraid.

APSMS

Is it necessary to use the SC4 Launcher or can this be used with just the SC4 Shortcut with target command line?
Experience is something you don't get until just after you need it.

My Mayor Diary San Diego: A Reinterpretation

Durfsurn

A launcher is not necessary. All a launcher does is run the exe with the specified arguments.


mgb204

Quote from: jeffryfisher on September 28, 2020, 08:26:40 AM
1) Is DX-7 really involved, or is that a typo of DX-9? (I thought SC4 used DX-9)

My understanding is that the code was designed for DX 7, but remained fully compatible up to DX 9, which if I'm not mistaken is included the released CDs. Using DX 9.0c natively, i.e. not as a legacy mode of a later DX version, is not possible in versions of Windows higher than Vista. If you have a later version of DirectX, then theree is the potential for compatibility issues, but the problems are far more likely to come from the GPU side. Because even with a later version of DirectX, it retains compatibility for legacy DX versions. Literally, you can use DX 9 or earlier with a later version of DirectX installed, but your GPU needs to support the legacy API modes a particular app requires.

As the years have gone by, technology has inevitably changed, such that more and more users have trouble using legacy DirectX games. From what I understand, this modified version of DDraw, an API of DirectX, simply gives more modern hardware better legacy support through some sort of emulation layer. I don't personally own GPUs new enough or that suffer from these issues. But if you are on Windows 10 with a modern mid-high end GPU, it does appear using this 'hack' can dramatically improve performance. Although it doesn't allow SC4 to fully utilise the hardware, it just means if compatibility issues were causing poor performance, the method has the potential to resolve the problem. So this is not only useful for those with higher-resolution displays, it has more utility.

Another thing if you're on Windows 8/10 and have suffered from the "Double Click using Multi-Stage MMPs" problem, using DInput from the same package, resolves this problem and now such MMPs work as intended again. I'm re-posing from ST, but you just need to edit the property as follows in dxwrapper.ini:

Dinputto8                  = 0

to

Dinputto8                  = 1

This switches on the included DInput from DX 8. In this case I'm not sure if that's a modified API or if it just allows us to run DInput 8 natively. But this does point the finger of blame squarely at DirectX 12 as the source of the issue. Since Windows 7 users, who can only use DirectX 11, never had the problem.

This is such a great find and potentially could provide even more gifts in future.