Last resort logo

SWAT 3 - LAST RESORT GAME MODIFICATION


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.

Mission Loading Screen

More
2 years 3 months ago - 2 years 3 months ago #2596 by Copy-Cat
Replied by Copy-Cat on topic Mission Loading Screen
I can't test the highest resolution, my guess is that my game doesn't like the dual monitor setup also, would like to know your fix around this. Im back on TS, game and pizza was good, bama wins.

It was a good run. I just noticed the comparison, and math is wrong for both values, the register edx and edi need to be swapped at the math part. Will try to edit post to reflect the correct comparison and math

Please Log in or Create an account to join the conversation.

More
2 years 3 months ago - 2 years 3 months ago #2597 by Slippery Jim
Replied by Slippery Jim on topic Mission Loading Screen
I can get it to work with one monitor only active "show only on 1" in Windows settings for "Multiple Displays".   This is on Windows 10 mind you.

I guess maybe the only way is to basically temporarily disable the second monitor with the settings :(

Please Log in or Create an account to join the conversation.

More
2 years 3 months ago - 2 years 3 months ago #2598 by Slippery Jim
Replied by Slippery Jim on topic Mission Loading Screen
Some potential good news in 2022!

It looks like that your hack alone only works properly on people who run their games with the Swat 3 "-window" flag. Using the window feature in dgVoodoo doesn't help to change that.

Using the "bible" hack of the load screen bitmaps + your hack seems to fix this issue with people like me who are full screen users (and can't even get the game to run in -Window mode without the 16-bit colour mode error).

Now the question is what negative effects will happen to you -Window users if the bible hack is in the mix.

Bonus results:  I tested the process on a 1366x768 game executable.   The 1920x1080 load screen that gets shrunk in your hack looks better than the 800x600 load screen that gets enlarged.

Please Log in or Create an account to join the conversation.

More
2 years 3 months ago - 2 years 3 months ago #2599 by Copy-Cat
Replied by Copy-Cat on topic Mission Loading Screen
That is good news, just 2 hacks left to do eh?
800 x 600, im on, and can chat and work at the same time.

Please Log in or Create an account to join the conversation.

More
2 years 3 months ago - 2 years 3 months ago #2601 by Copy-Cat
Replied by Copy-Cat on topic Mission Loading Screen
Warning:  All hacks are done at your own risk.  Don't try them at home

The incoming map loading bitmap 2d size is being stored in 2 registers ebx (x-value) and edi (y-value).
We cannot assign ebx and edi values once they are read into registers, but we can modify them by arithmetic op code.


swat_1920x1080.exe

cmp, edi 00000780 - first we compare the incoming bitmap width to the default LRM mission loading bitmap width of 1920
jne - jump if not equal (the value might be the default mission loading screen width of 800) and we jump to check for 800 x 600 values
if they are equal then we go to next line of op code and check the height
cmp ebx, 00000438 - now we compare the incoming bitmap height to the default LRM mission loading bitmap height of 1080
jne - jump if not equal (the value might be the default mission loading screen height of 600) and we jump to check for 800 x 600 values
if they are equal then we go to next line of op code
jmp, at this point the incoming bitmap size is 1920 x 1080 so we jump to push values of ebx and edi on stack and return.

Check for 800 x 600 values
cmp edi,00000320 - compare the incoming bitmap width to the default mission loading screen width of 800
jne - jump if not equal (the value is not the default loading screen width) so we jump to push values and return.
if they are equal then we go to next line of op code and check the height
cmp ebx,00000258 - compare the incoming bitmap height to the default mission loading screen height of 600
jne - jump if not equal (the value is not the default loading screen height) so we jump to push values and return.
if they are equal then we go to next line of op code
Modify 800 x 600 values
add, edi 00000460 - at this point edi (width) = 800 and we need to add 1120 so that edi (width) = 1920
add, ebx 000001E0 - at this point ebx (height) = 600 and we need to add 480 so that ebx  (height) = 1080

Push the values of ebx and edi on stack and return, this is also the jmp location in the cmp op codes above
push ebx
push edi
push ecx
push eax

lea, eax,[esp+3] - load the address relative from the jump location so we can return after it sets the image to screen
jmp - back to the location we were at before this method call

Jump to new method. offset - 0056B2BC
Code:
E9 3F AA 1D 00 90 90 90

New method. offset - 2C2D00
Code:
81 FF 80 07 00 00 75 0A 81 FB 38 04 00 00 75 02 EB 1C 81 FF 20 03 00 00 75 14 81 FB 58 02 00 00 75 0C 81 C7 60 04 00 00 81 C3 E0 01 00 00 53 57 51 50 8D 44 24 3C E9 89 55 E2 FF

Here is the explanation of the new method code.
Warning: Spoiler!

 

Please Log in or Create an account to join the conversation.

More
2 years 3 months ago - 2 years 3 months ago #2602 by Copy-Cat
Replied by Copy-Cat on topic Mission Loading Screen
Warning:  All hacks are done at your own risk.  Don't try them at home

The incoming map loading bitmap 2d size is being stored in 2 registers ebx (x-value) and edi (y-value).
We cannot assign ebx and edi values once they are read into registers, but we can modify them by arithmetic op code.


swat_800x600.exe

cmp, edi 00000780 - First we compare the incoming bitmap width to the default LRM mission loading bitmap width of 1920
jne - jump if not equal (the value must be the default mission loading screen width of 800) and we jump and Push the values on stack and return
if they are equal then we go to next line of op code
cmp ebx, 00000438 - compare the incoming bitmap height to the default LRM mission loading bitmap height of 1080
jne - jump if not equal (the value must be the default mission loading screen height of 600) and we jump to Push the values on stack and return
if they are equal then we go to next line of op code and Modify the 1920 x 1080 values

Modify the 1920 x 1080 values
sub, edi 00000460 - at this point edi (width) = 1920  and we need to subtract 1120 so that edi (width) = 800
sub, ebx 000001E0 - at this point that ebx (height) = 1080 and we need to subtract 480 so that ebx (height) = 600


Push the values on stack and return, this is also the jmp location in the cmp op codes above
push ebx
push edi
push ecx
push eax
lea, eax,[esp+3] - load the address relative from the jump location so we can return after it sets the image to screen
jmp - back to the location we were at before this method call

Jump to new method. offset - 0056B2BCE9
Code:
3F AA 1D 00 90 90 90
New method. offset - 2C2D0081
Code:
FF 80 07 00 00 75 14 81 FB 38 04 00 00 75 0C 81 EF 60 04 00 00 81 EB E0 01 00 00 53 57 51 50 8D 44 24 03 E9 9B 55 E2 FF

Here is the explanation of the opcode for the new method:

Warning: Spoiler!

Please Log in or Create an account to join the conversation.

Moderators: DarkSynopsis
Time to create page: 0.269 seconds
Powered by Kunena Forum