User:Araxestroy/DOS version decompilation notes: Difference between revisions
From sc2k-reverse
Jump to navigationJump to search
Araxestroy (talk | contribs) Created page with "We're not doing a full patch or anything on the DOS version but I've got an IDA database going for it to compare a few things against. If anyone asks me for a DOS patch I will put them in The Little Box Of Screams along with the Amiga fanboys. === Possible thiscall format === A lot seems to use __usercall with int a1@<edx> at the start. I'm wondering if this is a __thiscall variant specific to some DOS compiler, where that should actually be int this@<edx> more or less..." |
Araxestroy (talk | contribs) No edit summary |
||
(2 intermediate revisions by the same user not shown) | |||
Line 19: | Line 19: | ||
:: Same format as Win95 version | :: Same format as Win95 version | ||
* '''dseg03:000C82E6''': bool bCityHasOcean | * '''dseg03:000C82E6''': bool bCityHasOcean | ||
=== Map data === | |||
* '''dseg03:000D64C4''' dwMapXUND | |||
* '''dseg03:000D66C4''' dwMapXZON | |||
* '''dseg03:000D68C4''' dwMapXTER | |||
* '''dseg03:000D6AC4''' dwMapALTM | |||
* '''dseg03:000D6CC4''' dwMapXBLD | |||
* '''dseg03:000D7154''' dwMapXBIT |
Latest revision as of 20:32, 10 March 2025
We're not doing a full patch or anything on the DOS version but I've got an IDA database going for it to compare a few things against. If anyone asks me for a DOS patch I will put them in The Little Box Of Screams along with the Amiga fanboys.
Possible thiscall format
A lot seems to use __usercall with int a1@<edx> at the start. I'm wondering if this is a __thiscall variant specific to some DOS compiler, where that should actually be int this@<edx> more or less across the board. Watcom perhaps? I don't have enough experience with DOS C++ compilers to know whether or not that's accurate.
Some functions
- cseg01:00038BA7: char __usercall SimulationProposeMilitaryBase@<al>(int a1@<edx>, __int16 a2@<di>)
- Cities with coastlines seem to have a 50/50 chance of getting a naval base versus getting something else! This is good to know for reimplementation in the Win95 version.
- cseg01:00049F2A: char __usercall MessageBoxYesNo@<al>(int a1@<edx>, int a2)
- Message format is an array of 32-bit near pointers to strings followed by a null pointer for termination.
Some variables
Booleans all seem to be the C++ bool type, so sizeof(bool) == 1.
- dseg03:000C82E5: char bMilitaryBaseType
- Same format as Win95 version
- dseg03:000C82E6: bool bCityHasOcean
Map data
- dseg03:000D64C4 dwMapXUND
- dseg03:000D66C4 dwMapXZON
- dseg03:000D68C4 dwMapXTER
- dseg03:000D6AC4 dwMapALTM
- dseg03:000D6CC4 dwMapXBLD
- dseg03:000D7154 dwMapXBIT