Author Topic: SCI Decompiler?  (Read 23511 times)

0 Members and 1 Guest are viewing this topic.

Offline lance.ewing

SCI Decompiler?
« on: December 22, 2010, 05:14:59 AM »
I've seen references to someone other than Brian writing a SCI decompiler. Does anyone know much about this? Who it was? Where it is?



Offline MusicallyInspired

Re: SCI Decompiler?
« Reply #1 on: December 22, 2010, 09:54:32 AM »
It was never released, is all I can remember.
Brass Lantern Prop Competition

Offline lance.ewing

Re: SCI Decompiler?
« Reply #2 on: December 22, 2010, 01:58:27 PM »
Sounds like a fun project doesn't it? It would be interesting to talk to the author to see how far he/she got. It is essentially the equivalent of the SHOWLOG tool I wrote for AGI but obviously a lot, lot harder. You'd basically need to start by understanding the compilation process. I'd imagine that looking at some of the successful Java decompilers might throw up some ideas on how to tackle it.

Offline MusicallyInspired

Re: SCI Decompiler?
« Reply #3 on: December 22, 2010, 02:18:20 PM »
It would be fantastic to be able to decompile Sierra scripts and.....mess with things :). Or create more efficient fan patches. But they all use different versions of SCI and seeing as the compiler in Studio/Companion works for only 1 version would it work for all SCI0 games?
Brass Lantern Prop Competition

Offline lskovlun

Re: SCI Decompiler?
« Reply #4 on: December 22, 2010, 06:04:48 PM »
there is a generic decompiler architecture in the scummvm codebase now (it was written in a Google Summer of Code project). It should be quite possible to write an SCI decompiler based on that. Doesn't help with compilation, of course.

Offline MusicallyInspired

Re: SCI Decompiler?
« Reply #5 on: December 22, 2010, 09:01:33 PM »
It'd at least be nice to see how Sierra programmers went about doing things.
Brass Lantern Prop Competition

Offline lance.ewing

Re: SCI Decompiler?
« Reply #6 on: December 23, 2010, 01:40:54 AM »
there is a generic decompiler architecture in the scummvm codebase now (it was written in a Google Summer of Code project). It should be quite possible to write an SCI decompiler based on that. Doesn't help with compilation, of course.

Interesting. What does scummvm use the generic decompiler architecture for?

Offline Collector

Re: SCI Decompiler?
« Reply #7 on: December 23, 2010, 03:57:02 AM »
A lot of the games supported by ScummVM had to be RE'd to add that support. I would assume it has it for this reason, though I am not sure why it would be incorporated into ScummVM instead of just standalone tools for the SVM developers.
KQII Remake Pic

Offline lance.ewing

Re: SCI Decompiler?
« Reply #8 on: January 04, 2011, 06:02:56 PM »
I'm sure this information must be available somewhere, but to save me having to search for it, does anyone know off the top of their heads what exact version of the SCI interpreter that SCI Studio and SCI Companion are intended to support?

Offline lance.ewing

Re: SCI Decompiler?
« Reply #9 on: January 04, 2011, 06:13:09 PM »
0.000.685?

I found the string .685 in the SCIV.EXE, so I'm guessing this is the one.

Offline Collector

Re: SCI Decompiler?
« Reply #10 on: January 04, 2011, 08:59:53 PM »
I believe that the template game was made from LSL3. The Free SCI documentation IDs LSL3 as 0.000.572, which is what mine shows. 0.000.685 covers SQ3, Camelot and ICEMAN.
« Last Edit: January 04, 2011, 09:10:38 PM by Collector »
KQII Remake Pic

Offline lance.ewing

Re: SCI Decompiler?
« Reply #11 on: January 05, 2011, 04:50:42 PM »
I believe that the template game was made from LSL3. The Free SCI documentation IDs LSL3 as 0.000.572, which is what mine shows. 0.000.685 covers SQ3, Camelot and ICEMAN.

Ah, just seen this post from back in November that seems to confirm 0.000.572 as being the template game version:

http://sciprogramming.com/community/index.php/topic,309.msg1617.html#msg1617

...although, having said this, I just found this post that seems to suggest it is 0.000.685:

http://sciprogramming.com/community/index.php/topic,50.msg113.html#msg113

...but then this next page seems to suggest a close connection between the SCI0 specifications and version 0.000.572:

http://wiki.scummvm.org/index.php/SCI/Specifications/Graphics/SCI_Ports

I'm fairly sure I saw the string .685 in the SCIV.EXE executable that comes bundled with both SCI Studio and SCI Companion, but that doesn't mean that the template game was based on that version. Perhaps the template game was based on 0.000.572 but the interpreter version packaged with the IDEs is 0.000.685. Unfortunately the SCIV.EXE is a compressed EXE by the looks of it, so the full strings are not fully visible enough for me to be sure of the version. Might need to fire up DOSBOX and see if I can get the interpreter to display the version.

Offline lance.ewing

Re: SCI Decompiler?
« Reply #12 on: January 05, 2011, 05:05:55 PM »
Actually the better approach was to use UNLZEXE to obtain the original uncompressed SCIV.EXE file. After having done this, I can now clearly see the version number in the file:

0.000.685

So the interpreter packaged with SCI Companion is 0.000.685.

Just did the same for SCI Studio and it is also 0.000.685.

Maybe earlier versions of SCI Studio used 0.000.572. It seems like the SCI specs and potentially the template game could have been based on that version.

Offline lance.ewing

Re: SCI Decompiler?
« Reply #13 on: February 09, 2011, 08:20:09 AM »
I believe at least a couple of you have had a go in the past at manually decompiling scripts by hand to the SCI Studio syntax. I was wondering if someone could describe the process they went through in doing this? For example, for a particular method, how did you recognise the higher level keywords? Was it certain patterns of instruction sequence? Is it possible to provide an example? Is this already covered somewhere?

Offline gumby

Re: SCI Decompiler?
« Reply #14 on: February 09, 2011, 09:53:43 PM »
Not sure if this is relevant, but I was in SCI Companion today and selected to view a file that did not have the source available & was displayed the disassembly.  I found it pretty brutal - I never fully (or really partially) understood assembly, and it's been years.

It might be worthwhile to put together a working script within Companion, compile it, then decompile & see what can be learned?  I know this is somewhat of a backwards approach and perhaps not an answer to your question.
In the Great Underground Empire (Zork port in development)
Winter Break 2012 Rope Prop Competition


SMF 2.0.19 | SMF © 2021, Simple Machines
Simple Audio Video Embedder

Page created in 0.139 seconds with 24 queries.