Comments (27)
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 DDBLT_ASYNC
flag to see if that would speed up the Blt's but it had no effect.
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 dd7to9
code, but output this to GDI. I had to hard code certain coordinates, and there are still minor glitches, but it seemed to work. You need to set the compatibility settings on the game to use Windows XP (Service Pack 2)
and 16-bit Reduced color mode
.
Download patch: dxwrapper.zip
from dxwrapper.
@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 Dd7to9
and DdrawWriteToGDI
options enabled in the ini file and set DdrawOverrideBitMode = 16
. If you still have issues after that then send me your log file.
@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.
from dxwrapper.
This issue is resolved with the latest release. Just enable Dd7to9
. You should not need any other setting enabled.
Edit: this game only works on Windows 10 and older. Windows 11 causes this game to crash.
from dxwrapper.
I would have guessed that microsoft has a shim for every possible quirk of MM?
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.
Or is this specific to VBS/HVCI?
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.
from dxwrapper.
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.
I really appreciate the help
from dxwrapper.
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
from dxwrapper.
dxwrapper-swat.log
heres the new log
from dxwrapper.
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
from dxwrapper.
seems to be working now
dxwrapper-swat.log
and heres the new log for it. the gog version seems to load into the level faster than the steam version
from dxwrapper.
@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
from dxwrapper.
dxwrapper-swat.log
yep seems to working champ
from dxwrapper.
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.
from dxwrapper.
Closing. If there is still an issue you can re-open.
from dxwrapper.
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.)
from dxwrapper.
If I had to take a gues...
https://github.com/elishacloud/dxwrapper/wiki/Configuration-(advanced)#ddraw
from dxwrapper.
@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:
Crash when attempting to start the actual mission.
dxwrapper-swat-2560x1440.log
1920x1080
Very long load times (might not be able to do anything about this of course)
A blue screen in the actual gameplay area (which is I believe one of the original problems of the thread)
However weirdly it has stopped going through to gameplay now and is crashing the same way that 1440p did.
dxwrapper-swat-1920x1080.log
dxwrapper-swat-1920x1080-crash.log
1920x1440 (+ 16 bit reduced colour mode)
It actually started loading the gameplay, but crashed after a short while.
dxwrapper-swat-1920x1440.log
1920x1080 (ExcludeProcess = MapConstructor.exe)
I noticed this property was different from the earlier version in this thread, so I tried that and still saw a crash after loading but thought maybe the log was also useful.
dxwrapper-swat-1920x1080-exclude-map-constructor.log
Possibly unfixable
Cutscenes play in widescreen when the resolution is in widescreen (fill the window), it'd be great if they could play in 4:3 but I'm already incredibly thankful for your work! Haha.
from dxwrapper.
@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!
from dxwrapper.
Sorry for the delay in responding. I took at look at your logs and I believe the issue is the following items:
18840 17:12:35.384 m_IDirectDrawSurfaceX::CopySurface Error: not supported for specified source and destination formats! D3DFMT_X8R8G8B8-->D3DFMT_R5G6B5
13564 17:12:41.631 m_IDirectDrawSurfaceX::CreateDCSurface Error: failed to create compatible DC!
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.
from dxwrapper.
That's great, thanks very much @elishacloud!
from dxwrapper.
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.
Has anyone else seen this?
from dxwrapper.
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!
from dxwrapper.
To get this game working in Windows 11 you can:
- Use dxwrapper with
Dd7to9
enabled. - Rename the "movies" directly or disable movies. The Movie codex causes a crash on Windows 11.
from dxwrapper.
Is replacing the movies also good enough?
(also.. maybe this is just autosuggestion, but could the issue have anything to do with the forced windowed optimizations?)
from dxwrapper.
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.
from dxwrapper.
The optimizations kick in automatically AFAIK, and W11 specifically enrolled windowed apps.
But anyhow, if this isn't graphics-related.. I would have guessed that microsoft has a shim for every possible quirk of MM? Or is this specific to VBS/HVCI?
from dxwrapper.
I see (even though I seemed to understand W10 was still good).
from dxwrapper.
Yes, I think you are right that the HeapEmulation issue is only on Windows 11.
from dxwrapper.
Related Issues (20)
- Lego Rock Raiders - Incompatibility / Black screen
- Gangsters: Organized Crime not starting HOT 4
- Tropico dd7to9 causes "No 3D Hardware available" tropico Steam Version HOT 29
- How to contact you? HOT 4
- How to properly remove dxwrapper HOT 2
- [Warning] Area 51 (2005)
- Army Men RTS bright issue with Dd7to9 HOT 23
- Mechwarrior 3 on Vista HOT 3
- [Freelancer (2003)] Odd-looking shadow appears when camera moves up/down (D3d8to9 only) HOT 3
- Project I.G.I crashes when i tried to use `Ddraw7to9` HOT 15
- `EnumDisplaySettingsExA` hook function overwrites caller's stack HOT 4
- DVD Version with MPEG-2 MCI driver do not run (The X-Files Game) HOT 1
- WinBolo fails in VMware HOT 7
- Indiana Jones and the Emperor's Tomb (Steam version): cinematics not scaled HOT 8
- DirectX7 D3DXCreateContextEx No Z Buffer is available HOT 2
- Anarchy Online game crashes on launch HOT 17
- Atlantis: The Lost Empire Trial by Fire can't launch with dgVoodoo via RealDllPath HOT 8
- Somewhat minor Plants vs. Zombies Rendering issues [Dd7to9] HOT 4
- Revised informative post (working our code & FunkyFr3sh), Direct3d may be stable for Server Vista & community project
- Legion gold HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from dxwrapper.