6 new categories and 72 new items added to the shop!Fake forum EC for posting doubled everywhere to help pay for them!
0 Members and 1 Guest are viewing this topic.
Re: unused writable memory,Thanks for the suggestion, I may use that for a "which film interface" type switch.
Re: unused executable memory,I'll just dump everything at the end of the executable section for now, then.
That's contradictory. Have you ever seen SMAC use any of the writable memory around 9B86A0?
Thanks for the offer. The code isn't ready yet (not feature complete, not tested), but when it is I'll be sure to send you what you need with addresses based off your latest patch.
strcat and strcpy are standard C functions that have been rendered in the main body of the code. The call to WinExec goes into Kernel32.dll. I find them all with IDA Pro, but I can give you exact addresses to use once the code is ready to include.
mov ecx, [esp+arg_0]push editest ecx, 3jz short loc_644C7C
push edimov edi, [esp+arg_0]jmp short loc_644CC1
I'm looking in IDA at (I believe) scient modded terranx.exe. I have strcat at 644C60 and strcpy at 644C50strcat starts:Code: [Select]mov ecx, [esp+arg_0]push editest ecx, 3jz short loc_644C7Cstrcpy starts:Code: [Select]push edimov edi, [esp+arg_0]jmp short loc_644CC1I have 645470 as possibly in the middle of a function. 645460 looks to be the start of that function, but I don't know what it does.
IDA finds strcat at 645470 in 2.5j, as you say. strcpy is at 645460. The content is the same as in the gog version, just a different offset.strlen is at 6453e0.There are a bunch of other potentially useful C functions baked in, too. You might want to consider getting the freeware version of IDA Pro and perusing the Functions and Imports windows; it's quite good at working out what functions are.If you're running out of runtime memory, for instance, you could use the malloc function and move all your stuff into there. Should be safer, too, if you can't guarantee that various parts of the standard memory aren't writable. (I think malloc gets more memory off the heap, which should mean it doesn't interfere with the existing memory).