andwhyisit said:
1. You cannot hope to create such a patch file without fully documenting the mac and pc executables.
False. A patch file such as I described is nice because it
doesn't require full documentation. The editor simply needs to know
what has changed, not
where. It then knows where to make the change. It doesn't need a complete list of what is stored where.
andwhyisit said:
2. Such a patching system requires a patcher and a file. It is more efficient to create a program to search for changed offsets in your mod and applies them directly to the executable, which is what I was suggesting. Creating a patch file is pointless since it requires you to create a patch, then patch the file right after. There is absolutely no use for the patch outside of that, which makes it entirely redundant.
I'm not going to argue about which is more efficient, because I honestly have no idea.
However... executable files have a specific format, and there is no guarantee that a certain value will be at a certain offset, particularly since Cave Editor properly observes the Windows executable format (unlike Sue's, apparently). Wistil has already moved the maps to a new location in the file. He could easily do something like that again, causing your type of patch to break. My suggestion, however, is independent of where the value needs to be stored in the foreign executable and would survive such a change.
As for your redundancy argument... it seems to assume that everyone has access to both Mac and Windows computers. A more realistic scenario is that someone creates a mod and distributes it for one platform, with the patch file included so that users of another platform can apply the patch to a fresh executable and also play the mod. In general, the person creating the patch file would not be the same as the person using the patch file.
(A version with a patch file but no executable could also theoretically be distributed, to save bandwidth... but there's not really good reason for that, since bandwidth is fairly cheap nowadays... I think?)
andwhyisit said:
3. What I am suggesting will be editor independent.
My suggestion is also editor independent, and easily extensible as well. Though, to be fair, your version is just as easily extensible. It's less flexible though.
andwhyisit said:
Basically instead of:
ext = ".bmp"
..you will have:
[pc address] [mac address] [default unedited value]
This is more work than my version. With this suggestion, patching would involve the program scanning a file in a foreign format to examine various areas of the file, reading the value there, and then applying it to the local executable file. The main point here is that it would have to read
and write every single known value. (This because the executable being patched might not be a fresh copy.)
With my version, it would simply have to read and parse a simply-formatted text file and, for each line, write a value to a particular location in the target executable. It would not have to worry about the foreign executable. (It would still have to write every value, including the defaults, in case the executable isn't a fresh copy, though.)
andwhyisit said:
..for each offset. This can be done for any other platform as well, as long as the executable is fully documented (which is the reason why there are no mods for mac yet, because no-one wants to bother documenting the mac executable). Plus you can also run a check for information redirected by CE-based mods (map data was it?).
It's more because no-one has made level editors. You can make a mod without hacking the executable, you know. It wouldn't be as sophisticated, but it's possible.
And you're still wrong that the executable needs to be fully documented. It doesn't.
andwhyisit said:
Wistil probably has little interest in creating a patch file that no-one can use or will ever be able to use just because you and everyone else here are too lazy to document the mac executable. Nor a patch file that is ultimately redundant.
Can you let Wistil speak for himself, please? Thanks.
andwhyisit said:
Now if you wanted a patch file for distribution then that would be useful, but it still needs to be editor independent and you may still need to fully document the executable if you want it to be platform independent as well.
Yes. A patch file for distribution. Wasn't that what I said?
And no, you won't need to fully document the executable. Why do you even think that?
andwhyisit said:
Find out what each and every non-assembly-related pc version offset does, its address, its default value. Repeat this for the mac version. Do this and someone would be able to create a program with little effort. It's what I did for the save converter. Even if no-one creates a program (unlikely) then it is still possible to use your documentation to port a mod manually.
Keeping in mind that it's possible some values will be duplicated in the Mac executable; it's a Universal application, which basically means it contains two copies of the code in two different assembly languages (PowerPC assembly and x86 assembly, the latter presumably being what everyone here uses in their assembly hacks). Most of the data would probably be separated from the code, but some numeric constants may not be. (In fact, it's possible the file may have more than two copies of the code; there may be separate 32-bit and 64-bit x86 code.)
andwhyisit said:
p.s. Also it might be best to keep in mind that the byte order is reversed in mac executables.
Are you sure about this? It may be, for backwards compatibility with PPC, but it may be worth mentioning that newer Macs run in the same endian as Windows. That is, we're both little-endian. It's equally likely that Rosetta (the PPC emulator) will automatically byte-swap as necessary for the benefit of PowerPC code. I don't really know which is the case.