Subscribe via RSS
27May/11244

Commandos – Behind Enemy Lines Resolution Fix

Note: Both Commandos - Behind Enemy Lines (BEL) and Commandos - Beyond The Call Of Duty (BTCOD) (Plus a crapload of other versions, see below!) are supported!

Unofficial STEAM support:
Scroll to the bottom and find the comment by Tonelotto with instructions on how to get it going.

You can also use this patch to carry out the Locale hack described here.

Skip straight to the bottom of this post if you just want the application!

An Introduction to the game

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.

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:

push    10h
push    1E0h
push    280h

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.

commandos-512-384 commandos-1024-768 commandos-1680-quit

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:

.SIZE [ .INITSIZE 2 ]

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.

Commandos Resolution Hack Alpha 1

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.

commandos-file-selection commandos-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.

Testing and more bugs

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.

Commandos Resolution Hack Alpha 2

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.

commandos-final-version

Everything was now working great... except the drawing issues above 1024 resolutions...

Drawing bugs

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.

commandos-1680-resolutions commandos-1680-menu commandos-1680-loading

Required Graphical Modifications

  • A single change to the fourth resolution string in DATOS\MISIONES\GLOBAL.STR to whatever the custom resolution has been set to. This can be found by searching for the token OVI4 and then replacing the string following.
  • The creation of the menu background. This has to be a Bitmap file named MENU####.BMP where the #### is the horizontal resolution of the screen.
  • Build a WAD file for the game-play interface. This WAD is named via the resolution (i.e. 1024X768.WAD) and contains values that tell the game how to render the interface. I created a one-size-fits-all file that ensures that the graphics are wide/long enough for the screen resolutions (max 1920x1920) and the application simply renames the file and ensures that it is available to the game.

A final glitch

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.

commandos-bad-map

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.

commandos-1

commandos-1

Smeared resolution?

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.

