intfiction.org

The Interactive Fiction Community Forum
It is currently Sat Oct 20, 2018 4:48 am

All times are UTC - 6 hours [ DST ]




Post new topic Reply to topic  [ 15 posts ]  Go to page 1, 2  Next
Author Message
 Post subject: Z Code Disassembler
PostPosted: Thu Dec 28, 2017 6:30 pm 
Offline
User avatar

Joined: Mon Mar 13, 2017 3:26 pm
Posts: 120
Is it possible to 'disassemble' a compiled z* game file back into it's original ZIL code?

Thanks


Top
 Profile Send private message  
Reply with quote  
 Post subject: Re: Z Code Disassembler
PostPosted: Thu Dec 28, 2017 7:21 pm 
Offline

Joined: Wed Feb 15, 2012 7:00 pm
Posts: 388
my understanding (cf. https://groups.google.com/forum/#!topic ... xovJzCJkB8) is that disassemblers will give you text strings and op codes, but not source code.


Top
 Profile Send private message  
Reply with quote  
 Post subject: Re: Z Code Disassembler
PostPosted: Thu Dec 28, 2017 9:28 pm 
Offline
User avatar

Joined: Mon Mar 13, 2017 3:26 pm
Posts: 120
UnwashedMass wrote:
my understanding (cf. https://groups.google.com/forum/#!topic ... xovJzCJkB8) is that disassemblers will give you text strings and op codes, but not source code.


Damn. Ok, thanks dude.


Top
 Profile Send private message  
Reply with quote  
 Post subject: Re: Z Code Disassembler
PostPosted: Thu Dec 28, 2017 11:42 pm 
Offline

Joined: Fri Oct 18, 2013 10:13 am
Posts: 2660
Location: The Midwest
You could in theory get it into ZIL syntax; a similar project was done for Inform. But descriptive names and comments of course will be gone.

_________________
Daniel Stelzer


Top
 Profile Send private message  
Reply with quote  
 Post subject: Re: Z Code Disassembler
PostPosted: Sun Dec 31, 2017 10:10 am 
Offline
User avatar

Joined: Mon Dec 12, 2011 7:03 pm
Posts: 557
Location: Washington
Going backwards in the compilation process will always be very hard to comprehend. The best I've been able to make of it is to use the output of a decompiler as a guide to write new code that's supposed to do what the old executable does.

_________________
David Griffith


Top
 Profile Send private message  
Reply with quote  
 Post subject: Re: Z Code Disassembler
PostPosted: Fri Jan 12, 2018 8:53 pm 
Offline

Joined: Thu Apr 27, 2017 10:57 am
Posts: 12
Having analyzed the source code for multiple Infocom games (including different versions for a game), it is difficult but not impossible to create the original ZIL code. I don't know how I'd create a program to automate it but you could do it by hand. As others have said, you will not variables names or address that have any meaning.


Top
 Profile Send private message  
Reply with quote  
 Post subject: Re: Z Code Disassembler
PostPosted: Sat Jan 13, 2018 12:27 am 
Offline

Joined: Sat Jan 23, 2010 4:56 pm
Posts: 5770
You can create ZIL code which compiles to the same thing, but I don't think you can be certain that it's *the same* source code. Even aside from symbol names, you could have different code structures which compile to the same thing.


Top
 Profile Send private message  
Reply with quote  
 Post subject: Re: Z Code Disassembler
PostPosted: Sun Jan 14, 2018 3:17 pm 
Offline

Joined: Thu Apr 27, 2017 10:57 am
Posts: 12
True, you can't be sure it is exactly the same code. However, there are several examples of released Infocom ZIL source code which could form the basis of your own code that compiles to the same Z-code.

But I'm not sure how much its worth spending that much time doing it.


Top
 Profile Send private message  
Reply with quote  
 Post subject: Re: Z Code Disassembler
PostPosted: Wed Jan 24, 2018 8:24 pm 
Offline

Joined: Sun Jan 01, 2017 1:32 am
Posts: 68
There are?
I thought all the source code was lost. Probably on one of those old hard drives.


Top
 Profile Send private message  
Reply with quote  
 Post subject: Re: Z Code Disassembler
PostPosted: Thu Jan 25, 2018 3:23 am 
Offline
User avatar

Joined: Mon Mar 13, 2017 3:26 pm
Posts: 120
blindHunter wrote:
There are?
I thought all the source code was lost. Probably on one of those old hard drives.


You're right i'm afraid, there aren't! We are however creating a store of raw ZIL code files for resources if anyone is interested.


Top
 Profile Send private message  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 15 posts ]  Go to page 1, 2  Next

All times are UTC - 6 hours [ DST ]


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group