SCI Studio bug-report

sith Hi,

Some bugs I encountered in SCI studio :

- Views get corrupt or completely turn to black
- Mirror-loop does not always work (active cell doesn't mirror correctly)
- When I click on a font I get something like "Illegal bitmap"
- Picture-Editor : When I want to create a dithered color, all the colors in all palletes turn to black.

No offence Brian, but I think SCI Studio leaks more memory then Spikey leaks acid ;)

I think there are some free libraries on the net, that automatically records every malloc() and free(), and detects memory-leaks. (I found one at www.flipcode.com, but it was for MSVC, not Borland)

PS : Last time I checked your site, the source-archives where offline. Will you put them up soon ?

PPS : Keep up the good work ! 8)


mr-t Many of the bugs mentioned above will be fixed in SCI Studio 2.14 ;D
sith Brian,

I just made a donation, so you better fix those bugs fast ;D

Greetzzz,

Jeroen
Pikachu14 Now that he mentioned Spike...

If Roger sticks his head in a pool of acid, he dies.
If Roger gets hit by an acid drop, he dies.
If Roger gets Spike stuck on his face, he lives.
How come?
Brian_Provinciano Thank you! I've been actively working on the VGA stuff, but I'll fix those to another 2.1 release.
Rono This is not really related to bugs, but I'm intersted why is game-originated-script editing is not allowed?
And if it is because you don't encourage Sierra games script editing, why can't the script just be viewed as read-only?

That's the only thing that bothers me in SCI Studio, other than that, I want to tell you, Brian, that this is the only program that makes the cut in SCI editing! ;D

P.S: Can you help me get documentation on SCI sound format? I'm interested in making a sound editor for SCI, and if it works, I would like for you to add it to the next version of SCI Studio. I've already written a DOS sound editor for AGI, and now I'm determined to make a Windows version of it and add it to AGI Studio 1.37.
Hopefully I'll make a contribiution to the Sierra games editing world... (Just like you, Peter Kelly, Lance Ewing & Eric Fullerton!)
Omer Mor The reason that SCI Studio won't allow you to edit/view sierra's scripts is not because of Brian's policy, but because it's almost impossible.
Think of SCI scripts as compiled EXE files, and the SCI script source as a C source code.
The reason you don't see an SCI decompiler is the same reason why you don't see EXE files decompilers around. you can only disassemble EXE files, and edit them in assembler, and in the same way you can disassemble SCI scripts from sierra games, and edit their byte-code, but it's not an easy task to do. Ask Brian. That's what he was doing when he built his class framework out of Sierra's scripts.

About SCI sound specifications, you can check this sites for lots of information:
1) Ravi's site:
http://www4.ncsu.edu:8030/~rniyenga/sci/
2) FreeSCI's online documentation:
http://freesci.linuxgames.com/scihtml/book1.html

Notice however that Ravi is already making an SCI sound editor as well, so you might collaborate with him or something...

Good luck!
Rono Look Omer, I'm a programmer, and I know a thing or two about scripts... (not to be arrogant... of course!)
Now, I admit I havn't read about the SCI scripting, but I assumed the script resource is saved in a "translated" state, between a readable source and assembler, since the interpreter itself interperts it to machine code. Since Bri has already investigated this "translation" to make his class-framework, like u said, I figured it would be simply a shame to let all that work to waste, by not writing an editor...

Listen, the reason I'm so keen about it is that I would LOVE the chance to fix some silly bugs in some games...
U've read about them, Omer, in the topic I started...
I would really love to get Bri's response in this matter, anyway...
Rono Besides, wouldn't u love to get a peek at the code, just to figure out where some missing score (like, say, in conquest of camelot) is hiding? ;D
sonneveld The reason why *AGI* logic decoding is so simple is because commands map directly to the syntax. The syntax is very simple for a reason.

Disassembling SCI or even x86 + C is much more complex. a single command could take a few lines and, due to optimisation, several commands might share code which makes it harder for a program to automatically disassemble.

Brian had to do all his work by HAND.

- Nick
Brian_Provinciano It NEEEEDs to be manually recoded. Please go ahead and make a decompiler. Anything's possible. It would just require a lot of AI in the code. Second, all the scripts are linked together, so each time one is decompiled, all would need to be as well. Third, there are missing scripts in all games, so the game can never be 100% accurately decompiled/recompiled. Fourth, if it was decompiled, it would look like this:

(locals
local_0000 $12
...
local_1F3A 0
)

(procedure (proc_4E3C p1 p2 p3)
(var v1)
= v1 0
(while(< v1 12)
(send inst232:something(283 34))
)
)

There are also missing selectors and classes which cause problems, and require workarounds to be written when recoding them. Also, 123 can mean 123, $7B, aSelector, anAddress, a text index, etc. These are just the problems after all the code to accurately translate bytecode to high level.

It would be so much work to do the decompiler, I'd rather write SCI Studio VGA and such.