It turns out that if you choose the wrong one (although it may seem the right one if that's your current windows resolution) that you'll get the following display:

commandos-smeared-menu

commandos-smeared-res

Simple fix: Try another resolution... it'll work eventually!

And you thought it was going to be this easy?

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.

Due to the above, I started a list of EXEs for the game and then began deciphering them (as I knew the basic items to change) to allow my application to work with them.

Items in bold are those that come from GOG.com.

Game Version File Size Supported
Commandos - BEL Demo 2,452,992 bytes Works..
Commandos - BEL German v1.0 2,469,376 bytes Works, Asks for CD (Language issues, I'd imagine)
Commandos - BEL Spanish v1.0 2,469,376 bytes Works?
Commandos - BEL Spanish v1.05 2,469,888 bytes Works?
Commandos - BTCOD Spanish ? 2,696,600 bytes Works?
'Sold Out' v1.1 2,479,104 bytes Works fine. Speed issues with game (known issue)
GOG.com Ammo Pack v1.1 3,715,072 bytes Works perfectly!
Commandos Ultimate Fix v1.1 3,715,072 bytes Works perfectly!
Commandos - Beyond the call of duty ? 3,133,440 bytes Works perfectly!
Commandos - BEL Russian ? 2,470,400 bytes Works fine. Speed issues with game (known issue)
Commandos - BTCOD Russian ? 2,968,576 bytes Works fine. Speed issues with game (known issue)
Commandos - SINP v2.3 2,482,688 bytes Works perfectly.
Commandos - SINP Chinese v2.3 2,313,216 bytes Does not write out chosen resolution to configuration file. You should only change the resolution via this hack!

My application was then built to determine the EXE via file size (of course, this isn't fool-proof) and then hack appropriately.

Commandos - Beyond The Call Of Duty

So, this was just an update to the main game... turns out the code was slightly different, but still workable with my current program structure. After about 6 hours debugging all was working! Enjoy!

commandos-btcod-1

commandos-btcod-1

Commandos Hack v1.2

The final release contains the following features:

  • Support for all versions known above. (Note that the Demo and German versions don't actually save their configs to disk; we therefore hack the initial startup resolution.)
  • Resolution list options based on monitor capabilities.
  • Both EXE and WARGAME.DIR are backed up.
  • A one-size-fits-all menu background has been included.
  • German file encoding is preserved when the text is changed.
  • Resolution menu text shows the selected resolution.
  • Compatibility mode now checked to allow proper resolution and disable scaling.
  • The Locale hack from here has also been added.

commandos-hack-final

Note: You need .NET Framework 4.0 to run this, download it here.

Download the application here.
And you can also download the .NET source code here.

Meanwhile, if you got a lot out of this app, then feel free to donate!








And that's a wrap... go use every pixel your monitor can produce and play the game!

Comments (244) Trackbacks (1)
  1. I just want to say; thank you so much for taking the time to create this utility. I truly love the Commandos series and this will breath new life into the game. As for you speed problem, have a look here: http://forums.steampowered.com/forums/showthread.php?t=1236369 that should clear it up :)

    Cheers

    • Legacy, thanks for the comments. As for the speed issue, thanks for the link also. I’ve only seen it in the other versions of the EXE that I was given and don’t use those when playing. The GOG version works perfectly.

  2. Steven, would there be any way that you can provide me with the non-steam No-CD v1.1 .exe? Steam’s original v1.1 .exe does not work with your application, I am asuming it has to do with an encryption of some sort. If I use another .exe it works just fine (v1.0), the only problem is; I have searched everywhere, but I am unable to find a no-cd for v1.1 (There is one site, but it requires a 32-bit operating system in order to replace that default .exe and as I am running 64-bit I am screwed)

    As you know, the .exe file that is provided with the speedfix from the Steam Forum does work, the only problem is, the speed is way to slow for me.

    If you are able to help out, please let me know. :)

    Thank you

  3. hey !!! so thanks for this !!! but i have some trouble… when i launch (in any resolution) i have a black screen (without sound) i use the ultimate fix on the game installed from the original CD (1st edition) and im on win 7 64bit OS. a friend has exactly same but it work for he ! have you got any idea ?

    i have uninstall FFDSHOW but i have the same problem

    • edouardsie,

      Can you press any keys once the game has started?
      Does it crash out if you leave it for a minute?
      Are you setting a resolution that your monitor can handle? Try a lower resolution?

      What version of the game do you have? I have access to a Windows 7 64-Bit machine and may try this tonight.

    • Edouardsie,

      I have re-uploaded the hack. Please download it again and give it a go.
      The issue was pointed out by Ferdinand @ http://sites.google.com/site/commandosmod/ and I have applied his fixes.

      Please tell me how you go.

  4. Ey Steven, i posted my original comment here: http://www.gog.com/en/forum/commandos/better_resolutions_for_single_multiplayer_commandos_behind_enemy_lines

    But it seems you have posted all over the place so it might be hard to keep track of it all, so that is why i am posting directly here.

    Seems to work perfect for me. Thanks a lot! Little weird to see black bars on top and on the side after playing so long in the original resolution. Any change/plans to get that textured as well with the original texture?

    Anyway, i was wondering, since you seem pretty experienced in coding, if you could take a look at the annoying crashes in BEL after video’s / briefings a lot of people (including me) are having, BtCOD doesn’t seem to suffer from this problem. I tried every solution on this and other forums, the loader, compatibility modes, etc… you name it, nothing works. No fix yet that i know of. The executable is probably calling some functions that do not exist anymore or have changed locations in the recent Windows versions???

    • Some more info, the following error always comes, always at the same address, maybe it of some use to you to find the cause and even create a fix:

      Faulting application comandos.exe, version 0.0.0.0, faulting module comandos.exe, version 0.0.0.0, fault address 0x0024bae0.

      Bytes:
      0000: 41 70 70 6c 69 63 61 74 Applicat
      0008: 69 6f 6e 20 46 61 69 6c ion Fail
      0010: 75 72 65 20 20 63 6f 6d ure com
      0018: 61 6e 64 6f 73 2e 65 78 andos.ex
      0020: 65 20 30 2e 30 2e 30 2e e 0.0.0.
      0028: 30 20 69 6e 20 63 6f 6d 0 in com
      0030: 61 6e 64 6f 73 2e 65 78 andos.ex
      0038: 65 20 30 2e 30 2e 30 2e e 0.0.0.
      0040: 30 20 61 74 20 6f 66 66 0 at off
      0048: 73 65 74 20 30 30 32 34 set 0024
      0050: 62 61 65 30 0d 0a bae0..

      Words:
      0000: 6c707041 74616369 206e6f69 6c696146
      0010: 20657275 6d6f6320 6f646e61 78652e73
      0020: 2e302065 2e302e30 6e692030 6d6f6320
      0030: 6f646e61 78652e73 2e302065 2e302e30
      0040: 74612030 66666f20 20746573 34323030
      0050: 30656162 0a0d

      Btw, i am running Commandos Ammo Pack from GoG, on Win XP SP3, fully up to date. I have tried the BEL Loader, same issue. All kinds of compatibility settings, same issue. Uninstalled FFDshow, same issue. Even tried the ultimate fixes from Steamforum, but as you say, they are the same files as GoG version.

      • Spinvis,

        I will try and look at this issue in around 2 weeks… I imagine I’ll have a fair amount of difficulty reproducing the problem though. Can you point me to any other links where people are having the same issue?

        Steven.

  5. Hi, stevenh.

    1) I try use your utility for: Commandos BEL 1.1 Russian + Commandos BCD Russian
    But it dislike files size.
    Can you add support of this versions?
    Here zip with this files – http://www.sendspace.com/file/18b62k

    2) What about Tutorial.exe from BCD? Is it also supported? it would be nice to make a complete package for modern computers.

    Best regards, rty.

    • rty,

      Russian?! I didn’t even know that there was such a version… your request is in the queue. :) I’ll try and look in to this (as it should be a pretty quick bit of disassembly to get it working) when I can (probably over the next week.)

      Steven.

      • Yep. In 1999 year few pirates studios make their localization of game and after 11 years company “New Disk”re-release game, but finally as the official distributor :)

        It possible to patch Comandos.exe with 1.1 patch for ‘Sold Out’ version and fix resolution like Ferdinand wrote here – http://sites.google.com/site/commandosmod/tutorials/bel_widescreen
        So I hope it would be simple and doesn’t take much your time.

        • I have updated the code to support Commandos – BEL (Russian).
          I will also make it work for BTCOD Russian soon. Please give the download a try on your BEL Russian and tell me how it goes.

          Steven.

  6. I test it with 1366×768 but something wrong with it. Here scrinshots – that http://postimage.org/gallery/45mzlkdc8/

    rty.

    • rty,

      I can’t select this resolution, but every other resolution (with your executable) works on my Hardware. Can you try another resolution (higher than 1024×768, but not 1366×768) and see if it works!?

      Steven.

      • I cant test resolution higher than 1366 cause it maximum on my netbook, but I test it now with 1360×768 and smaller and it work great. Strange why only with 1366 I have this problem…

        But I think it’s not a big deal and we can assume that the utility works well :)

  7. Great hack!

    If you get the “i can not find directx 5” message for some resolutions, for example 1920×1080, it’s because of the HideDisplayModes fix in the Win95 compatibility that you need to get sound in the game. If you know what the application compatibility toolkit is you know how to disable that fix so that you can get sound and all resolutions.

    • JPeterson,

      Thanks for this note! It’ll help out a lot of people using compatibility mode. I don’t know about hacking in a work-around to hack-out the compatibility mode… It’d require code-injection rather than byte replacement and this probably isn’t recommended. Then again, the compatibility toolkit might just store data against an executable in the registry… I’ll give it a go if/when I find a few spare moments :)

      Steven.

  8. I just bought the complete pack from getgamesgo and my commandos.exe (for BEL) is 7,368,705 byes =\

    • someguy,

      That’s a slightly obese executable!? The game runs perfectly from this?
      Feel free it to email me at stevenhoefel AT hotmail DOT com.
      I’ll break it open… but I’m concerned it’s encrypted. There’s not much I can do if it is.

      Steven.

      • Hey I appreciate the quick response. Yes I’ll go out on a limb here and say its probably wrapped code ala copy protection. I found a alternate solution by using your utility on a file available in a thread titled “All You Need to Fix and Modernize all Commandos Games in One Thread (Save/Resolution)” ;)

        Thanks for taking the time to code it :) Worked fine on Win7 64 and I didn’t check if I had Net 4 or not.

  9. I would like to say “Thank you sir for the job well done”!

    I ran GOG Ammo Pack version, Win 7 64 Bit and ATI Crossfire 4870×2 in 1920×1200 resolution with your hack. All is well!

    I was wondering if I can use this with Commandos 2 and 3?

    • MNguyen,

      I imagine Commandos 2 and 3 would use the same process… I’ll have to have a look in to this when I get the chance. I have seen forums on how to do this, so it cannot be too much harder.

      Steven.

  10. Hey Steven

    Awesome fix.
    But I have a question?

    When I use resolution higher than 1024×768 the top bar (in game) is moved way to the left (out of the screen), and I cannot see the avatars for my soldiers.
    Anyone else have this problem?

    Also, the speed issue? Is there anyway to fix this permanently?
    As of now I run the game through another program, supressing the power of my CPU, wich slows the game to normal.

  11. LOL – I really miss the edit-function :P

    BTW this is the German version.

    It may be useful to know, that before I downloaded your hack I wasn’t able to set a fixed resolution (i.e. when I restarted the game it was back to 512×384 – every time).
    – I’ve unchecked “read-only” for the entire folder, but it doesn’t work.
    – Also I’ve set the .SIZE parameter of the commando.cfg file to [ .INITSIZE 3 ]

    (the resolution doesn’t reset to 512×384 any longer – after your hack)

    I’ve just found a workaround for the top-bar issue:
    – I’ve set the hack for 1440×900 (or any other)
    – I load the game (top bar i gone/moved out of screen)
    – I choose another resolution in-game (e.g. 800×600)
    – I choose back to 1440×900 (also ingame)

    Now top bar is there!

    But the whole reason I googled in the first place was so that I didn’t have to change resolution upon game-launching. And now I have to do it twice :P haha..

    Just to be sure I’ve tested in BtCoD, and there’s no problem.

    Any suggestions?
    And also speed issue, any suggestions?

    • Kevin,

      Good work on working out a work-around… I cannot think why the issue is happening, but I know it doesn’t happen with the other versions. I will try to source your version (have you patched it at all?) and see if I can reproduce it.

      Meanwhile, with the speed issues… it sounds like you do not have the latest version of Commandos. I don’t know what version you have now, or how to patch it… I can only recommend you try to find an update?

      Steven.

  12. This looks brilliant, but is not working with my Steam copy of the game.
    Any help?

    • Devin,
      If you can tell me the size of the EXE then I might be able to help. Unfortunately Steam encrypts the executable (as far as I am aware) and therefore I cannot open it normally. If the size is around 3mb instead of 7mb then I should be able to look in to it.
      Steven.

  13. Thank You a lot for this. Just bought the game from GoG.com even though I had the steam version already, but it doesn’t matter since the GoG version is a lot better. And with this fix it is just perfect.

    Happy New Year!

  14. Hi. If you still interested in this programm, can you update it and add wad file for 1920×1080 ( from here https://sites.google.com/site/commandosmod/tutorials/bel_widescreen ) and make “Just apply” button, which will apply fixes without running the game? And maybe you’ll even add better bmp background for each resolution (from the same site).

    • b7906573,

      Gotcha… I should actually do a quick http check to see if the correct horizontal resolution WAD exists on the bel_widescreen page.

      I am interested in coding this, I just need to find the time.

  15. I have the GOG version of this game, and ran the hack on both original and expansion, worked fine I am getting some serious off-screen tearing in the right-hand corner. Here’s what I’m talking about:

    http://imageupload.org/en/file/187124/commandos-tearing.jpg

    Is this just a problem with the hack, can it be fixed?

    • The problem is that you are setting a resolution that the game was not suited for. The actual map in-game is not actually wider (at that zoom level) than your screen resolution.

      There must actually be a zoom-limiter somewhere in the code that’ll prevent the zoom from going past the resolution… I don’t have the time now to delve in to the source again.

      ….you simply need to ensure that you don’t zoom too far out and you’ll be fine!

      • Oh right, if it’s not an actual problem with how I applied the hack, and is something unavoidable, I don’t mind so much. That being said, this only happens in the original, no tearing in Beyond the Call.

  16. Love the effort you have put in Steven, but I have a problem. Im using a laptop with the resolution 1366×768 and Ive set ur software to that setting but when I open the game my screen looks like this

    http://imageupload.org/en/file/226432/commandos-screen.png.html

    What to do ?

  17. I will try that setting, and no prob u can use my screenshot

  18. Wonderful work sir! I have a new .exe for you: http://www.yestergames.com/index.php?main_page=popup_image&pID=712, 2.469.888 bytes. Not important for me, because I run Doc’s Ultimate Fix now, which is the best for the end-user I think :).

  19. hi, i am getting an “unhandled exception has occured in your application” error when trying to extract the wargame directory in your app. access to \DATOS\BRIEFING\BR01_01.BMP is denied.

    i have framework installed, on alienware m17x r4 win7 64 bit.

    any ideas?

    thanks!

    • Any chance you don’t have proper write access to your program files directory?
      Try doing a ‘Run As’ Administrator with my application… I imagine it cannot write the files.

      Otherwise, is there a ‘Details’ button on the error? Any more information?

    • ahh i didnt extract the file properly, just ran as admin now. Thank you so much!! great work! really appreciate the quick response

  20. Please fix the Zoom limit for higher resolutions 1080p or 1600p. I’m sure there are many who would like to run it in full screen.

    Would love to play it on my 60″ 1080p plasma or my 30″ 1600p monitor.

    Thanks, the work is greatly appreciated.

    I posted this originally in 2010: http://forums.eidosgames.com/showthread.php?t=109290

  21. Thank you very much for the hack.
    I have a problem here and i hope you have a solution. Everything is okay in the ratio 4:3, but when i change the res to 1280×720 or any other wide screen ratio, it still works but in the game, the top bar is cut down. Picture here: http://i142.photobucket.com/albums/r120/kaito_kitsudo_2k9/Linhtinh/commandos_zps8b66ded6.png.
    I can use the hotkey to control, but it’s big problem if i can’t see my char’s blood, lol.
    Thanks again.

  22. When i play about 20′ it’s crashed, can it be fixed? Or how can i uninstall the programme?

  23. Here this hack accuses an error and doesn’t install. It says that my .exe is an unknown version of Commandos (i have the Steam version). I don’t know what to do. Any ideas? =(

  24. stevenh, thank you for this utility. Now I usually dont mind using a hex editor to edit some data. This little gem makes it a little cleaner to deal with. Im surprised to see that the “Ultimate Fix” is mentioned here as well, and that its the same as the gog.com version. Ferdinand’s method now is a little more hands-on with this utility in its place, but the files he has available are useful for me as I am still on a 1280×1024 lcd.

    Very appreciative for your and Ferdinand Zeppelin’s efforts. Makes me wish I kept learning C++ 5 years ago hah.

    • Madcat,

      Sorry for the slow response, but am glad you’re happy with the fix.
      I have a bit of spare time now, so I might just look into working with the media assets. Will keep updates in this thread.

      Steven.

  25. Hello, im so noob :-| !! I don’t undertand what exactly i have to do.. im looking for an easy solution to play my Commandos BEL (original retail version) with my PC at 1680×1050 and fixing the speed. Is this the correct application? Thanks for help.

    • Camarillo Brillo,

      I cannot help the ‘speed issue’. I can only help with the resolution. And by help: You need to install the game on your machine and then run my application and point it to the executable. This will be located in Program Files (or wherever you installed it.)

      Of course, I actually recommend you pay $5.99 and install the game from GOG.
      This has the speed issue sorted (or so I believe) and then my patch will fix up the resolution.

      Steven.

  26. Thanks for your reply Steven. :-)

    So, if i buy a “fixed” version from GOG, i don’t need anything other than your application? No additional download required of Wad files and Menu bmp’s?

    • Correct, it will work fine… although the menus will not have full background images.
      I should really get around the applying proper menu images… but that’s only eye-candy.

  27. stevenh,

    Thank you so much for this application.

    It is REALLY annoying to play multiplayer in that pre-established 640×480 resolution.
    I guess the programmers did that in order to avoid the menu for user settings (such as volume and resolution) in multiplayer.
    Then, the pre-established resolution had to be the WORST one, so the game could run in any computer.

    Still, it is pretty annoying to have only one save slot in multiplayer. And, also, the quick save/load only lasts until the server is closed (as far as I know).

    By the way, do you recommend any books on reverse engineering and the like?
    I see you got great skills. What’s your academic degree? Engineering? Computer Science?

    All the best,
    Bobster.

    • Bobster,

      Thanks for the comment, hope the patch is working well. I studied software engineering at uni, but the only class that helped was “intro to IT” where we learnt basic assembler. I can only recommend finding the IDA disassembler, ollydbg debugger and breaking open the most simplest application you can find.

      You’ll need to know hex, program structure, assembler and memory usage… but that’ll all come in due course.

      I don’t think I’ve ever read a book on the topic :)

      Steven.

  28. My Commandos BTCOD size is 845kb, the Resolution fixer does not work on it :(. It’s the Steam Indie Bundle version.

    What can I do?

  29. Can you please make this compatible with the Strike in Narrow Path mod?
    https://sites.google.com/site/strikeinnarrowpath/downloads

    Really want to play it but hard to go back to 4:3 resolutions after being spoiled by this :p

  30. Hi stevenh,

    Thanks for taking your time to modernize this great game. I have a problem with the hack. When I run it as admin it can extract .dir file without problem. However when i choose 1366×768 and click apply and run i get this error:

    ERROR!
    Could not edit the EXE(Are you administrator?), is it open elsewhere?
    ‘C:\Program Files (x86)\Eidos Interactive\Pyro\Commandos Behind Enemy Lines\comandos.exe.bak access denied.

    I run it as administator and it is not open elsewhere. Why do i get this error? I try it 2 different computers one runs windows 8 and one runs windows 7. Same error. Where am i doing wrong? I want to play this great game with a high resolution especially in multiplayer. Could you please help me with this?

    frkn

    • frkn,

      Can you go into that folder and confirm if the “comandos.exe.bak” file already exists?
      I can only suggest that there is something else locking the file… try and disable your virus checker for 5 mins whilst you do the update?
      You can also get something like LockHunter or Unlocker to see what has a hold on the file.

      Good luck!
      Steven.

    • Hi again,

      I tried to uncheck read only box of the whole folder and it worked yay! However I encountered with a new problem :( I use german mode of the game and it lags a bit with this new resolution (1360×768) but it is a little bit annoying. Did you experience it especially when you try to move around map with your cursor? Also note that I have also smearing graphics with 1366×768. Top bar comes if i change the resolution twice. These are not problem but that lag i have experienced is a problem.

      Thanks again for your great work!

      frkn

  31. So does it work fine on 1080p ?

    Or does the screen still smear ?

    • Gogolino,

      No code has been written for this… the goal is mainly just to zoom enough so that the sides of the map go past the edges.
      I don’t see it as a priority to get done. Maybe during the christmas holidays.

      Steven.

  32. I do not know what I am doing wrong, but as far as I can see it is not working. I run your program and then select the GoG exe and select the resolution that I want, then hit apply and run. Then I assume i still have to pick the resolution when I am in the game. Which when I do that it just blinks momentarily but obviously hasn’t changed the resolution. I’m not sure what to check or if I’m doing any steps wrong.

    • silverbow25,

      Were there any messages in the log file when you applied the patch? What resolution did you set?
      This resolution should then be the 4th option when you go to display preferences in the game.

      Steven.

      • Does it create a log file or do you mean the log the patcher shows when you run it? It appears to work fine. I have tried multiple resolutions. 1920×1080, 1680×1050, 1366×768. No errors happen, though I have tried running as administrator and unchecking read only on the entire game folder just for kicks. When I am in the game, I go to display settings and click on the fourth setting twice. It then flashes the screen but the resolution doesn’t change, it stays at 640×480, I can of course change it to 800×600, which works but whenever I pick the new resolution it just flashes as if it has changed, but no change. I have downloaded my copy from GoG today though I doubt that makes a difference. I have done alt-prtscrn to verify that the resolution is staying at 640×480 or 800×600. It’s just wierd that I get no errors yet it wont change. Below is what the patcher says: If there is another log file somewhere let me know.

        Let’s get this started… please note that you can expect a black main menu background…
        ———————————————————————————————-
        Waiting for user to select a game exe… please find ‘comandos.exe’ in your game folder.
        Possible monitor resolutions (above 800×600):
        1024 X 768, 1152 X 864, 1280 X 720, 1280 X 768, 1280 X 800, 1280 X 960, 1280 X 1024, 1360 X 768, 1366 X 768, 1600 X 900, 1600 X 1024, 1680 X 1050, 1920 X 1080, 1440 X 900
        ———————————————————————————————-
        Found ‘GOG.com Ammo Pack version’/’Commandos Ultimate Fix’ version of Commandos
        Found GLOBAL.STR. WARGAME.DIR has already been extracted.
        ———————————————————————————————-
        Locale patch [1] has already been applied.
        Locale patch [2] has already been applied.
        ———————————————————————————————-
        Searching for Multiplayer settings: 1920 X 1080
        Searching for 1024 X 768 settings: 1920 X 1080, 1920 X 1080, 1920 X 1080, 1920 X 1080
        ———————————————————————————————-

        • silverbow25,

          Try a standard resolution, higher than the max that commandos allowed. Something like 1280×1024.

          What monitor and graphics card do you have and do you have the latest drivers for each?

          Steven.

          • 1280×1024 worked.
            Video Card: MSI N275GTX TwinFrozr OC GeForce GTX 275
            Monitor: Asus VS247H-P 23.6″

            They are recent drivers for the video card, but maybe not the very latest. I’ll check. I don’t even know on the monitor. I will try to check that too.

            • So that’s a “standard” resolution that your DirectX/Video Drivers are happy with.
              Next trick would be to go into Display Properties in Windows and tell me what your current resolution is…

              Actually, from the output above, I’m guessing it is: 1440 X 900
              I’d recommend testing this setting.

              Steven.

              • I’m not sure why it outputs like that, my current resolution is 1920×1080.
                My driver is 331.65, downloading 331.82 now.

                My monitor drivers just say Generic Plug n Play but that is apparently what is recommended. I don’t think other drivers exist. However, I noticed that my device manager has 2 monitor drivers, so I’m unplugging my TV that is also plugged in, maybe that is causing a problem, though not sure why since it would also be 1920×1080.

              • Oh, and yes I did try 1440×900 just for fun, that was my old monitor’s resolution, but I haven’t used that resolution for awhile. Not sure where it’s pulling that from, but it didn’t work. I also tried 1600×900 since it’s listed as the next ‘recommended resolution’ below 1920×1080 on my monitor though it should really support just about everything I’ve tried.

              • Latest video drivers now and I did a clean install of these drivers to remove any old settings, but same issues as before.

                • What version of Windows are you running and have you ever successfully run other games @ 1920×1080?

                  • Windows 7, and since I got this monitor about a month ago I’ve been playing everything at that resolution.

                  • I guess I’m just screwed? It does seem to me that the problem appears with widescreen because obviously the 1280 worked, but any widescreen resolution I choose instantly fails. I really wish I could figure this out since even though I already own the steam version, I bought the gog version because I saw that I could do this. btw W7 x64

                    • silverbow25,
                      My patch hardly changes two values (resolution height and width) inside the game code. I don’t adjust DirectX or anything like that… so unfortunately the blame can be squarely placed on your combination of card/windows/directx.

                      Have you tried compatibility mode? Right click on the exe in program files and set it to Windows XP Compatibility mode or something similar.

                  • Thank you very much sir, that was apparently the one step I was missing. I really appreciate your help and your patience. I wasn’t trying to imply that it was your patch’s fault I was just hoping that with all the people you’ve clearly helped here that you would obviously be more aware of the possible problems that you would run into. Which you obviously were because this was a key change in my case.

                    Okay so here is what fixed it so that you know and so that you can add a little note to in your original post if you would like: By default commandos.exe was set to compatibility for Win 95, either by Gog or by your patch I don’t know which. I tried Win 98 and XP SP2.

                    XP SP2 is the only compatibility mode that I tried that worked. I don’t know of the other resolutions are just not supported in the other compatibility modes or what.

  33. hello steven,
    I dont care much about the resolution,I care more about the speed issue.

    I have a collection of Commandos on steam,and the speed of game is wired,too fast on my opinion.
    Then I found a FIX file on the internet,and it works fine.
    However I have Chinese language files from the retail version years before,I dont know how to modify the EXE file to make its speed normal as the English EXE file does of the FIX files.

    Many THANKS.

    • Hello Sundaylee,

      I’ve no idea how the speed fix works and have never looked in to it.
      Unfortunately I cannot help you with this… but there should be a Chinese version somewhere with the speed fix already applied?
      If you can find that, then pass me the EXE and I’ll make sure it works with my patch.

      Steven.

  34. Hi, I have tried your resolution hack, but despite I have tried on both BEL and BtCOD, I refuses to work with either. I have recently bought a Steam key

  35. I want to say thank you for this great effort! you’re rocks
    just want to share, I already use this awesome hack resolution and works perfectly on Win 7 ultimate sp1 64bit and I play using GOG version

  36. I get a error saying it found a unknown version of commandos…. size 2469888.
    Cant get it to work…..

  37. Just for anyone’s information, this fix works well with the DRM free version on the humble store.
    In fact, it has the same binaries as GOG’s copy – it seems the publisher should be credited for fixing issues, not GOG.

    And for the author, it’s awesome seeing a fan making such a great tool to enhance the game.
    Thank you very much!

  38. 1st off, thank you so much for your work.
    Like u, i really enjoyed playing the game so long ago and could not believe when i found it on GOG.
    Unfortunately it gives an initialization error: “directx 5 not found”.
    My system is Windows XP with SP3 and the DirectX is 9.0c.
    If u can give me some pointers on what to do i would really appreciate it.
    Thank you again.

    • Found it myself :) :).
      Changed color depth from 32 bits to 16 bits.
      Anyway, again, thank you so much for your work!
      Consider it done boss!

      • pdokas,
        Sorry I hadn’t responded sooner… glad you sorted it out!
        All of this information helps others sort their issues out too.
        Thanks for posting the result.
        Steven.

  39. Hi! Thank you very much for your work.. but i have a problem. The Resolution Hack doesn’t work with my game (is the original spanish version). When patching (ex. to 1920×1080) the game not changes the original resolution. Help me , please (and sorry for my english, i’m from Spain)

    The hack info:

    https://www.dropbox.com/s/0ucxuq9ityxabpn/Captura.PNG

    Copy of my original executable:

    https://www.dropbox.com/s/tdpikpgp5fclhb4/Comandos.exe

    Curiosly appear “German version” (?) when my game is the spanish version

    Thanks again!

  40. Yes! Works perfect… but have a little problem. Works fine in all resolutions, but not recognize the file “WARGAME.DIR”. This file, in Spanish version called “WAR_MP.DIR”.

    Capture:
    https://www.dropbox.com/s/6oc6puv71tcucry/Captura7.PNG?dl=0

    This cause a problem: the interface have multiple visual problems.
    I rename the file to “WARGAME” and works normally.

    https://www.dropbox.com/s/eh24wx17qsiq0g2/Captura8.PNG?dl=0

    You only fix it, everything else is perfect.

    Thank you again. :D

  41. Hi, i just bought the GOG Version and tried to apply your Widescreen Fix. The Addon Commandos – Beyond The Call Of Duty works perfect but the Main Game not. The New 4th Resolution is present but when you try to apply (click) it the it reverts (stays) at 800 x 600. I have Win8.1 Pro x64 and then i tried it on my Notebook with Win7 x64 SP1 and the Hack worked. But i could only choose the max Resolution from my Notebook 1600 x 900…..how can i manage on my Notebook to put the Resolution 3440 x 1440?

    Looks like something is different in Win8

    • Zeyrok,
      Thanks for the note… I have win8.1 and will install Commandos and see what happens.

      • So, my new laptop is win8.1 with a 1920×1080 touch panel. My util allowed a fresh install of GOG Commandos to set the fourth option to 1920×1080… but actually selecting it ingame flashed back to the previous resolution.

        I googled a bit and initially thought it was to do with bit depth… turns put it was actually to do with compatibility mode.

        Moral of the story: Find the commandos exe, right click and choose properties. Default install set the compat mode to Windows 95. This was the issue. Setting it to XPSP3 made the res work fine.

        Please report on your compatibility mode setting.

  42. Hello,

    first of all thank you very much for this awesome fix that makes the game really enjoyable.

    I just have one doubt after applying the patch my game is exactly like photo nr 10 commandos-bad-map in the size glitch report, is this how it’s meant to be or is there a fix for this also ?

    resolution of my monitor is 1920×1200, when I zoom in, quality degrades, is this normal ?

    somehow this screen looks much better than my game’s https://dl.dropboxusercontent.com/u/124491188/__DoNotMoveOrRenameMe/CommandosBtCoD_fix/Commandos%20BCoD%20in%201920×1080.png

    Thank you

    • Hydrops,
      If the display is blurry then it usually means that the resolution is not 1:1 with your screen. Does your monitor have a ‘help’ or ‘menu’ button on it? Usually if you press this the OSD will show you what resolution your monitor is currently set to. It could be that you have 1920×1080 instead of 1920×1200?

      Photo number ten, with the smearing to the right is expected when you zoom too far out. The original game never expected the ‘greatest’ resolution to be bigger than their thinnest map. I never did hack further to prevent the zoom level from getting too small.

      We’ll need to confirm that the resolution you’ve set for the game is exactly what your monitor wants.

  43. Hi Steven,

    same error here like Zeyrok described:
    Win 8.1 64-bit
    resolution 2560×1440 selectable, but stays the old.
    BCoD works perfectly in 1440p!

    Amazing work! Thank you!

  44. Haven’t you consideer work for the Steam version? It gets a update a few months ago that solve some issues like running too fast on modern PC, but still need to be improved like the support of WideScreen and multylanguage as well.

    I know it because i have it and have tested your application and it does not work for me :(. A friend allow me to use his GOG version and voila! You app works like a charm!

    I read up ahead you suggest some people to get it there, but since today is my birthday maybe a good soul outhere in the internet could gift to me the GOG Commandos Ammo Pack :D

    • Caesar,

      Good evening… The issue with the Steam Commandos EXE is that it is encrypted. I can inspect it once more, but I’m pretty certain that changing any values inside it will render the EXE invalid.

      Again… just because you asked nicely, I’ll give it 20mins of my time :) Let me get back to you over the next few days.

      Steven.

    • Caesar, sorry for the hasty response. I’ve looked into the EXE and I cannot make sense of it.

      A quick search around the internet shows that nobody has broken the steam encryption and doing so would be illegal.
      (example: http://obse.silverlock.org/)

      The best bet is to contact steam and ask them to patch their EXE with a differing resolution.

  45. Hi Steven,
    I use the Gog-Version of Commandos and when I apply your hack, the game turns mute. Only the Intro Videos still have sound. I have already tried various compatibilty settings, but to no avail.
    Do you have any idea how to fix this issue?

    Thanks

    • Steiner,

      I’ll try and reproduce this tonight. I’ve not had the same issues, but hopefully we can work out what is going wrong. Meanwhile, have you also adjusted the audio settings inside the game? I can’t remember if there are any volume shortcut keys.

      Steven.

  46. I can’t get it work on the v1.1, it says the size is wrong, please fix it. I really want to play on my native resolution.

  47. hello, I have a slight problem, I got this game on steam but whenever i try to start it with your application the application shows a pop up saying: “Found an unknown version of Commandos!”. Is there a way to fix this? thanks in advance.

  48. Hi, nice work what u have done here stevenh.

    I have problem tough. When i use the hack i get crashes and the game slows down and stutters in higher resolutions (1080p). I’m using windows 8.1 64bit laptop with both Nvidia and integraded intel HD graphics cards.

    Any known fixes to this problem? Have others with windows 8 had this?

    Thank you.

  49. Hello Stevenh!

    At first, thank you very much for your incredible work! The patch works fine at the most commandos.exe versions that I try. And it very easy to apply.

    On the other hand, I don’t know what’s wrong in my computer, but all commandos (BEL and BCD) runs a little slow in my computer, or too fast if the .exe versión is de original. The only one that runs perfect is a commandosBCD exe that I found if I put the maximum speed in the game options (the rest of BCD exes that I tried the speed bar have no effect). So, I am working in a mod -BEL missions in BCD- for playing -and enjoying :-)- this incredible game again.

    The problem is your patch don’t recognize this particular BCD exe, and not apply the resolution hack. I investigated and I solve the resolution problem modifying, but I don’t get that the resolution keep itself for the next time (similar to your problem before your “Resolution Hack Alpha 2”).

    Could you modify your patch to accept this BCD.exe? or if it’s too much work, could you indicate me what point in the hex-code is necessary to modify to solve the init-size problem?

    Thank you very much again!

    PS: the link to de BCD exe
    https://www.dropbox.com/s/cysbnveowln8x16/CommandosBTCOD.exe?dl=0

    • Agnobi,

      Challenge accepted… give me a week to investigate and edit the EXE. Time should be on my side.
      Any chance this version is a language I haven’t covered?

      Steven

      • Well, I have no idea about which is the original language of this exe-file. The rest of the game came with it in English, but I usually use it in Spanish with no any problem.

        Thank you for your work and your time Steven!

        Meanwhile I’ll be investigating about the “intendencia” command to solve the end of the missions, and playing C2 XD

  50. Hello!

    So just to confirm – this does not work on the retail versions correct?
    I have to use the GOG version?

    Crap, spent all the time hunting for the disks for nothing! xD

    • Good morning NinjaShack,

      This should be fine on a retail version. The only reason or wouldn’t work is if you hadn’t applied updates. Finding updates might not be easy either.

      I can try and get your version sup ported if you send me the executables.

      Steven


Re: Hydrops 's comment

( Cancel )

*