Thanks so much for all the time you have spent on this.
I have tried to follow your instructions but I am running into a problem.
I turned on Legacy settings, installed the game, and downloaded the patch.
when I try to apply the patch I get the following:
ersion '5.2.5f Multiplayer 16-November-98 ' detected.
READY TO PATCH!
You can click 'Patch!' now (backup file will be created).
Error: Cannot open file "C:\Program Files (x86)\MicroProse Software\Civilization II Multiplayer Gold Edition\civ2.exe". Access is denied
Patching failed.
It looks like I can answer my own question.
I was poking around other forums and saw a thread about short file names. I changed the install file to CIV MGE directly on the C drive.
Then i patched and it worked! I am still trying to figure out the movies issue, but at least i can play now. thanks again.
Thanks for sharing the technical details. Even though I wrote a working patch (at least for the last 10 years) for the problem, I never *knew* exactly what it was. Debugging assembler without the source code was (and pretty much still is) beyond my technical expertise. I did a bit of trial and error, found something that worked (at least, that was good enough) and decided to share it with the rest of the world. Even after all this time, I'm glad to have a little more insight on the original problem.
Dear, MastermindX, Excuse me, please, that I ignored your message for almost a month. I wanted to answer you, but I was busy and constantly postponed it for later.
Firstly, I am glad to see you here after so long absence on the forum. Secondly, I wanted to express my gratitude for the patch that you gave to the world 10 years ago. It allowed me to play the game without crashes all these years. And it also inspired me to sit down at once and start to learn disassembly from scratch.
Thank you!
Dear FoxAhead, so cool that you are helping everyone out! I have recently run into problems as well, and your latest Civ2x64EditboxPatcher hasn't worked for me. I have Windows 10, version 1709, build 16299.371, and when I run your patch, this message comes up:
Version '5.4.0f Multiplayer 26-March-99 Patch 3 ' detected.
The file is already patched.
CAN NOT PATCH!
Perhaps you could offer me any advice on what to try next, I'm keen to keep playing Civ2 MGE and build a new scenario. Any tips would be much appreciated!
Ah yes, I made an error! I used your new Civ2x64EditboxPatcher on civ2.exe, which now works fine (with CD) - so that's great
However, I have been using the no-cd patch shortcut to play on my laptop without using the external CD-reader, and I was wondering if there's a way to make your new patch also work without CD? Just for comfort - at least I can play now!
My civ2 games crashed after the Windows 1709 update. I've found this patch and now it works perfectly. Thank you very much, I've really missed being able to play Civ2, which for me is the real thing.
I know that more than 10 years have passed since the Mastermind's patch was presented to run the game on the 64-bit systems. Nevertheless, I want to present you yet another patch.
I was playing Civilization 2 MGE many years on my windows 7 64-bit. And always confusing about input fields not reacting on keyboard strokes like Enter, TAB or Esc. It was little annoying to press 'B' to build city and after that move mouse to hunt OK button rather than just press Enter. I remembered that sometime in the past everything worked fine. Suddenly I took debugger and dive deep in assembly code for a week. Finally I realized that problem was in Mastermind's patch. Yes it allows to run game on 64-bit but the normal key-processing for input fields was broken. And after a while I managed to make my own patch that works without any side effects.
Description
This is Civilization II 64-bit Editbox Patcher.
It eliminates game and editor crashes on 64-bit systems when the game tries to display edit controls (input fields) for entering text (like city name, emperor name, world sizes etc.).
Unlike the existing well known patch by Mastermind it will retain the full functionality of edit controls including the response to the Enter, TAB or Escape keys.
So, the establishing city is now just 'B', 'Enter'. And customizing world size is like '100', 'TAB', '100', 'Enter'. No more mouse clicking.
Supported game versions are:
Civilization II Multiplayer Gold Edition
Civilization II: Test of Time
The patcher can even detect if Mastermind's patch has already been applied and will replace it.
The problem was in hard-coded 0xA which is offset for parameter in extra window memory. Here we are getting two parameters: v17 - pointer to some Style data, and lpPrevWndFunc - pointer to parent callback. The second one is acquired correctly using offset in nIndex. But offset for the first one is hard-coded = 0xA. In 32-bit OS size of extra window memory for 'Edit' window class equals 6 bytes. So plus our two integer (4 bytes) parameters gives total: 6+4*2 = 14 bytes. Call for GetClassLongA(hWnd, GCL_CBWNDEXTRA) returns us this total bytes of extra memory used. To get offset for lpPrevWndFunc you have to subtract 8 from total (14) (which is done correctly). And to get offset for v17 you have to subtract 4 from total (14) which gives you exactly 10 ( = 0xA in hexadecimal). And that works well until 64-bit comes on scene where size of extra window memory for 'Edit' window class equals 8 bytes. So with our two additional integers total size equals 16. And with offset for lpPrevWndFunc being still calculated correctly (16-8) the offset for v17 must be 16 - 4 = 12 (0xC) and not 10 (0xA).
The first simplest solution is to change this single byte from 0xA to 0xC and all will be working fine until... Well, for example you decide to copy this patched file back to 32-bit system (to play on vacation on old notebook with Windows 98 or XP x32). And this patched file will not work on 32-bit OS. So there is no backward compatibility.
The correct way to patch is to achieve code something like this:
Here two first steps are swapped. Firstly we have to get total size of extra memory. And then we can calculate each offset correctly.
And then comes sweet part of juggling assembly code to achieve desired in less opcodes changed. And you have to fit in fixed frame because changing size of EXE is unacceptable. After 6th iteration I managed to make patch changing only 10 bytes.
Before:
P.S.
After almost completing working on patch I found that someone named iunnamed already made another patch explaining exactly the same reason of crashes: https://www.old-games.ru/forum/threads/sid-meiers-civilization-2.7950/page-9#post-1013691
I inspected it. That patch works good - input fields work correctly. The difference is just it for MGE 5.4.0f game only. Nor for Map Editor nor for ToT nor for other variations of MGE-like family. Also it lacks of GUI. And also it change 17 bytes of EXE.
I made my patcher on Delphi 7 because I wanted:
1) to make it possible run on old systems without external dependencies like .NET. (Tested on Windows 98 SE.);
2) to make GUI;
3) to develop it fast;
Downside of this is size of 400kB. But who cares nowadays about 400kB?
Thank you for your great job!
I've been played for years on my Win7 PC with Mastermind patch with no problems.
Now, I got a new Win10 PC (version installed 1709 - 16299.371) and I find the error. I am trying to use your new patch, but it does not work!!
Let me explain: the application runs but it remains in the taskbar as an icon and does not work. I try to launch it from different paths, but the result is the same.
What can I do, in your opinion?
Thank you for your great job!
I've been played for years on my Win7 PC with Mastermind patch with no problems.
Now, I got a new Win10 PC (version installed 1709 - 16299.371) and I find the error. I am trying to use your new patch, but it does not work!!
Let me explain: the application runs but it remains in the taskbar as an icon and does not work. I try to launch it from different paths, but the result is the same.
What can I do, in your opinion?
Hm... that's strange. I just updated my Win 10 to version 1803 (OS Build 17134.81) and my patcher launches fine. May be you could check some compatibility settings for it?
Hey there. Found this through a deep dive on Reddit.
I'm trying to play on Windows 10 and everytime it gets to name something (like my ruler name) it crashes the game. I tried to launch the patch, but it doesn't seem to allow me to actually use it. It opens and seems to be running but I can't actually open the window (Like it is running off screen). Normal methods (Like hitting Cascade Windows or shift right clicking and hitting the option move normally available) does not seem to actually work.
Any ideas?
Edit: It seems I am likely having a similar issue to AlexCosta. It opens and if I hover over the icon I can see that it is trying to do something, but it doesn't actually let me use it at all. It is like it isn't actually opening (or rather that is what it looks like at first glance and further inspection makes it appear that it is running, but off screen)
Hey there. Found this through a deep dive on Reddit.
I'm trying to play on Windows 10 and everytime it gets to name something (like my ruler name) it crashes the game. I tried to launch the patch, but it doesn't seem to allow me to actually use it. It opens and seems to be running but I can't actually open the window (Like it is running off screen). Normal methods (Like hitting Cascade Windows or shift right clicking and hitting the option move normally available) does not seem to actually work.
Any ideas?
Edit: It seems I am likely having a similar issue to AlexCosta. It opens and if I hover over the icon I can see that it is trying to do something, but it doesn't actually let me use it at all. It is like it isn't actually opening (or rather that is what it looks like at first glance and further inspection makes it appear that it is running, but off screen)
Hi!
Again I updated my Win10 and tested. On my computer it works fine. OS version is 1803 (OS Build 17134.112).
Have you tried to run as Administrator? Or try some compatibility settings? (Though in my case it was not necessary).
Hi - I have signed up because despite trying everything above, I can't get it to work on my Windows 10 Home Edition.
I want to start from scratch again. I have the original 16 Bit Civ2 Disc. Is there a step by step guide that works (has current links if things need to be downloaded) that can take me through this please?
Well there's your problem, you've been wasting your time lol. FoxAheads tools are for the 32bit final MGE release of Civ2. You cannot run a 16bit application on a modern 64bit operating system, no fancy fan patch is gonna change that. So you'll either need to run a XP virtual machine (I recommend Oracle VirtualBox) to install your 16bit copy on or you'll need to follow thamis's advice and download the 32bit MGE version of Civ2 from that abandonware website.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.