Hi Dmitry,

> CR> I think that this may have broken the VM; I'll have a closer look
> CR> at it later.
> 
>   I think I have checked all the places where Script_Global was used
> and added the same handling for Script_Local and Script_Temp. However,
> I haven't tested it.

Just one place in vm.c was missing, will be fixed in my next CVS update.

>   Now I'm trying to write a full decompiler for SCI scripts (unlike a
> disassembler, it will produce easily readable code, looking perhaps
> like Java). I'm doing the prototyping in Python; if it turns out that
> Python doesn't produce adequate performance, I'll rewrite it in C.

Python appears to integrate well with C; I haven't tried it myself yet,
but the preferred way to deal with this appears to be to re-write
only performance critical parts in C and make them accessible from Python.

What do you want to use the decompiler for, though? I agree that it's an
interesting technical challenge that should be fairly doable with all the
debug information we have, but you wouldn't be able to re-distribute any
of the decompiled scripts for copyright reasons...

>   By the way, does anyone have any examples of what the real source code
> of SCI scripts looks like? I've heard of a couple of scripts floating
> around the Net, but I've never seen them myself.

They look rather LISPish with a bit of C "(define FOO $0042)" and
(from what I've heard) SmallTalk thrown in.
I believe that Brian has a few chunks of scripts created for his compiler
on the SCI Studio homepage; you might want to check them out.

llap,
 Christoph


Reply via email to