-
Notifications
You must be signed in to change notification settings - Fork 91
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
help with fixing swat 2 #45
Comments
I have never played this game but I picked it up from Steam. This game draws most of the screen using GDI, however the large map is drawn using ddraw. This mix of ddraw and GDI in the same screen is likely why most of the other wrappers don't work. SWAT 2 only uses a few ddraw features, mainly Blt. The performance issue seems to be some delay in the Blt calls. I tried sending the Next I tried using dd7to9 to convert ddraw into Direct3D9. That seemed to solve the performance issue, as expected. However, Direct3D9 does not play nice with GDI so the GDI parts of the screen simply turned black. I tried using several other wrappers, such as dgVoodoo2, DDrawCompat and cnc-ddraw. Most of them just crashed. I was able to get older versions of DDrawCompat working, sort of. At least they did not crash. However, the map was not displayed at all. So I turned to the next solution. I used the Download patch: dxwrapper.zip |
your new fix doesn't seem to want to work on my end, it crashes when loading the mission. tried on both gog and steam versions. |
It looks like it is failing when trying to create the device context, but I am not sure why. I added some extra logging to help isolate the issue. Please try the build below and send me the log file. Download patch: dxwrapper.zip |
dxwrapper-swat.log |
OK, I believe I see what the issue is. It will take longer for a generic fix, but this one should work for now. Download patch: dxwrapper.zip |
|
@Volcanotron, here is my first attempt at a generic fix for one of the issues. Can you test this and let me know if it works for you? Download patch: dxwrapper.zip |
dxwrapper-swat.log |
Thanks @Volcanotron! Making the other part of this fix generic will take a bit longer, however I can test the rest of the fixes myself. This fix required help from you since I could not reproduce this issue. |
Closing. If there is still an issue you can re-open. |
Hey! Sorry to resurrect such an old thread. I came across this trying to get SWAT 2 to work on my PC. The fix you posted on Oct 28, 2019 seems to work great, but I have to drop my resolution to 1920x1080. If I play at 2560x1440, it crashes as soon as it tries to open the game. I can obviously live with the lower resolution if I have to, but I wanted to double check I'm not missing something! (Unfortunately the latest release of dxwrapper doesn't seem to fix the game.) Thanks very much! (It also seems to be running at a reasonably low FPS soon, but I'm not sure if that's just how the game is or not, hehe.) |
If I had to take a gues... |
@adamscoble, if you are not already, try using the latest released build from here. Just extract the dxwrapper.dll and ddraw.dll files from the release and replace the old files. Also, make sure you have @mirh, this game does not use Direct3D so it should not have any issues with 4k. But it could be a bug in the game also. |
@elishacloud Thanks for the reply! So downloading the latest version and changing just the settings you mentioned crashes when I try to start a campaign (when a video plays). Setting the .exe to run in Windows XP (Service Pack 2) compatibility mode results in: 2560x1440: 1920x1080 1920x1440 (+ 16 bit reduced colour mode) 1920x1080 (ExcludeProcess = MapConstructor.exe) Possibly unfixable |
@elishacloud Sorry for the double message! Just confirming the above is what you meant by logs? (And if they're useful at all.) Absolutely zero pressure, just wanted to double check! |
Sorry for the delay in responding. I took at look at your logs and I believe the issue is the following items:
Neither of these should be happening with this game. I will need to add more logging into the module to figure out why that is happening. I will give you an update when I have time to create the additional logging. |
That's great, thanks very much @elishacloud! |
Started playing this game after so long, and just wanted to say thanks for the up-to-date fixes! Dropping the resolution to 1920x1080 and installing your dxwrapper fix works! The only bug keeping me from playing now is on "Riot in the Valley". The game attempts to load resources but then crashes to the desktop with a weird message saying something about the M40A1 sniper rifle being used by the United States Marine Corps. |
Hey @elishacloud! Just checking in to see if any recent releases address this or if you haven't had time to get to it? The latter is completely understandable, just making sure I didn't miss it! |
This issue is resolved with the latest release. Just enable Edit: this game only works on Windows 10 and older. Windows 11 causes this game to crash. |
To get this game working in Windows 11 you can:
|
Is replacing the movies also good enough? |
Presumably replacing the movies with new movies with the same file name encoded with a different AVI codex would work, though I did not test it. The issue is a Windows memory error and has to do with memory management on Windows 11. Also, SWAT 2 only supports windowed mode, AFAIK. I don't think any kind of optimizations would help here. |
The optimizations kick in automatically AFAIK, and W11 specifically enrolled windowed apps. |
Yes, I tried a number of shims and could not find one that solves this. I do know that at least one of the memory shims (HeapEmulation) is broken on Windows 11. I searched and could not find anyone else who found a shim that solves this issue. Anyways, I did not want to spend anymore time on this because I have lots of other things to do.
It could be. I did try and disable all the memory protection I could from the device Exploit Protection page and none of them helps. Anyways I had VBS enabled on Windows 10 without an issue. This issue is specific to Windows 11. Edit: corrected. |
I see (even though I seemed to understand W10 was still good). |
Yes, I think you are right that the HeapEmulation issue is only on Windows 11. |
I was wondering if you could give some advice with improving Swat 2's fps at higher resolutions.
it seems to be bound to the size of the playable viewport since i can resize to make it smaller to make the game playable again or make it larger to fit a modern resolution but it causes to be unplayable.
I've used dxwrapper,dgvoodoo and many other things
heres a video of it in action https://www.youtube.com/watch?v=j0UYJCSgN9M
The text was updated successfully, but these errors were encountered: