please read the followings very carefully, as this is the FIX for the Memory allocation problems:
CHANGING DOS EXTENDERS - THE SOLUTION FOR (nearly) ALL OF US
- M.A.X. and nearly all other DOS programs uses the DOS/4GW 1.97 DOS Extender from Tenberry Software to get Extended memory support through DPMI services. Basically, all 16 bit protected mode DOS LEs (linear executables) which needs Extended memory and other stuff, needs an extender. The Extender can be binded to an LE executable, so the Extender will self contain (wrap around) the "true" executable.
Unfortunately, the DOS/4GW 1.97 has some serious issues, listed here: http://www.tenberry.com/dos4g/watcom/rn4gw.html
. The most important thing is this: "A bug in our DPMI INT 31h/0800h caused mappings of 4MB or greater to be misaligned." No wonder that the game crashes, or starts to misplace the units as memory usage increases.
Fortunately for us, the original DOS/4GW 1.97 Extender stub can be unbinded from the binded executables (1.00 PR demo, 1.04 retail, 1.56 beta) and this way we can get the original DOS LE executables. After this procedure, a new properly working Extender stub can be binded to the LE executables or we can use the unbinded executables with a different Extender core, for example we can use the one which is built in into DOSBOX it self.
I have tested the unbinded v1.04 MAX executable with the PMODE/W, DOS32A, WDOSX and DOS/4GW 2.01 Extenders and they seems to be much more stable. I have played 278 turns in a custom game against 3 computer players without seeing any corrupted units, erroneous grids, lost units in depots, etc. The cpu AI locked up one time (endlessly loading and unloading units from the depot, but it can also be fixed by the debug switches that can be found in the MAX.INI file - take note: I'm talking about a special MAX.INI file, not the one that the game creates it self), and the the game crashes back to the desktop some times, but it always works properly after a restart.
To unbind the old DOS Extender from your executables, download the PMODE/W free to use Extender from it's official site: http://www.sid6581.net/pmodew
/ and use the PMWBIND utility like this: PMWBIND /U MAX.EXE
The DOSBOX emulator also supports this unbinded executable loading method. One can simply load the unbinded LE executable with DOSBOX's built in DOS32A Extender enabled and it will run.
If someone uses one of these freeware DOS Extenders instead of the erroneous original DOS/4GW 1.97, games will probably run much more stable.
- For all of you, M.A.X. I fanatics, the followings will be interesting I think: the M.A.X. 1.04 retail save game format is currently 70% reverse engineered, and there is hope that in the future, save game related issues will be fixable (even game related issues will be fixable). Also, as M.A.X. uses the save game format for it's campaign and scenario missions, in the future, we will be able to add new maps/missions/content to the original game as a bonus or extra.