city patch!!

Hello!

So, what does this city-patch do - technically?
Is there a chance to get the source ?

Perhaps, I will (finally!) be able to use it, too.....



Greetings
Jona
 
jona0 said:
So, what does this city-patch do - technically?
Technically, it replaces
Code:
    ... parse city.txt file ...
    cmp  ds:_wmMaxAreaNum, 49
    jz   _loc_exit
    mov  eax, offset "wmAreaInit: Error loading cities"
    call GNWSystemError
    mov  eax, 1
    call exit_
_loc_exit:
   ... tell that city.txt file is ok ...
with
Code:
    ... parse city.txt file ...
    cmp  ds:_wmMaxAreaNum, 49
->  jmp  _loc_exit <-
    mov  eax, offset "wmAreaInit: Error loading cities"
    call GNWSystemError
    mov  eax, 1
    call exit_
_loc_exit:
   ... tell that city.txt file is ok ...

The difference is in one byte - instead of conditional jump, the patch inserts non-conditional, and the game doesn't care about of count of locations in the citi.txt file anymore.
 
Thanks!

Now I know, I have to search for a "49".
Is there something special (recognizable) around this "byte" ?

I need to find this damned byte in the Mac-Executable....
Perhaps it is impossible, but at least I know, what to search for; because there still is NO city-patch for the Mac and Macplay will not do it ;-(((



Greetings
Jona
 
Now I know, I have to search for a "49".
Is there something special (recognizable) around this "byte" ?

The big problem here is that the mac executable probably have nothing similar to the x86 exe: it does the same thing but the instructions of the mac's processor aren't the same as a x86 processor. The only advice i can give you is to find a good disassembler for mac's executables and try to find where the prog checks for city.txt's integrity. Knowing nothing about mac's assembly I probably won't be of any help for this but I might have a look at the mac executable if i can find it and if i have some time...
 
jona0 said:
Is there something special (recognizable) around this "byte" ?
Surely recognizable is reference to "Error loading cities" string. If you find this reference in the executable, you'll find the byte at once. They should be not far from each other. I hope :)

What processors are used in Macs? Motorolla? IDA Pro can work with their assembler, as far as I know.
 
Hello!

Thanks a lot Abel!

I found the string and I compared the versions (Mac and PC(from the version included in the 1.05 Mod))

These Versions look very much alike at the place of the a.m. string.

But there is no hex '31' at this place, (in the PC version either!)
Only a bit farther down at "random pointer" or similar....

Changing that byte doesnt work (on Mac)), so its not the right place....

The Mac uses a PowerPC (mine uses even the IBM PPC970 - called G5) from Motorola/IBM.

Dont know, if this helps you.

Sorry, I do know nothing about assembler neither on PC nor on PowerPC, only a bit of 68k-CPUs, but this doesnt help a bit....

perhaps you can give me the hex-code of the area that you have changed and I can try comparing the 2 "exes" ....
Or would it help, if I sent you the Mac-Exe ???



Greetings
Jona
 
jona0 said:
Or would it help, if I sent you the Mac-Exe ???
It would be very useful experience to dig in Mac binaries, I think :)
My email is in the private message that I've sent you.
 
Back
Top