Re: Download Commandos Beyond The Call Of Duty

0 views
Skip to first unread message
Message has been deleted

Bubba Lual

unread,
Jul 12, 2024, 2:38:41 PM7/12/24
to adafymli

A friend and I recently stumbled across the Commandos Ammo Pack ('Behind Enemy Lines' and it's expansion pack 'Beyond The Call Of Duty') at Good Old Games.com and we just couldn't resist downloading it. It did cost US$5.99, but that's absolutely chicken feed when compared to the awesomness of this game.

download commandos beyond the call of duty


تنزيل https://urllio.com/2yZTSP



It's an old game, created in 1999, and could handle resolutions up to 1024x768 for single player; but for multiplayer the resolution was fixed at 640x480. I google'd around a little and saw that one person on a forum had created the Mysoft - Commandos Loader v0.8 which seemed to hoist the application in to memory and then hacked around with variables. I wasn't sure this was the best method and had the main Commandos EXE in IDA Free before too long.

I'd read that it used DirectDraw/3D and started searching for the appropriate functions. Before long I had the AdjustWindowRectEx, DirectDrawCreate and other functions under the microscope. I then opened the EXE up in OllyDbg and started slapping breakpoints everywhere. Before long I'd noticed the pattern:

This seemed to be popping up everywhere and co-incidently 280h x 1E0h = 640x480 pixels... the default for the game. I then found code that set the resolution based on those shown in the video settings menu and then the game was doing what I told it.

After a little more google'ing I found that someone else had already gotten to this point. Ferdinand had the hacks there to change the resolutions, but did not have the final piece to ensure that re-loading the game brought the resolution back.

After a little more disassembling I found that the resolution was being loaded at startup from a file on disk... this turned out to be "COMANDOS.CFG" in My Documents. The exact line from the config was:

From the config it was obvious that the game was using 'index 2' from the resolution list. Of course, it also meant that it knew how to decipher that '2' to a real resolution from the list in the code. After a little forward and reverse searching from the file loading to the resolution setting I came to the switch statement in the code which had the values hard-coded. I now had 3 points per resolution setting in the code that needed to be changed if I was to write my own utility.

I hadn't liked anything that was already available to do this and so I chose to wrote my own. The application loaded the EXE into memory, read out the resolutions stored, audited that they were all in sync and then allowed the user to select a new resolution per slot. If the resolutions weren't the same then you would get a warning, but this would have been corrected on the next resolution hack.

This worked fine, but I found it pointless to specify four separate resolutions when you only really needed to specify one. I was more in for the challenge of allowing all four to change, rather than the practicality.

So, it all worked... I then closed the game, re-opened it and found that it loaded up at 1024x768 instead of the 1680x1050 resolution I had set. I closed it again and looked at the configuration file; the setting had indeed changed back to '2' instead of '4'... but I hadn't touched it! I then loaded the game again and it was back to 1680x1050... closing and opening brought it back to 1024x768... the flip-flop continued.

So... what did this seem to mean? I had overlooked the storage of the resolution configuration. If the indexed resolution was read from the file, then it would have to be written back as an index. I went back in to the disassembler and searched for anything relating to writing 'SIZE' into the configuration file. The logic in the game was then obvious: it carried out an "if less than X but greater than Y" across the 'stock' resolutions and then stored the relevant index. This complicated my approach and confirmed that I really should only bother adjusting the 'fourth' resolution in the list. There was no point allowing the user to re-order the resolutions as this code then wouldn't work. The fourth resolution would need to be the only one customisable and the value must be greater than the third resolution at 800x600.

So, with this in mind, I wound the application down to just editing one resolution that had to be higher than 800x600. This meant that the internal configuration saving would work and the user would just have to select the final resolution in the list. Note that this only affected single player... the multi player resolution would still be a separate setting.

So, the game obviously wasn't meant to be played with a horizontal resolution greater than 1024 pixels; rendering artifacts started appearing when higher resolutions were used. Fortunately, the game is quite dynamic when it comes to rendering the screen and menus. Trawling through the code I could see that it was trying to find a BMP that matched the resolution, even using the resolution as the file name. Ferdinand had also worked this out and even has a list of assets downloadable for higher resolutions.

Commandos stores all of its graphical assets in a file named 'WARGAME.DIR' and references this when the game loads. I started looking into modifying this file via my program but realised it would be wuite a task to decipher and re-pack. Fortunately, some clever fellows across the world have created the necessary tools to extract these files. DirExtractor allows us to expand the DIR files and, once in the Commandos directory, the game itself will actually use the extracted versions if you remove the WARGAME.DIR file. This then meant that I could use my app to call DirExtractor, extract the files and then modify them where required to ease the majority of graphical glitches.

There was only one drawing issue remaining after this... any resolution over 1400 meant that maps thinner than the overall monitor width would not re-draw the areas that they could not cover. You can see this in the following screen shots.

Fortunately you can press '+' and '-' in-game to zoom in and out. What this meant was that the user could stop the map from clipping by adjusting the zoom. I took this as a suitable workaround at the time.

It seems that some laptop resolutions are a little out-of-whack. I previously had a Samsung Ultranote with resolution of 1366x768, but windows reported that it could also run at a resolution of 1360x768.

So, I had the app working great for the modification of the GOG version of the EXE. It turns out that there are many more versions in the wild. It also gets worse as there is another patch here that fixes up a whole lot of other issues in the game. Fortunately it seems that the EXE from the above link is the exact same as the EXE from GOG? Either way, I've tested it and my hack works on it perfectly.

Hello StevenH i have the Commandos- BTCOD in spanish and sadly the patch isnt working, do you think you can help me?, im running it on Win8, alredy fixed, so the speed and save works fine, the only thing i need to play it its the widescreen fix, if you can help me i can give you any information you request, thank your bro!

Indeed, as your version is not listed in the versions that this patch supports.
Any chance you want to give me more information: What language you have installed? Where you got it from?
When posting comments like this anywhere on the internet, please give as much information as possible!

hello can you help me put it in HD? I have all the versions of this game (GOG, Steam, cds) I would do it but I did not riesco.ho tried with the resolutionhack but it does not work (not even the english version) .I wanted to patch the Italian version, i do not know well hexeditor. could you send me your files and try to make a copy and paste it? thank you

Hello,
tried this patch, didnot work for me, got the message to contact you. My commandos games come from a dvd with all commandos games on it. [Legally bought]. When I run youre hack and it asks me to find the to replace commandos exe I still get the same message:
Found an unkown version of commandos Size 695578 bytes please report this ect. ect.
Hope you can help me, cause I still love to play this game.
Greetings
Aedriaen The Netherlands

For other players dealing with major instability (constant crashes and freezing every 5 minutes): after trying everything I installed a directdraw.dll in the commandos directory that fixed it, and makes the game run a lot more smoothly. Find it here:

Hi I am using the GOG version through the porting kit on MacOS. The game runs at the right speeds and the resolution hack works well too at 19201080. However there are some quirks
When I use the higher resolution the game runs great until I move my mouse. Whenever the mouse is moving when using 19201080 resolution the game lags pretty bad. This lag is exaggerated if you zoom out to show more of the map. Zooming in does not make it worse or better, it stays the same
With that said the lags happen when zooming out under ANY resolution, even without moving the mouse.
Is there any suggestions to get the game to run well at not lag when moving the mouse at higher resolutions?
I did try the directdraw.dll that was mentioned in earlier comments, but I do not notice a difference in performance unfortunately
Thanks in advance for any advice and replies!

Hi, I am also using GOG version through the porting kit on MacOS Mojave everything installed but when i launch the game i see blank screen with audio only not able to come out of that screen though i did tried all keys. I have to restart again my macbook. Do you have solution for this?

Hi guys,
First I want to say thanks to @stevenh for bringing out this patch, and for Tonelotto for coming up with a solution to use it on Steam.
BUT I followed your instructions to the T Tonelotto with one slight difference as my Steam games are not on my c: drive but my d: drive so adjusted instruction 3 & 4 to my games location.
Yet it does not work.
What info do you need to troubleshoot this?
Thank you in advance for your assistance.

03c5feb9e7
Reply all
Reply to author
Forward
0 new messages