Last resort logo


Spam Prevention - PLEASE READ !! (23 Apr 2021)

Due to a problem with spammers the rules for posting in the forums have changed for new users.

Newly registered users won't have their posts published until a moderator approves them.

Hack Swat 3's Executable To Give High Res

8 years 3 weeks ago - 2 years 2 months ago #2 by Slippery Jim
The following thread is for mod makers only. It contains notes on how to modify Swat 3 files. This thread combines all our knowledge of how to hack Swat 3 to get a higher resolution in the 2D menus.

Some of the credit goes to AlienAbducter and Copy-Cat and their magnificent hex editors/debuggers.

All of Swat 3's menus run in 800x600. This resolution is hard coded right into the game's executable. Although you can get the game's 3D portion of the game to run in a higher resolution, all the 2D menus such as the weapon selection screen and chat lobby are stuck on 800x600. To force it to run custom menus we have to use a hacked version of the executable.

To hack the executable you need a version that has it's copy protection removed.

To hack Swat 3 so 2D menus are in 1024x768:
- First get yourself a Hex editor, and a version 2.1 "No-CD" crack of Swat 3.

- Open the Swat executable with the hex editor, search for the first occurrence of:
0x20 0x03 0x00 0x00 0xb9 0x58 0x02 0x00 0x00

(You will find it at decimal offset 13457)

- replace it with:
0x00 0x04 0x00 0x00 0xb9 0x00 0x03 0x00 0x00

For those who don't want to search the specific offsets to change the NOCD cracks are:
13457 (or in hex 0x00003491) - change it to 00
13458 (or in hex 0x00003492) - change it to 04
13462 (or in hex 0x00003496) - change it to 00
13463 (or in hex 0x00003497) - change it to 03

Here are the hex values you need for 1440x900:

0xA0 0x05 0x00 0x00 gives you 1440
0x84 0x03 0x00 0x00 gives you 900


There is an additional 800x600 reference that was being used after the game went to debrief:

Decimal offset 01191630 (or 0x00122ECE in hex)

0x58 0x02 0x00 0x00 0x68 0x20 0x03 0x00 0x00

changed to (for 1024 x 768):
0x00 0x03 0x00 0x00 0x68 0x00 0x04 0x00 0x00


changed to (for 1440 x 900):
0x84 0x03 0x00 0x00 0x68 0xA0 0x05 0x00 0x00


Swat 3 only allows texture sizes of 256x256 by default. The game can be hacked to take advantage of modern video cards that contain a lot of memory. We can hack the game to force it to allow texture resolutions of 1024x1024.

To force the game to allow 1024x1024 textures replace the following hex strings:

81 FF 00 01 00 00 7F 08 81 FB 00 01 00 00 (offset 1466240)
81 FF 00 04 00 00 7F 08 81 FB 00 04 00 00


81 FE 00 01 00 00 77 08 81 FB 00 01 00 00 (offset 1466998)
81 FE 00 04 00 00 77 08 81 FB 00 04 00 00

