home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The Devil's Doorknob BBS Capture (1996-2003)
/
devilsdoorknobbbscapture1996-2003.iso
/
Dloads
/
MISSING
/
CIVMAP21.ZIP
/
civmap21.inf
< prev
next >
Wrap
Text File
|
1993-06-22
|
11KB
|
233 lines
The Sirius Cybernetics Corporation proudly presents:
The program the world has urgently waited for:
(fanfare on)
*************************************************
* The unique and true Civilization Map Editor *
*************************************************
(fanfare off)
Ok., ok., I am starting to overstate a very little bit. And if you suspect
a decryptation of the .map file, I must disappoint you. But I was able to
write a little program, by which you can change the map directly while
playing the game. Here is the table of contents of this civmap21.inf file:
- Some information of civmap21.exe
- How to install civmap21.exe
- What I could find out of civ.exe
If you like the program (or not) or if you want to get rid of something else
like wishes of improvement, send a mail to
Holger.Eichmann@cdc2.atomare-prozesse.physik.uni-hannover.dbp.de
(wow, that's an email address: 64 characters)
Please send flames directly to the Sirius Cybernetics Corporation at Sirius
Star System, Planet I-III or to
department_of_complaints@scc.sirius_system.ump.un
- Some informations of civmap21.exe
Because the .map file is crypted so much, that up to now there is no
decrypter, I have explored, whether the map information can be found (and
changed) uncrypted in the memory while playing civilization. And I have
really discovered the places where the information about the type of land-
scape, about the attributes (like roads, pollution) and, whether a field is
known or not, has been stored. The rest was more easy. civmap21.exe changes
the interrupts F1h und F2h. If you change the correct bytes in the civ.exe
file, int F1h will be called every time you try to get informations of a
landscape of a field (click right buttom of your mouse on this field). You
will find yourself in the map changing menu. After leaving it you can
normally continue playing. You can switch on/off the possibility of entering
the editor by pressing the print screen key.
If you wonder whether I have not found, where the improvements of a field
(like gold, fish, gems, ...) has been stored, you are right. The simple
reason is, there is no such a table in the memory! Civilization only calcu-
lates by a simple algorithmus whether a field is improved or not. Because
I have not been content with this, I have insert the int F2h call after this
calculation. This procedure uses its own list of improvement positions and
changes the improvement state of a field, when its coordinates can be found
in the list. From the cheat menu you can insert or delete map fields in this
list. Up to now the list length is limited to 200 entries. If you want to
increase this value, you have to change the constant in the Turbo Pascal
source and recompile. Because (of course) this list will not be saved, when
you save your game, there is a possibility of saving and restoring this
list, too. Remember that, if you only leave and immediatly reenter civ.exe,
this list will not be cleared and the list will not be loaded automatically,
when you load an old game.
There is a possibility to save and load the interesting memory parts, which
contains all the data of the map, to disk. If someone doesn't want to change
the map field by field with my editor, he can change the whole map by editing
that file. For further informations of the partitions of the saved memory parts
see the 'What I could find out of civ.exe' part of this file.
There are some memory areas, which I didn't understand so far (see
below). Some of them looks like a strategy help for the computer. My program
doesn't change these bytes. Therefore I don't know whether the computer will
really react on the map changing correctly.
In version 2.0 civmap21 is looking for the data positions in memory by
itsself (see the .asm sources). I have tested it with my version 1 and with
the versions 2-5 which you can find at wuarchive.wustl.edu (6/8/93). If you
want to know your version number, you have to start civ.exe. When you are
asked for your graphic card, in the top window you can find a 474 followed by
the version number (e.g. 474.1 for version 1). Also it only runs under a VGA
graphic card. The program is not tested very well, so there might be some
errors inside. If you find one (or more), send me an email.
There are few things, which are known:
* If you want to improve a place by railroad, you first must build roads.
* When you edit an unknown field the screen will be dark when you leave the
editor. The reason is that civ.exe makes no screen refresh, when you right
click with your mouse on an unknown field (I have only insert my routines
and haven't changed the normal progress of the program). You can easily
rebuild the screen by a left click with your mouse.
* When you make the whole map known, you will not find the armies and towns
of the enemy. The reason is that there is stored elsewhere which armies
and towns you know (I don't know where).
* When you build new land at the border of a continent or connect two conti-
nents, this will not be recognized by the world wonders. I know where this
continent belonging is stored (see above), but it is not very easy to
change it. Perhaps someone else want to do that.
* I have heard that there are problems with settler build railroads. I could
not test it up to now.
- How to install civmap21.exe:
You have to change the following bytes in your civ.exe file (not before
making a security copy of that file !!!!) e.g. by using the norton utili-
ties:
Insert int $F1:
version 1 + 2(?): E9 54 00 B8 32 00 -> E9 54 00 CD F1 90
version 3 + 4: 02 75 53 B8 32 00 -> 02 75 53 CD F1 90
version 5: E9 59 00 B8 32 00 -> E9 59 00 CD F1 90
Insert int $F2:
all versions: 3B C1 75 BB B8 01 00 -> CD F2 90 90 90 90 90
Now you only have to start civmap21.exe before starting civ.exe (if you
change these bytes you MUST ones start civmap21.exe before civ.exe, because
otherwise the int $F1, $F2 commands will jump into the NIL).
- What I could find out of civ.exe
Here I want to discribe a couple of things, what I have puzzled out of
civ.exe. In the following I will arbitrarily set the address of the int $F1
call to 1ae5h:0972h by version 1 (1AE6h:0976h, version5). This is my fix-
point to fix the position of the civ.exe file in the memory. The first
command, civ.exe executes, can than be found at 40Eah:0010, version1
(40E5h:0010, version5). When you start it, the program and the data will be
shift in memory relative to these addresses. Remember that the int F1h and
other procedures can only be found at their right place, when you run the
program over the starting setup questions. It looks like the memory parts
are shifted when you use another civ.exe version. I have described in the
.asm sources, how civmap21.exe finds the right memory addresses.
* The map has a size of 80*50. The x coordinate is counted from left to
right, the y from up to down.
* The main map data are located at 672Bh:0 (6817h:0). They are devided
in four blocks, each of 3E80h bytes length. Each block contains map
row after map row four informations respectively. E.g. it starts:
000h-04fh: first map row, first parameter
050h-09fh: first map row, second parameter
0A0h-0Efh: first map row, third parameter
0F0h-13fh: first map row, fourth parameter
140h-18fh: second map row, first parameter
...
Altogether there are 16 parameters stored at most. They are:
First block, first parameter:
The type of the landscape. It means:
01 : ocean
02 : forest
03 : swamp
06 : plain
07 : tundra
09 : river
0A : grassland
0B : jungle
0C : hill
0D : mountain
0E : desert
0F : arctic
04, 05, 08 leads to chaos on the screen
First block, second parameter:
Looks like tactical information. All field which are under control of
one civilization seems to be marked by its number (01-07 ?). Besides
all plain, river and grasslands, which are under no control, gets an
08-0C.
First block, third parameter:
Something like the same. But now armees and towns are marked by
08+number of civilization. There are some unmotivated 02-05 in the
area under no control.
First block, fourth parameter:
Defines the small map in the upper left corner:
00 : unknown (black)
01 : water
02 : land
Second block:
??????; the first parameter seems to numerate islands, the second con-
tains 0C-0F at each plain, river, grassland.
Third block, first parameter:
Here you can find the attributes of a field:
Bit 0 : marks a town ?
Bit 1 : irrigation
Bit 2 : mines
Bit 3 : roads
Bit 4 : railroad (need bit 3)
Bit 5 : fortification
Bit 6 : pollution
Bit 7 : unused ?
Third block, second parameter:
The same! Because you can find more entries in the first parameter
then in the second, which you can not see on the screen, it looks like
that in the first all extensions are stored and in the second only
those, of which you know that they exist (because one of your armies
has passed by this point).
Third block, third and fourth parameter:
?????????????????
Fourth block:
?????????????????
It looks like that somewhere is stored some uninteresting things, too,
like the colors of the minister pictures.
I have not investigated much time in puzzling out the 'uninteresting'
parameters. If you get out more, send me a mail.
* The known and unknown areas are stored at 40F8h:7FF8h (3E55h:0740h).
To this address you must add 32h*(y-Koordinate) + (x-Koordinate). Each
bit contains the information (1 = known, 0 = unknown) for one of the
civilizations. There is a byte which contains which civilization you
are playing (see civext.asm source).
In version 1 the 40F8h segment starts with informations like, how many
food, production, ... has a grassland field, ...
* The points of improvement (horses, gold, ...) are calculated by the
following algorithmus (x, y: coordinates, DIV: integer division). If
the following condition is fulfilled, then there is an improvement:
[(x DIV 4 * 0Dh) + (y DIV 4 * 0Bh) + MW] and 000Fh
= (x AND 3 * 4) + (y AND 3)
The masterword MW can be found at 40F8h:6E00h (41E4h:6E80h). It looks
like that it defines, too, where the huts are set at the beginning.
The calculating procedure is set right above the int $F2 call
(31E2h:187D (31E2h:1739h)).