Author Topic: OpenSMACX and function names  (Read 1327 times)

0 Members and 1 Guest are viewing this topic.

Offline Threen

OpenSMACX and function names
« on: May 18, 2022, 07:32:22 AM »
I want to contribute to OpenSMACX and I wondering how function names have been extracted from the binary.

I have the GOG version of SMACX and I cannot find function names in any of the files.

Is there a different version I can extract these from, or is there is a list of them available somewhere?
« Last Edit: May 18, 2022, 12:26:36 PM by Threen »

Offline DrazharLn

Re: OpenSMACX and function names
« Reply #1 on: May 18, 2022, 08:32:25 AM »
That's cool! What would you like to contribute?

As I recall, most of the names were extracted from a binary for Mac that still contained symbols. Others were invented by scient and occasionally other modders.

I don't think there are.more names to copy that aren't already in the IDA database, but for an authoritative answer you will need to ask scient. You can sometimes catch them on this board or on GitHub.

Offline Threen

Re: OpenSMACX and function names
« Reply #2 on: May 18, 2022, 09:32:09 AM »
Thank you very much, I'll take a look at the IDA file.

I have some knowledge of Ghidra, so I figured I could decompile
and clean up some of the functions which haven't been done yet.

I have a very different setup to Scient.
I have CLion under Linux able to create the DLL, and have written a standalone python script which inserts the imports into the EXE. So maybe I could also add that to the git repo as an alternative build method?

Offline DrazharLn

Re: OpenSMACX and function names
« Reply #3 on: May 18, 2022, 10:31:37 AM »
Nice. Good luck! IDA can be made to emit C header files that ghidra might be able to easily consume.

I can't speak for scient, but if I were you I would open a pull request with your build method. Then either it will be accepted or it will be moderately visible to others who might benefit from it.

Offline Threen

Re: OpenSMACX and function names
« Reply #4 on: May 18, 2022, 12:12:29 PM »
Thanks DrazharLn!

I have tried IDA Freeware, but it cannot open IDB files.
I have also tried the Demo of IDA Pro 7.7, which tells me "Sorry, the demo version can't load old databases."
The file is binary, so notepad gives me nothing useful.

Sorry for my ignorance here, but is there another method I can use to open this file?
Or is purchasing IDA Pro the way?

Offline DrazharLn

Re: OpenSMACX and function names
« Reply #5 on: May 18, 2022, 02:00:49 PM »
Realistically, most amateurs just pirate it. You could ask scient (who has a legit copy of IDA) to generate an output file from the database that ghidra is likely to be able to consume.

In the meantime, you might use the terranx* files from the thinker project: https://github.com/induktio/thinker/tree/master/src or from OpenSMACX. You can probably find some way of turning those into something ghidra can understand and they define lots of the structures and functions in the binary.

Offline Threen

Re: OpenSMACX and function names
« Reply #6 on: May 19, 2022, 12:46:25 AM »
Much appreciated.
I was not aware of the Thinker project, and terranx.cpp is exactly what I am after.
Thanks again!

Offline DrazharLn

Re: OpenSMACX and function names
« Reply #7 on: May 19, 2022, 10:58:55 AM »
Nice. Happy to help.

Offline Blake00

Re: OpenSMACX and function names
« Reply #8 on: August 05, 2022, 09:32:19 AM »
Project has gone pretty quiet over the last couple of years so it's good to see someone offer their skills! :)

Blake's Sanctum: Civilization Series (Incl Colonization & Alpha Centauri)

 

* User

Welcome, Guest. Please login or register.
Did you miss your activation email?


Login with username, password and session length

Select language:

* Community poll

SMAC v.4 SMAX v.2 (or previous versions)
-=-
24 (7%)
XP Compatibility patch
-=-
9 (2%)
Gog version for Windows
-=-
103 (32%)
Scient (unofficial) patch
-=-
40 (12%)
Kyrub's latest patch
-=-
14 (4%)
Yitzi's latest patch
-=-
89 (28%)
AC for Mac
-=-
3 (0%)
AC for Linux
-=-
6 (1%)
Gog version for Mac
-=-
10 (3%)
No patch
-=-
16 (5%)
Total Members Voted: 314
AC2 Wiki Logo
-click pic for wik-

* Random quote

Look at any photograph or work of art. If you could duplicate exactly the first tiny dot of color, and then the next and the next, you would end with a perfect copy of the whole, indistinguishable from the original in every way, including the so-called 'moral value' of the art itself. Nothing can transcend its smallest elements.
~CEO Nwabudike Morgan 'The Ethics of Greed'

* Select your theme

*
Templates: 5: index (default), PortaMx/Mainindex (default), PortaMx/Frames (default), Display (default), GenericControls (default).
Sub templates: 8: init, html_above, body_above, portamx_above, main, portamx_below, body_below, html_below.
Language files: 4: index+Modifications.english (default), TopicRating/.english (default), PortaMx/PortaMx.english (default), OharaYTEmbed.english (default).
Style sheets: 0: .
Files included: 45 - 1228KB. (show)
Queries used: 38.

[Show Queries]