VOGONS


Interstate '76 + Nitro Pack AiO Patch

Topic actions

First post, by UCyborg

User metadata
Rank Member
Rank
Member

Had this game on the TODO list for a while. When I recently tried to play it again, it was practically unplayable. Turned out it was much buggier than I was aware of. So I put together a patch which solves most of the problems people have been experiencing over the years. It even runs on the ancient Windows NT 4.0 (in software mode at least), which was totally unsupported until now. Of course, it runs great on Windows 10 as well and should theoretically run on computers with varying graphics hardware with nice graphics with the help of Glide wrapper. I recommend nGlide.

So now we assume you've already got it installed and got around the issue of 64-bit OSes not being able to run 16-bit installer. For base game, Gold Patch is prerequisite for applying my patch. For Nitro Pack, the only thing that's needed is A3D-Live! wrapper (included, can be installed any time) to fix the all-sounds-playing-at-100%-volume-at-player-position problem because game's DirectSound code is broken for some reason.

As usual for my patches, the goal is to get the game working with minimal amount of compatibility options. So you can turn off any compatibility options you've previously set on I76.EXE/nitro.exe executable and apply Disable_Interstate76_Compat_Shims.reg registry file. Game should have Modify permissions for its own folder. If it's located under Program Files and settings related to UAC/file system virtualization haven't been changed, there shouldn't be any problems, plus each user will have its own save files. Applies to Windows Vista and beyond. For older systems/other install locations, Users group may have to be granted Modify permissions explicitly on game folder (assuming we're running as user with limited rights).

Download link: Google Drive, PCGW

Here comes the changelog:

Common:

  • Fixed some, worked-around other memory management bugs, which improves stability; mission 12 -> 13 transition works in I76, also no more need for EmulateHeap shim (the only semi-useful thing from Windows 95 compatibility mode), which doesn't actually fix anything.
  • Fixed game freezing when clicking menu option if hardware sound acceleration is available.
  • Fixed certain startup crashes/errors when initing graphics with 3D accelerated renderers enabled (Glide/D3D).
  • Skipped some unnecessary CPU checking code containing privileged instructions (crashes at startup if privileged instruction exceptions aren't ignored by the OS).
  • Corrected memory checking code to avoid error about insufficient memory when system has more than 2 GB of RAM.
  • Fixed an issue with laggy physics simulation that occurs when the system has been running for several days.
  • Fixed an issue with music playback not restarting during gameplay after the track has finished playing (another issue that occurs when the system has been running for extended periods of time).
  • After the music track has finished playing during gameplay, the mission specific track will play again now instead of always the 1st music track.
  • Rearview mirror refreshes every frame now.
  • Includes Shane's netcode patch for compatibility with NAT, Nitro Pack version also forwards port on router when hosting the game (if UPnP is supported).
  • Fixed registry handle leaks.
  • Added frame rate limiter which defaults to limiting the game to run at 20 FPS to workaround bugs that occur at higher frame-rates.
  • GDI windowed mode now works on Windows NT systems.
  • Embedded manifest in executables:
    • Marked as high-DPI aware.
    • Requests version 6.00 of Common Controls Library to enable visual styles in those occassional message boxes.
  • Executables have been flagged as compatible with DEP (Data Execution Prevention).

Nitro Pack specific:

  • Clicking Scenarios in main menu will no longer stop music playback.

UPDATE 08/08/2019:

  • DxWnd's virtual CD audio feature now works when the computer doesn't have any optical drives.
  • Removed OS check from Nitro Pack's SPLASH.EXE (3D options are now always available).

UPDATE 08/12/2019:

  • Fixed inconsistent handling of playing CD music between Interstate '76 and Nitro Pack (took care of regression from the first patch release plus I76 specific bug - same track is not supposed to loop).
  • Fixed music volume controls so setting max volume in menus doesn't set it only to half.
  • Game can now select the correct CD drive for music playback when computer has more than one.

UPDATE 09/01/2019:

  • Fixed certain GDI object leaks.
  • Call DestroyWindow on exit (no more game window on the screen if the process is still held by the debugger).
  • Added frame limiter to the mission failed screen.

Some general thoughts:
At some point, I've read about the magic 24 FPS as the ideal frame-rate to get properly working physics. Obviously, when the game was made, nobody was talking about frame rates as game physics isn't intentionally tied to frame-rate. Devs just write code, overlook some details when implementing it and leave it at that if it appears to work correctly.

Anyway, my issue with the supposedly magic 24 FPS is that 7.62 MM MG firing sound is being interrupted at regular intervals while it sounds fine at 20 FPS, hence why I set the limit to 20 FPS.

Another important thing, the game really only works as long as it does without crashing on Windows 95 by accident. Saw some really bizarre code in there: accessing buffers beyond their boundaries, overwriting variable holding a pointer (handle) to one heap with pointer to another heap, setting some variable based on the content of uninitialized memory.

Some of the memory management bugs are still lurking in there and could cause the crash out-of-the-blue (could be more obvious with player-made maps, with which I'm not familiar with), but the most obvious ones have been identified and fixed. I was going to fix them from A - Z, but the first thing that is found with Page Heap enabled is some access beyond buffer boundary mid-play in some giant function, would need thorough look to identify the start and the end of actually allocated memory.

Thoughts about issues with graphics APIs - menus/cutscenes
There is something about how it uses DirectDraw for menus when you launch the game in 3D accelerated mode. Some palette related operation makes it either crash right away or just fail so it complains about inability to initialize 3D acceleration. This is the most easily worked around by invoking DIrectDraw without support for hardware acceleration. It still happens (Windows 10, probably 8.x as well) that one ends up with the black screen until something causes the picture refresh. This is the most easily observed if you have two screens and you invoke Aero Peek feature.

Besides DxWnd, which is mentioned in the ReadMe and can be used to get around that, there's also dgVoodoo2. dgVoodoo2 is also the easiest option to get around garbled color issues. I'm not sure if DxWnd can also be used to solve the color issues. Years ago, when I missed with Window 7's DirectDraw options to try to fix that, it didn't work permanently.

Playing music from disk
DxWnd's virtual CD audio option works, though at least at the time of this writing, volume can only be set in DxWnd application itself.

Last edited by UCyborg on 2019-09-18, 10:53. Edited 9 times in total.
Arthur Schopenhauer wrote:

A man can be himself only so long as he is alone; and if he does not love solitude, he will not love freedom; for it is only when he is alone that he is really free.

Reply 1 of 25, by DracoNihil

User metadata
Rank Oldbie
Rank
Oldbie

Would there be any way to patch the Shell component so it doesn't max out the CPU? The CPU usage looks nasty under Wine because of whatever the Shell must be doing.

“I am the dragon without a name…”
― Κυνικός Δράκων

Reply 2 of 25, by UCyborg

User metadata
Rank Member
Rank
Member

While in menus, it's just spinning in the loop checking for events. A lot of games don't call anything to block execution, so 100% CPU core usage is normal. Not too economical. I'll look into it, hopefully doesn't require putting Sleep calls in too many places.

Arthur Schopenhauer wrote:

A man can be himself only so long as he is alone; and if he does not love solitude, he will not love freedom; for it is only when he is alone that he is really free.

Reply 3 of 25, by DracoNihil

User metadata
Rank Oldbie
Rank
Oldbie

Well the way it must spin and check for events really hammers the hell out of wineserver (which is the "windows kernel equivalent" of Wine) and having the CPU usage fluctuate that badly isn't very acceptable to deal with for me.

I do notice the transitions ("Drive Offensively" ,etc) are much slower, was this intended too?

“I am the dragon without a name…”
― Κυνικός Δράκων

Reply 4 of 25, by UCyborg

User metadata
Rank Member
Rank
Member

Nothing special in the way of checking events, just plain old PeekMessageA being called in a loop. The transitions were slow due to frame-limiting, need to be handled specially. Try it now.

Arthur Schopenhauer wrote:

A man can be himself only so long as he is alone; and if he does not love solitude, he will not love freedom; for it is only when he is alone that he is really free.

Reply 6 of 25, by UCyborg

User metadata
Rank Member
Rank
Member

Minor update released, should now work with DxWnd's virtual CD audio feature also if the computer doesn't have any optical drives.

Arthur Schopenhauer wrote:

A man can be himself only so long as he is alone; and if he does not love solitude, he will not love freedom; for it is only when he is alone that he is really free.

Reply 7 of 25, by Destroy

User metadata
Rank Newbie
Rank
Newbie

Wow! This sounds like excellent work and news!

Besides Mech2, this is on my 'to replay list' but in the recent past, I always seemed to run into some glitch or another that would prevent fully and proper play execution of gameplay or graphics.

Thanks a million for your efforts and I'm anxious to try this out!

Reply 8 of 25, by DracoNihil

User metadata
Rank Oldbie
Rank
Oldbie

Is there a way to hack in music support that will actually function within Wine 1.8? the "_inmm" methods do not work whatsoever, and WINEDEBUG channels don't really help me figure out the root of the problem there...

No I can't upgrade my version of Wine either.

“I am the dragon without a name…”
― Κυνικός Δράκων

Reply 9 of 25, by UCyborg

User metadata
Rank Member
Rank
Member

DxWnd should work well for music. You should probably turn off DirectX hooks and other stuff when you create profile for the game. Then turn on virtual CD audio and emulation of CD pause capability on the Sound tab. Next version should address the issue with inability to change music volume in-game. There's an experimental update here addressing that issue, but it breaks certain other games' music ATM.

Arthur Schopenhauer wrote:

A man can be himself only so long as he is alone; and if he does not love solitude, he will not love freedom; for it is only when he is alone that he is really free.

Reply 10 of 25, by UCyborg

User metadata
Rank Member
Rank
Member

Did an update little over two weeks ago. Found two places leaking GDI objects, so those were fixed. Some still remain. At least when holding ESC in-game to toggle pause menu while in GDI windowed mode, the number doesn't keep increasing. Still increases in other modes, but slower.

Arthur Schopenhauer wrote:

A man can be himself only so long as he is alone; and if he does not love solitude, he will not love freedom; for it is only when he is alone that he is really free.

Reply 11 of 25, by 3371-Alpha

User metadata
Rank Newbie
Rank
Newbie

Now this is pretty cool! I was impressed with your patch for The Suffering but didn't know you made one for I76. There are two additional things you may want to look into. First, the interstate76.com forum member DIVER once had a texture patch for 16-bit video mode that fixed some textures not appearing correctly, such as roads on some maps being vanilla asphalt when the appear as (and are suppose to appear as) dirt or snow roads. It fixed some other things too like some signs I think. Best ask him, though I don't think he's been on in a while. His site use to be here, though it went down some time ago. Then there's also the software resolution patches, not that important thanks to nGlide but I do know of some people that can't make voodoo or D3D emulation work no matter what they do and I think this would be a nice fall back. It's worth noting that the exe used for the softres patch appears to be the European version cause it contains a txt file for info on the offsets edited to add the resolutions but they don't coincide with my GOG or old CD versions.

Reply 12 of 25, by UCyborg

User metadata
Rank Member
Rank
Member
3371-Alpha wrote:

Now this is pretty cool! I was impressed with your patch for The Suffering but didn't know you made one for I76.

Thanks! The I76 one is pretty recent. The one for The Suffering still needs some work; I hope to at least fix the widescreen code breaking the HUD (weapon selector) at some point.

3371-Alpha wrote:

First, the interstate76.com forum member DIVER once had a texture patch for 16-bit video mode that fixed some textures not appearing correctly, such as roads on some maps being vanilla asphalt when the appear as (and are suppose to appear as) dirt or snow roads. It fixed some other things too like some signs I think. Best ask him, though I don't think he's been on in a while.

I suppose these tackle the data files. Do you know if they have effect on stock maps?

3371-Alpha wrote:

Then there's also the software resolution patches, not that important thanks to nGlide but I do know of some people that can't make voodoo or D3D emulation work no matter what they do and I think this would be a nice fall back.

I knew about Luigi Auiremma's patches, they increase the limit in some code paths enumerating resolutions that decide if the given resolution is acceptable. By default, the limit is 1024x768, the patch increases it to 1600x1200.

I only get 1280x1024 as an additional resolution after the patch, which is a bit broken; external instruments display/1st person mode showing instruments (but not car interior) breaks, can't tell if because the resolution in question's aspect ratio is 5/4 or some other problem. Removing the limit altogether there doesn't get me 1440x1080. It's also weird that 1152x864 or 1280x960 aren't available either way.

So because it doesn't work as anticipated in its current form, it was omitted. That infamous problem with failing to init 3D acceleration problem that happens when you try Glide/D3D mode should be taken care of now. It may still happen on Windows 8.x/10 under certain circumstances; you may have to enable reduced color mode under compatibility tab in I76.EXE/nitro.exe properties to prevent the startup crash/the error message. These OSes have an interesting quirk; the very first time you launch an application, the OS will allow it to use 8/16-bit color modes. Only if the application requested any of those, they will be available to it after subsequent launches. It happens with I76 if you launched it in windowed mode the very first time that it doesn't work when subsequently launching it fullscreen, neither software or 3D mode.

D3D still has the old issue with non-clear road signs, plus a new issue that I'd call transparent texture bug that is probably the result of how old Direct3D works with modern graphics drivers. One can use dgVoodoo2 to get around the latter.

Arthur Schopenhauer wrote:

A man can be himself only so long as he is alone; and if he does not love solitude, he will not love freedom; for it is only when he is alone that he is really free.

Reply 13 of 25, by 3371-Alpha

User metadata
Rank Newbie
Rank
Newbie
UCyborg wrote:

Thanks! The I76 one is pretty recent. The one for The Suffering still needs some work; I hope to at least fix the widescreen code breaking the HUD (weapon selector) at some point.

I actually managed to put together a Nvidia profile for The Suffering which allows SGSSAA, HBAO and SLI (untested, Don't have an SLI setup but copied the bits from the second game under the assumption they'd be compatible). I can post it if you'd like.

UCyborg wrote:

I suppose these tackle the data files. Do you know if they have effect on stock maps?

The only mission I currently recall the roads at least having issues on is mission 4 with the dream where you race Patriot. Thinking about it now, I may have it backwards. The dream is in black and white and a regular asphalt road wouldn't look too off. I think it actually defaults to the dirt road, either way it isn't right looking in 16-bit modes on either software or hardware accelerated.

About A3D though, seams there's also more fixes than just A3D-Live!. There's also Creative's official wrapper, A3Dx5, which I believe they included with their drives for a while after they bought out Aureal kind of in the same manor Nvidia did with GLide, and QSound's wrapper which was used by some of their VIA boards. All of them wrap to DirectSound3D though so DSOAL, indirectsound or Alchemy is still needed. There's also A3D Alchemy, which by files size and details tab it appears to be based on the QSound DLL though a checksum determined it was modified for a reason I don't know. Despite the word "Alchemy" it's actually pre-packed with indirectsound. According to the url it's hosted here on Vogons but a search reveals little info about the pack. As for which on is best, it's anyone's guess but I still though they were worth mentioning.

Reply 14 of 25, by BEEN_Nath_58

User metadata
Rank l33t
Rank
l33t
UCyborg wrote on 2020-05-09, 16:31:

I managed to fix/workaround a bunch of bugs in Interstate '76 and published a patch for it. Made a topic here.

I managed to get it run using dgVoodoo MS and 3dfx files. However, the DirectInput code is broken for the game in some way, as the keyboard and mouse workd in gamr but shows error when changing settings in game.
Will try DSOAL and A3D Alchemy for thr sound thing as A3D live no way installs in my PC. The official Aureal wrapper has the same problem too.

For installation, I noticed setup. Crash even while using OTVDM, so I copied all the files from CD 1, ran a VM and installed a copy too and copied all the missing filrs from VM to main system and game works.

previously known as Discrete_BOB_058

Reply 15 of 25, by BEEN_Nath_58

User metadata
Rank l33t
Rank
l33t

Those who have problems in Incoming, you are using the Riva 128 version. GOG uses Diamond Monster 3d version(voodoo 1) which works without any lag and thr same applies to its CD version too.

previously known as Discrete_BOB_058

Reply 16 of 25, by Shagittarius

User metadata
Rank Oldbie
Rank
Oldbie
Discrete_BOB_058 wrote on 2020-05-09, 17:46:

Those who have problems in Incoming, you are using the Riva 128 version. GOG uses Diamond Monster 3d version(voodoo 1) which works without any lag and thr same applies to its CD version too.

I'm using the version that originally shipped with my 3Dfx card, it's the 3dfx version and its broken, same with the GOG version.

Reply 17 of 25, by HunterZ

User metadata
Rank l33t++
Rank
l33t++

Moderator note: Moved some posts from the problematic games thread to keep them all in one place. Thanks for your understanding.

Reply 18 of 25, by BEEN_Nath_58

User metadata
Rank l33t
Rank
l33t
Shagittarius wrote on 2020-05-09, 18:01:
Discrete_BOB_058 wrote on 2020-05-09, 17:46:

Those who have problems in Incoming, you are using the Riva 128 version. GOG uses Diamond Monster 3d version(voodoo 1) which works without any lag and thr same applies to its CD version too.

I'm using the version that originally shipped with my 3Dfx card, it's the 3dfx version and its broken, same with the GOG version.

What wrapper do you use, I have no problems with nglide or dgvoodoo. Also don't select any compatibility settings.

previously known as Discrete_BOB_058

Reply 19 of 25, by kjliew

User metadata
Rank Oldbie
Rank
Oldbie

There is always an advantage for games supporting 3Dfx Glide for the option to play the game from emulation such as DOSBox/QEMU through Glide wrappers such as dgVoodoo2. All kind of tricks/patches for making old games work on modern Windows OS are lengthy, stealthy and could be cumbersome, who knows when all would break again for the next Windows 10 upgrade. Personally, I think it is simpler to keep the legacy OS using VM and run the game AS-IS.