Live data from Hacker News

Patching MechCommander's "left arm bug" for fun and profit

mhloppy.com

31–37 of 37 posts

Re: Patching MechCommander's "left arm bug" for fun and profit

#31

I never played this game! I didn't realize there was a RTS after Crescent Hawk's revenge. I'm looking at the MC2 source code now... it looks like there is a Linux port, meaning could probably get it working for Apple using Fable 5, AI haters, I will challenge you to a batchall.

>probably get it working for Apple

I've gotten older games running just fine with Whisky/game porting toolkit. Sometimes you also need something to fix old DirectX issues like dgvoodoo2.

If you want to make it even easier you could try loading it via Heroic Launcher which supports game porting toolkit.

(Do note: whisky.app is out of development now that the Dev quit to do being pestered by the community so much)

Re: Patching MechCommander's "left arm bug" for fun and profit

#33
post #3

Earlier quoted context omitted.

Btw, I recently did my first patches with ghidra. Is there any way to avoid jumping into a code cave by shifting all the instructions up then updating any statements referring to those memory locations? Seems like it should be simple enoigh in theory, but I didn't find an implementation on a cursory search. Could probably code up a plugin pretty easily.

It's basically re-linking the executable. Way too easy to shoot foot - miss one reference and things break in a spectacular, or, worse, subtle fashion. Which means: you definitely need to know where all the references are and what they point to. References are under no obligation to be presented in a sensible, decompiler-friendly way. Which is why "jump out into the patch, jump back in" is such a staple of patching.…

Thanks for this explanation!

Re: Patching MechCommander's "left arm bug" for fun and profit

#34
post #32

> Mantis targets 64-bit Windows systems and requires .NET 8 or higher to run. So, it won't work on the same retro PC as the game.

In my experience it was not that hard (as far as 25 year old games go) to get running on a Windows 10 system, which is what I played MC1 on and made Mantis on. I wrote down the steps I used[1] but there are alternative approaches using e.g., dgVoodoo which are not hard to find if you search for them. As far as I'm aware there's no need to use a retro system to reliably run MC1.

If you are for some reason intent on playing MC1 on a retro rather than modern system, Mantis is just a glorified automated hex editor and you can byte-for-byte replicate what it does to the game exe by copy-pasting the hex edits which are already outlined in the OP (for the bug fixes) and elsewhere (for the rest of what Mantis does).

---

[1] https://mhloppy.com/2026/04/mechcommander-windows-10-without...

Re: Patching MechCommander's "left arm bug" for fun and profit

#35

Now let's see this working for Darkest Hours. ;) (Assuming they didn't fix it themselves, it is a pretty big overhaul to MC1) 99% sure it should work fine for (Exodus and Turncoat), (X-Ray and DSC Raid), and (Xenocide and Bengal Lancers) since those are just custom campaigns. Lovely stuff. Always a joy to see anything MechWarrior related end up here on HN.

As far as I know even DH is still only modifying the game at the data files level, not the "actual code" level (with the exclusion of the resolution edits).

So probably the fix for the left arm bug will work fine for DH or any of RizZen's other campaigns, but because of the new weapons I wouldn't bother using the weapon classification fix unless you revise the fix to match the modded weapons (which is unlikely to be worth the effort tbh).

Re: Patching MechCommander's "left arm bug" for fun and profit

#36
post #34
post #32

> Mantis targets 64-bit Windows systems and requires .NET 8 or higher to run. So, it won't work on the same retro PC as the game.

In my experience it was not that hard (as far as 25 year old games go) to get running on a Windows 10 system, which is what I played MC1 on and made Mantis on. I wrote down the steps I used[1] but there are alternative approaches using e.g., dgVoodoo which are not hard to find if you search for them. As far as I'm aware there's no need to use a retro system to reliably run MC1. If you are for some reason intent on pl…

I was just noticing that there was a whole lot of work fixing these minor bugs, and then went all lazy writing the patch... Or maybe I was spoiled by decades of scene patches, cracks and tiny demos with chiptune music and funny graphics.

Re: Patching MechCommander's "left arm bug" for fun and profit

#37
post #36
post #34

Earlier quoted context omitted.

In my experience it was not that hard (as far as 25 year old games go) to get running on a Windows 10 system, which is what I played MC1 on and made Mantis on. I wrote down the steps I used[1] but there are alternative approaches using e.g., dgVoodoo which are not hard to find if you search for them. As far as I'm aware there's no need to use a retro system to reliably run MC1. If you are for some reason intent on pl…

I was just noticing that there was a whole lot of work fixing these minor bugs, and then went all lazy writing the patch... Or maybe I was spoiled by decades of scene patches, cracks and tiny demos with chiptune music and funny graphics.

There is a certain irony I guess, but in my eyes the "patch" is the hex edits, not Mantis. If I had published these fixes but never gone back and made Mantis, I would still have considered the work "complete".

Mantis was made nearly one month after the actual patching was done partly as an excuse to test out a few things like the build settings available in newer .NET releases (e.g., framework-dependent vs self-contained build with trimming, JIT vs AoT vs ReadyToRun compilation). It wasn't really laziness to target .NET 8 because exploring those build options made it take longer than just building using e.g., .NET Framework since Mantis is so basic. As I said, glorified automated hex editor.

Post reply on HN