Please, make a decompiler yourself though, since you are in fact a programmer.
Rono Woh, I get the feeling you're upset with me, don't be.
I didn't mean to be disrespectful at all, I just wanted to hear your oppinion in the matter, and I fully trust your knowledge with the SCI design.
You made some interesting points about the matter, but I don't understand the part about missing classes and selectors, after all, the interpreter can understand it (most of the time... :-) )
I disagree with your point on how it would look like: the syntax could be mostly controlled by the developer of the decoder...
Still it is hard to face the fact that Sierra's programmers designed a scripting mechanisim that can't be decoded, it doesn't make sense because the entire concept of scripting is quick maintanence without the need of a saved source... if this is truly the matter, then I wouldn't call a script and interpreter, but a compilation-based-code and binary file...
Rono Oh, BTW, I too think you should focus on developing SCI VGA, and not mess around with a disassembeling-like task...
All I wondered about was why haven't you done that job when you worked with it anyway... Again, I emphasize the fact that I don't mean to judge you in any way... Believe me, I admire the work you've done!
sonneveld I program stuff in C but I don't throw away the source code.. just like Sierra compiled stuff in SCI but they didn't throw away the original source code.

They didn't make it use a byte code language for quick maintenance.. they developed it so they would just have to port the interpreter to run it on a different system. Having a system specially made for adventure games helps too.

- Nick
Rono I now understand what you're saying... It makes a lot of sense.

I wonder, since the quest for deciphering the AGI and SCI data formats, has no-one developed any decoder for the SCI scripts, even a non comprehendable one?
(Excuse me, but I am not informed about what has been developed in the script aspect, I'm more interested in the sound aspect...)
Brian_Provinciano I did a disassembler a long long time ago. I also have a disassembler which can dump scripts which can be reassembled.

I also was not pointing out the _syntax_ but rather the fact that labels are uncomprehendable. However, the syntax whould need to be the high level scriping syntax (how else could it be recompiled?).

I am not angry, nor mean any offsense, but you really really should read all you can on SCI before making these claims.
Rono You're absolutly correct, only I would rather spend my time on my project (AGISE integrated)...

Changing the subject: I came across several bugs in SCI Studio 2.13:
1. while previewing a resource, I sometimes get: "incorrect parameter" (or something similar) and no other views can be previewed after that.
2. when operating two instances of SCI Studio, the current previewed view gets displayed in the other instance of SCIStudio... wierd, huh?
3. When previewing some pictures, I get a message saying: "This is a beta, the studio will stop the time-consuming filling" (not in these words, but you probably know what I mean)
4.For some strange reason, I can't seem to preview any resource of QFG2... have you tried that?
5.And the worst bug yet: sometimes the Game.txt file (annotation) gets overwritten by an empty file. You have no idea how many times I wrote the description for the Conquest Of Camelot annotation.
6.When I'm changing a resource's name, and press delete (while writing the name), SCI Studio asks if I want to delete the resouce.
7.I would recommend a key-operated name change, (like Windows' F2).

Hope you already took care of all of these...
Omer Mor I don't agree with Brian - I do think it's good that people ask questions even if they haven't already read all the written information about SCI because it make this community more alive. It doesn't mean that Brian has to answer all the questions. If other people know the answers they can be a good replacement :-)

I also want to clarify for you some stuff about SCI: Sierra used a virtual machine, like in Java that runs compiled scripts (what we call byte-code). It's not trivial to take this byte-code and decompile it like we wrote here.
I can see why you were confused: the term script today, in the computer world, is used to describe a non-compiled, easy-to-read heap of code that can be easily changed. However, the term script here (that Sierra and Lucas both used: SCI = SCript Interpreter or Sierra Creative Interpreter; SCUMM = Script Creation Utility for Maniac Mansion) is more in a context of movies and plays, where they use scripts to fully describe the plot.

P.S. - You like Dream Theater? Good taste! Have you checked my band? We're not as good as they are (no one is) but we do our best...
Brian_Provinciano I reply to loads and loads of questions that are already answered in very open, easy to find places. However, Rono was assuming things about the SCI scripts which are false, and then with those assumptions, making statements about my work which were negative towards me due to his ignorance towards the subject. I had to clear things up.
Rono Brian, I didn't mean to be negative about your work (at all!), as I pointed out before, I was just intrested why SCI Studio wasn't what I expected (based on no knowledge of SCI scripts, but only on my imagination)...
I was sure there was a good reason why it wasn't like I dreamed (like any program in the world!), and as you explained quite clearly, there was a good reason...
Yeah, I know that I know nothing about SCI scripts, but I simply don't have time to search the SCI knowledge base...
I didn't mean to imply anything harmful, and if I did, I apologise. (Us, Sierra fans and community have to stick together!)
Rono Omer, haha, I found that we have another thing in common, except for loving Sierra, loving Dream Theater, being from Israel and being musicians...
Call me at 04-9988933 to find out what that thing is...
I tell you, it's a small world after all... ;D