fallout2-re
fallout2-re copied to clipboard
Some thoughts on existing symbols
First of all, awesome work! This looks like a very promising approach considering a lot of other successful engine reversing projects with a thriving community. The progress is already great.
I noticed some symbols not being named (random example): https://github.com/alexbatalov/fallout2-re/blob/main/src/game_dialog.c#L1806 which is known already as gdProcessChoice_
There's an IDA DB here: https://www.dropbox.com/s/tm0nyx0lnk4yui0/Fallout_1_and_2_IDA68.rar which contains a lot of info (from https://github.com/phobos2077/sfall), not sure if you've looked at it already.
Also, a collection of reversing docs: https://fodev.net/files/fo2 Call structure: https://rotators.fodev.net/atom/F2_function_structure.txt Symbol (functions/globals) dump: https://fodev.net/files/fo2/symbols.html
I could take a look at writing some code to automatically rename/refactor most raw memory addresses to the already known names, at least as a first pass and contribute as pull requests.
Hey, thanks for this info. I was not aware of how much work has already been done before I even started. I've only checked falltergeist and sfall for their interpretation of some struct fields early in the process.
I've checked your renamed stuff. This is indeed a great start. What I don't like is that these names are not uniform and does not match the style of the remaining codebase. Can you prefix all your renamed symbols with underscore, so we know it's a subject for review?
I've checked your renamed stuff. This is indeed a great start. What I don't like is that these names are not uniform and does not match the style of the remaining codebase. Can you prefix all your renamed symbols with underscore, so we know it's a subject for review?
Sure, I totally understand wanting to fix the naming style mismatch. Could definitely do that, since it's been done by some code I've written, it's a quick change.
I also generated a table like this: https://fodev.net/files/fo2/fallout2_re.html - I guess it's obsolete now with the renaming, but maybe it's a useful reference for review?
Note that the "Matched function" column is just what's defined here: https://fodev.net/files/fo2/fallout2.sym - the arguments and return types are more incomplete (some of it from sfall) than what you've already implemented and can thus be mostly ignored. In fact I'm working on updating it (automatically) based on fallout2-re.
@ghost2238 Can you provide a map of renamed symbols?
@ghost2238 Can you provide a map of renamed symbols?
Map? In what format, something different than in the links in first post?
Simple text file will be enough:
dword_123 _something_pretty
sub_321 _do_something
Thanks, with this fantastic bulk rename stuff we'll finish reference edition much sooner than I expected.
Hello,
maybe it was already pointed out, but the original Macintosh releases came with full symbol tables in the elf executables. If function names are not all known yet, it is a good source. Fallout2's mapper2.exe contains full dwarf debug information which can be extracted using Open Watcom. Mapper2 integrates a lot of functionality from the game executable as well as GNW95 down to local variables level, structures, type defs, etc.
The M.A.X. Port project's GNW reimplementation is also based mostly on Mapper2. You can check it out too, maybe there are some still to be done overlaps.
I also tried to do some reverse engineering of Fallout 2 last year (wanted to make a source port, ha-ha), however kinda ditched the idea after about a month of work. Not that I'm very familiar with RE myself, but I'll still check if I can find something useful to contribute.
Hey, this is definitely worth checking, thanks. I was wondering where those symbols came from, now it's perfectly clear.