Z Code Disassembler

Is it possible to ‘disassemble’ a compiled z* game file back into it’s original ZIL code?

Thanks

my understanding (cf. 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.

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.

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.

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.

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.

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.

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.

What is or will be in this archive of ZIL codes?

Here you go! :smiley:

drive.google.com/open?id=1GNn39 … tukV27wMoA

That’s really cool. I found Zork in it’s ¿original? code MDL and a C port if that helps.
github.com/itafroma/zork-mdl
github.com/devshane/zork

Thanks dude!

Our very own Alex Proudfoot is tackling Zork as we type, he started backend of last year … :slight_smile:

learningzil.blogspot.co.uk/2017 … -zilf.html

Nice!