(Note: to get only 512x512 textures use 00 02


Additions Notes:

- There are several additional references to 0x20 0x03 0x00 0x00 fairly close to other 0x58 0x02 0x00 0x00 references. Not sure if these are resolution related because there are more data between them than usual. I have not experimented to see what they do.

You can find the small cluster of these references starting at decimal offset 02792636 if someone knows what they are for.

- It appears that you can't use the hacked .exe file when working in Worldcraft. You will have to use the virgin crack while making and testing maps and then switch back to the hacked version to play the game normally.


Swat Movies (updated May 26, 2019):

I have now also successfully converted and enlarged Swat 3's movies to use the XVID codec and MPEG 4 codec.

The videos were enlarged to 800x600 instead of the default 640x480 (and can be run at 24 fps instead of 15fps but the fps change didn't improve quality of course). Even with the enlargement the movie files are still a lot smaller in terms of total file size. The XVID codec is very efficient. The MPEG4 code is less efficient than XVID in terms of filesizes.

To get the movies to display properly I had to hack a location in the Swat 3 executable. This handles the 5 movies that play full screen. All other movies in Swat 3 are smaller and play within a window with other graphics around them.

The 640x480 movies:


To find the location to hack in the Swat 3 executable do a search for the resolutions 640 and 480. 640 translates as 0x8002 and 480 translates as 0xE001

To replicate the enlarged movie experiment you will want to replace them with 800 (0x2003) and 600 (0x5802)

* Decimal offset 18929 and 18934

UPDATE:  There must be a second hack point required for the movies.   When the explosion.avi movie played it was trying to show it in its original size.

The following decimal offset locations are of special interest:


Update2:  I hacked all 5 of the above locations at once and it did indeed fix the explosion.avi and plane.avi movies.   Need to narrow down exactly what all those locations do.
The topic has been locked.
8 years 3 weeks ago #3 by Slippery Jim
Found the reference to the size of the bitmaps (map loading screens)

Decimal offset 301365 (or 0x00049935 in hex)

0x58 0x02 0x00 0x00

Decimal offset 301372 (or 0x0004993C in hex)

0x20 0x03 0x00 0x00
The topic has been locked.
8 years 3 weeks ago - 2 years 2 months ago #4 by Slippery Jim
There are additional 640x480 calls that I am not sure what they are for. What these additional calls could be are for the creation of the DirectDraw windows. If the window creation succeeds then it is resized and fully drawn.

640x480 (0x8002 0xE001):

* Decimal offset 13489 and 13494
* Decimal offset 31847 and 31852
* Decimal offset 34890 and 34895
* Decimal offset 34970 and 34975
* Decimal offset 35050 and 35055
* Decimal offset 35130 and 35135
* Decimal offset 35203 and 35208
* Decimal offset 260837 and 260842
* Decimal offset 264925 and 264932 (this has two bytes in between the height and width compared to all other calls that normally just have 1 byte separating them)

There are also a few others that may additional calls related to the movies. All of the other calls to the movies reversed the resolution in the executable (480 x 640).

480x640 (0xE001 0x8002):

* Decimal offset 18929 and 18934 (movies!)

* Decimal offset 31909 and 31915 (this has two bytes in between the height and width compared to all other calls that normally just have 1 byte separating them) (note: is this movie related also? update:  not related to explosion.avi anyways)
The topic has been locked.
7 years 10 months ago - 3 years 4 months ago #69 by Slippery Jim
There is still problems with the resolution hacks. Rather than being centered some of the menus are located at the top left.

* When you select "Mission (Standard)" games aren't being centered
* When you select "Career (New)" the officer selection screen isn't being centered

I assume I need to locate and change more 800x600 or 640x480 calls.

UPDATE: I searched and tested for both 800x600 and 640x480 calls and they had no affect on the remaining screens. Perhaps on some screen calls there is a flag that is used to center the screen?

FINAL UPDATE: The layout of these menus are in the Menu.dat file.
The topic has been locked.
4 years 1 month ago - 4 years 1 month ago #1269 by Slippery Jim
Copy-Cat discovered the draw distance setting in Swat 3!

Draw Distance hack:

If you use the Steam/GOG unprotected game executable look at decimal offset 25846 for the 32-bit float number 0000AF44 (decimal 1400).

To double the view distance in game change it to 00002F45 (decimal 2800).

Note: Swat 3 appears to use inches in some settings. This would translate as original view distance of 116 feet. Double that view distance with the new hack would give 233 feet.
The topic has been locked.
4 years 1 month ago - 4 years 1 month ago #1328 by Slippery Jim
Copy-Cat, along with assistance from Beckett, figured out how to hack the game executable to allow the use of larger .TGA files!! All textures in the game can now be maximum 1024x1024.

.TGA resolution hack:

Two places need to be hacked:

1844B5 hex offset look for 66 81 F9 00 01
1844C2 hex offset look for 66 3D 00 01

For 1024 resolution the byte of 01 should be changed to 04. For example: 66 3D 00 01 to 66 3D 00 04
The topic has been locked.
Moderators: DarkSynopsis
Time to create page: 1.185 seconds
Powered by Kunena Forum