Convert obj to int/mac

I was wondering how you could take an exported obj and have it converted to an int/mac.

  • + 1
  • 0
  • 276
  • 3
  • 1

Answers

I'm just repeat my answer from google groups

This process names decompile, and it is quite difficult process, and may not be legal in some cases I think. 

I saw only one very old project, for version 5 or less.

And actually answer is yes, it is possible, but we don't have such tool now. To do it, you should know exactly how works compiler, and it's lots of work.

In regards to Google Groups, I removed the post (or at least its not showing for me there any longer).

If its possible, how do we go about doing it?

As far as legality, this would be situational and in our case irrelevant. We are looking at pulling an old backed up .obj to identify how an older developer of ours had done it. Unfortunately, the .int was not backed up.

Putting aside legaility of this task (let assume this is all your code), your case sounds is even much more complicated: you are appranetly running newer version of an engine, with updated tokens and bytecode interpreter, but need to restore code for older version of bytecode. 

That was not frequent, but bytecode tokens map did change over the time, so you actually need 2 decompilers (for older version, and for currently used) not one. Possibility to have those is quite zero. Sorry.

Sorry to hear you no longer have your .int code.  Unfortunately, there is no way to reconstruct the .int code from the .obj code.  Even if you were able to dump out and understand the pcode/tokens, your resulting reconstructed .int code would not necessarily be the same as what you started with, and you may very well end up with un runnable nonsense, after many hours of work.  

One thing that may help you get some hints as to what your old developer did, would be to use the command line debugger and single step through the code.  You would not see the lines of code, of course, but you would be able to display the local variables.  This may help you figure out what the developer did, especially if they used execute commands.  The use of the command line debugger could be a separate article in itself, but briefly, you would go to the command line in the namespace where the routine is, issue an argumentless kill command to remove all existing variables, zl ^rou, and then issue the break command of your choice, (b "s", b "s+", b "l" b "l+"), and then d ^rou.  You will get a blank line because there is no int code, but you will be able to write out any variables that have been set.  Issue the 'go' command, and you will run the next line or command in the routine, depending on which break command you issued.  Continue to issue the 'go' command followed by the 'write' command until you finish the routine.  You may first want to practice this with a short and simple routine that does have .int code, if you are unfamiliar with how to use the command line debugger.

Hope this helps.