A little background, last winter my pcs motherboard failed. Rather than buy a new computer I purchased a used mother board, not an exact replacement. The down side of this was that my DOS world turned into a unknown landscape. My only reason for remaining in that world is CIV and my SVE file editor/modifier/cheat program CIV$. I use Visual Basic For DOS to develop and maintain it. Unfortunately the high memory offered by XP on this PC did not have enough memory to hold all the source code modules at once. So I tried the DOSbox version I was using at the time no luck. Then moved on to Virtual PC 2004 SP1 and got DOS 6 running still not enough memory. Then I wrote a windows program to remove all the comments, sort of worked but I had to stub out some of the functions and subroutines to debug other section of the program, what a pain!
Something made me upgrade to DOSbox 0.73 to run CIV. I dont think I had ever look through all the documentation before. Anyway this new version has better support for EMS and XMS memory. After getting CIV to run nicely (read much faster than before) I tried running Visual Basic for MS-DOS it mostly worked, with a little tweaking it loaded the CIV$ source files. The only problem CTRL-Break didnt work. Searching the online information about DOSbox I found information about how DOSbox could not trap CTRL-Break but how VB dos could be controlled with CTRL-Scroll Lock. (see note 1)
So I was now in vb dos programming nirvana. Then came Gowron thread Modding Civilization I - Patterns for Huts and Special Resources. It had such a feel of familiarity about it, what sprung to my mind was Civilization Map Changer Version 2.1 (6/20/93) written by Holger Eichmann
I remembered that out side of real ms-dos environment I was unable to get it CIVMAP21 to run. See Sixty Three
Does DOSbox support TSRs? my mind raced I quickly search the web for a dos TSR finding one that trapped key strokes. It ran but didnt work on certain keys. Could one of them be the one used by CIVMAP21? I knew from looking at this code over the years that it was written in Turbo Pascal and assembler. What did I know about Turbo Pascal? Zero! Short version - I rounded up Turbo Pascal and MASM. Coming up with the asm object modules was easy. Digging into what makes a Pascal TSR was somewhat more difficult. Thanks to the WaybackMachine (http://web.archive.org) I was able to find a number a TSR examples. It seems that CIVMAP21 used the Print Screen key to trigger the on/off function. I was determined to replace it with a key not used by CIV dos and supported by DOSbox. After finding some sample code and attempting to make a little key trapping TSR of my own. Figuring out some on the strange error messages (odd to me anyway, in hind sight maybe not). I now have a version of CIVMAP that runs within DOSbox.
note 1: Breaking Without Killing DOSBox
Something made me upgrade to DOSbox 0.73 to run CIV. I dont think I had ever look through all the documentation before. Anyway this new version has better support for EMS and XMS memory. After getting CIV to run nicely (read much faster than before) I tried running Visual Basic for MS-DOS it mostly worked, with a little tweaking it loaded the CIV$ source files. The only problem CTRL-Break didnt work. Searching the online information about DOSbox I found information about how DOSbox could not trap CTRL-Break but how VB dos could be controlled with CTRL-Scroll Lock. (see note 1)
So I was now in vb dos programming nirvana. Then came Gowron thread Modding Civilization I - Patterns for Huts and Special Resources. It had such a feel of familiarity about it, what sprung to my mind was Civilization Map Changer Version 2.1 (6/20/93) written by Holger Eichmann
I remembered that out side of real ms-dos environment I was unable to get it CIVMAP21 to run. See Sixty Three
Does DOSbox support TSRs? my mind raced I quickly search the web for a dos TSR finding one that trapped key strokes. It ran but didnt work on certain keys. Could one of them be the one used by CIVMAP21? I knew from looking at this code over the years that it was written in Turbo Pascal and assembler. What did I know about Turbo Pascal? Zero! Short version - I rounded up Turbo Pascal and MASM. Coming up with the asm object modules was easy. Digging into what makes a Pascal TSR was somewhat more difficult. Thanks to the WaybackMachine (http://web.archive.org) I was able to find a number a TSR examples. It seems that CIVMAP21 used the Print Screen key to trigger the on/off function. I was determined to replace it with a key not used by CIV dos and supported by DOSbox. After finding some sample code and attempting to make a little key trapping TSR of my own. Figuring out some on the strange error messages (odd to me anyway, in hind sight maybe not). I now have a version of CIVMAP that runs within DOSbox.
note 1: Breaking Without Killing DOSBox