The Suffering Series AiO Unofficial Patch

Getting old Windows games working.

The Suffering Series AiO Unofficial Patch

Postby UCyborg » 2017-11-01 @ 20:22

It recently came to my attention that GOG released both The Suffering: Prison Is Hell and The Suffering: Ties That Bind back in September. I got messaged on the other forum about some of the issues with those two games, it turns out there are more problems with them that I was initially aware of. So I thought I'd see whether I can fix or workaround some of the bugs.

Comparing the games as they were released back in the day with the GOG version, there weren't any changes code-wise, they tweaked two variables; lowered default vertical FOV, which gives the correct FOV only with wide 16:9 resolutions and unlocked the ability to select resolution with aspect ratio higher than 4:3.

Found out ThirteenAG made a widescreen patch that also tackles the 2D elements, but it has a fatal flaw that it just crashes the game on some machines at startup. Might be because he does the memory patching from a separate thread once the game code is already running, which is dangerous. I took care of that problem as well.

Download link: Google Drive

Here comes the list of fixes.

Common:
  • Fixed the bug with game interpreting available hard disk space value incorrectly, preventing users from saving the game and the config file from being updated if they have more than 2 TB of free space on their hard drive.
  • Widescreen support; all supported resolutions are selectable, FOV is adjusted according to the screen's aspect ratio, HUD and in-game FMVs are adjusted as well so they don't stretch with wide aspect ratios.
  • Resolutions available in fullscreen mode are also available in windowed mode.
  • Game will run on the first CPU core by default, needed because of engine's buggy multithreading.
  • Added updated IndirectSound library. Needed to fix sounds not being played because devs apparently never tested the game under condition where no hardware accelerated 3D buffers are available through DirectSound interface. These buffers are only available out-of-the box on Windows XP and earlier if user has the right sound card.
  • Added frame rate limiter which defaults to limiting the game to run at 58 FPS to workaround bugs that occur at higher frame-rates and provides better mouse response when monitor runs at 59/60 Hz and VSync is enabled.
  • Game will set monitor's refresh rate to 59/60 Hz when in fullscreen mode.
  • Mouse acceleration is disabled by default, but can be restored with a config option.
  • Removed bad DirectX check, game will launch without error or DirectPlay pop-up dialog on Windows 8+ if DirectPlay isn't present (which is the default).
  • Made game's message loop more conventional (PeekMessage called without message filtering) to workaround the bug in Windows' Desktop Window Manager, which causes oddities in windowed mode; window being declared unresponsive and replaced with a ghost window after 5 seconds when it loses focus. It even happens that the DWM tries to replace the game window with a ghost window during normal gameplay.
  • Use GetMessage in the message loop for the Riot Engine Configuration dialog rather than PeekMessage, this normalizes CPU usage of said dialog.
  • Registry settings are written to HKEY_CURRENT_USER instead of HKEY_LOCAL_MACHINE.
  • Removed all calls to RegFlushKey (not needed).
  • Removed the call to OutputDebugString that was needlessly made every frame.
  • Reordered icons in the .exe's resource so the Torque icon is the main one instead of the Riot Engine logo.
  • Embedded manifest in executables that enables Visual Styles on Riot Engine Configuration dialog controls, making their look match Windows theme settings.

Prison Is Hell specific:
  • Selecting anything but the first entry in the Display Driver drop-down list in Riot Engine Configuration dialog will no longer result in the empty Display Mode list, so the game can now be made to run on any monitor, not just the primary one.
  • Added window caption.
  • Disabled screenshot feature (F10 key) since it crashes.

Ties That Bind specific:
  • Registry settings are stored in a separate value called SettingsDX106 rather than SettingsDX105, which is used by the first game since the binary structures between the games aren't 100% compatible between each other.
UCyborg
Member
 
Posts: 145
Joined: 2015-9-04 @ 11:10

Re: The Suffering Series AiO Unofficial Patch

Postby Kerr Avon » 2017-11-01 @ 20:43

These two games are great! I have them on the original XBox (so your patch is unnecessary to me, but thanks anyway) and they are very underrated, I think. The design of the enemies is especially imaginative, compared to many first person shooters.
Kerr Avon
Member
 
Posts: 362
Joined: 2007-6-29 @ 14:33

Re: The Suffering Series AiO Unofficial Patch

Postby KainXVIII » 2017-11-01 @ 22:22

Thanks for your work!
PS - also can you shine light to this "problem" viewtopic.php?f=8&t=49226&p=516520&hilit=suffering+detail#p516520 ?
User avatar
KainXVIII
Member
 
Posts: 233
Joined: 2015-5-20 @ 15:04
Location: Yaroslavl

Re: The Suffering Series AiO Unofficial Patch

Postby UCyborg » 2017-11-02 @ 00:30

KainXVIII wrote:Thanks for your work!
PS - also can you shine light to this "problem" viewtopic.php?f=8&t=49226&p=516520&hilit=suffering+detail#p516520 ?

I'm mostly clueless when it comes to rendering related things, so I can't add much to what was said over GOG forums. Have no old machine around to test neither to see what's up with that checkbox. I'd be interesting though, the game is supposed to run on GeForce4 MX 440 which my previous PC had, DirectX 7 level graphics card, so no shaders.

The first Surreal's game (Drakan: Order of the Flame) based on the older iteration of Riot Engine also has this option, but I don't see anything different visually. From what I see in The Suffering, some surfaces do change appearance when you get close, take for example the door from which the correction officer comes after you leave the cell when the game begins, maybe this has something to do with it. Surreal also left a checkbox for unimplemented feature in that dialog in the past.

One thing I managed to find in Drakan is the value that defines how models get deformed when the camera moves away from them (level of detail). That'd be nice to tweak in The Suffering as well, it looks weird when characters are changing shape as you get close or move away from them. It may have been helpful in the old days for performance.

Speaking of performance, it's possible that this iteration of the engine wasn't designed in a way that would make things the most efficient. At least from little searching, making Direct3D calls from multiple threads is not good for performance, and the game does it. And there are strange bugs that have been observed when allowing the game to run multiple cores that disappear when setting affinity to one core. I wonder if the reason is not using critical sections everywhere it should. Well, it still runs "too fast" on modern machines, that bloody tying of everything in-game to frame rate. Double quotes because there's nothing wrong with pumping out frames at high speed.

Kerr Avon wrote:These two games are great! I have them on the original XBox (so your patch is unnecessary to me, but thanks anyway) and they are very underrated, I think. The design of the enemies is especially imaginative, compared to many first person shooters.

I also think they're one of those lesser known gems. And don't forget the morality system and how Torque's appearance changes in regards to his actions. Painkiller is also interesting when it comes to enemies' design. So many different monsters.

The sound is pretty messed up out-of-the box on PC, but at least IndirectSound takes care of the dropouts and restores 3D positional audio, there's just no reverb, only Creative ALchemy can give it back. It'd be nice to somehow fix the sound code to at least get rid of the dropouts when you only have the plain DirectSound without wrappers.
UCyborg
Member
 
Posts: 145
Joined: 2015-9-04 @ 11:10


Return to Windows

Who is online

Users browsing this forum: No registered users and 3 guests