Jump to content

Getting CM2 to work in Linux


Centurian52
 Share

Recommended Posts

I am in the process of migrating from Windows 10 to Linux Mint. I've just migrated my laptop so that I could have an environment to sort out game compatibility issues while still being able to play my games without issues on my desktop. Obviously I can't migrate my desktop until I've confirmed I can get Combat Mission working in Linux.

I downloaded the Windows installer for CMCW (1.01). I am running Linux Mint 20.2 with Cinnamon 5.0.7. My version of Wine reads as: wine-5.0 (Ubuntu 5.0-3ubuntu1), and I am using PlayOnLinux 4.3.4. I installed CMCW on a 64bit virtual drive on PlayOnLinux. I was able to complete installation and licensing without issues. When I attempted to run CMCW I got the error message "Could not initialize OpenGL graphics. Please update your OpenGL drivers.".

Does anyone know how I would update OpenGL drivers on Wine or PlayOnLinux? Or are there configuration changes I need to make? Or is there a patch somewhere I can download? Has anyone been known to successfully run CM2 on Linux? And is there any possibility of official support for Linux in the future like there is currently for Mac?

Link to comment
Share on other sites

There is some documentation for PlayOnLinux and Grahics Card Drivers that you may need to look over. Do you know what video chip your laptop has (Intel being the most common) ?

I'm not sure who may have been successful in getting any of the CM2 series to work with Linux. It MIGHT have happened in the past, but I didn't keep track of who may have been successful under what version/distro of Linux and Wine.

I personally doubt that Battlefront will officially support any of the current Linux distros and the compatibility programs (WINE) to allow the use of the Windows versions of the game to run under Linux. Supporting Windows and Mac platforms is hard enough (with dedicated versions for each platform). With Linux there are a lot more "moving parts" that make supporting the games more of a crap shoot. With the huge number of Linux distros and patches; changes to WINE and its support in each of those distros; the limited number of video drivers it just becomes a massive support headache. You might get the games running with a particular distro and version of Wine with certain hardware, but then some update or changed libraries can suddenly makes things non-functional. Admittedly similar things can happen with Windows with certain video driver updates, but it is usually limited to that (and occasional issues with the licensing system). I don't think Battlefront will make a dedicated Linux version of any of the CM series either, just a bit too much work for the current/potential size of the audience.

Link to comment
Share on other sites

Well I don't have it working yet, but I feel like I'm making progress. It turns out there is a patch for Wine or Proton that will make it work:

So now all I need to do is...figure out how the heck to apply a patch to Wine. Which it turns out is way more work than it should be. Apparently I have to actually recompile the source code. I sincerely hope that someday there will be an easier way to do this.

Link to comment
Share on other sites

5 minutes ago, Kevin2k said:

Yeah it is the same thing. The patch sets cAlphaShift to 24 for all OpenGL video modes (like dozens). Without a doubt that works like a charm for CM games. But on real hardware cAlphaShift should only be set to 24 for certain particular modes, and remain 0 for most others.

So you're saying this should solve my CM woes, but could break other games that I install using Wine or Proton?

Link to comment
Share on other sites

1 minute ago, Redwolf said:

It is certainly incorrect for other games. Whether they care or not is a different matter.

I think I can work with that. I can run the Battlefront versions of the CM games in PlayOnLinux, with most of the rest of the games I play running on Steam using Proton, which I believe have two separate Wines underneath. Or I can keep an unpatched backup of Wine that I can restore when I play a game that the patched version causes problems with.

So that leaves the million dollar question. Can you or someone you know (or someone who reads this later down the line) actually compile the patch? I think I can figure it out myself eventually, but it will be so much easier if I can just mooch off of the work of someone who already knows what they're doing.

Link to comment
Share on other sites

35 minutes ago, Centurian52 said:

I think I can work with that. I can run the Battlefront versions of the CM games in PlayOnLinux, with most of the rest of the games I play running on Steam using Proton, which I believe have two separate Wines underneath. Or I can keep an unpatched backup of Wine that I can restore when I play a game that the patched version causes problems with.

So that leaves the million dollar question. Can you or someone you know (or someone who reads this later down the line) actually compile the patch? I think I can figure it out myself eventually, but it will be so much easier if I can just mooch off of the work of someone who already knows what they're doing.

I'll try to repair my wine compile env later today or tomorrow.

It seems the person making CMBS work was on the real game, not the demo. So that would mean the DRM works. Does BS even have a demo?

Link to comment
Share on other sites

Well that's a shame. I've been able to sort things out for pretty much all of my other games, with about a quarter of my games on Steam running natively on Linux and most of the rest running without insurmountable issues with Proton (and most of my non-Steam games working fine in PlayOnLinux). CM is the one outlier for me preventing a full transition to Linux. I suppose I can still figure out how to compile the patch myself and see if I can't tweak something. But if it really doesn't work then the only thing I can think of is to pray to @BFCElvisthat perhaps the cAlphaShift issue is something that isn't too difficult to solve on their end with engine 5 (perhaps just overlooked because no one realized it needed solving? It didn't look like a very large patch after all, but perhaps there are too many calls to cAlphaShift in the CM code for it to be easily fixed without breaking something else?) without taking too much time away from modules or other greater priorities?

Link to comment
Share on other sites

3 hours ago, Redwolf said:

No, doesn't work with the patch. Tried CMCW, got an unhandled exception with no further useful info.

If you want to test the full games, start with the 'Matrix' editions. Like Cold War and Black Sea. I just tested those two, and it gets all the way to "Could not initialize OpenGL graphics..". That is the cAlphaShift=24 related message. I am confident that by making it pass this cAlphaShift check, things will run fine after that.

Can you send me your compiled Wine binary? Can I just use it to replace mine and test it maybe?

Link to comment
Share on other sites

  • 6 months later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...