Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Topics - ZvikaZ

Pages: 1 2 3 [4]
Is there a "recommended IDE" for AGI (like SCICompanion for SCI)?

Specifically, I want to open KQ4, Apple 2gs version (trying to understand the problem at
I have tried some IDEs (honestly, don't remember which, it was a long time ago), and all failed to open logic 54.
Just tried now AGI Studio, and upon opening logic 54 it says:
Code: [Select]
Error decoding logic (position 0x0E4E): Unknown action command (175)
Is there something special with opcode 175?
Something 2gs specific? KQ4?
Some other complication?

Anyway, I've just found that with latest WinAGI  ( it opens logic 54 with no problem.
That's great news.

However, when I tried to open any sound resource, it gave an error:
Code: [Select]
Error while loading sound resource

598: Invalid sound data: unable to load sound resource

Is it because of something special with 2gs? or KQ4? or something else?

Any recommendation, suggestion or fixes are welcomed.


Hi everyone.

Ken Williams wrote the story of Sierra, from his perspective.
This is the behind-the-scenes story of the rise and fall, as it could only be told by the ultimate insider.
Sounds interesting...

SCI Development Tools / Error in SCICompanion documentation - fopen
« on: October 04, 2020, 05:47:22 AM »

I think there's an error in SCICompanion's documentation for `fopen` (
Upon success, it returns a handle to the file, otherwise, it returns NULL.

However, in Sierra's original kernel documentation (
(FileIO fileOpen filename [mode])
   Opens the file whose name is filename and returns a handle to it.  The
   optional parameter mode may be either fAppend, in which case the file
   pointer will be positioned at the end of the file for appending, or
   fTrunc, in which case the file will be truncated to zero length, or FRead
   in which case the file pointer will be positioned at the beginning of the
   file.  If mode is not specified, fAppend is assumed.  If there is an
   error in opening the file, a value of -1 is returned, else the file handle.

i.e., in case of an error, "a value of -1 is returned", while in SCICompanion it says "it returns NULL" (which is of course 0; but to be 100% certain I've verified that it's so - it's defined in SYSTEM.SH)

Also, the code example in the bottom of that page should be fixed accordingly:
Code: [Select]
(procedure (Foo &tmp hFile [buffer41])
        ; Open the file and write to it
        (if (!= NULL (= hFile (FOpen "somefile.txt" fCREATE)))
                (FPuts hFile "Hello World!")
                (FClose hFile)

        ; Open the file, read it's first string, and print it to the screen
        (if (!= NULL (= hFile (FOpen "somefile.txt" fOPENFAIL)))
                (FGets buffer 40 hFile)
                (FClose hFile)

                (Print buffer)

Is there any better place to report this?

SCI Development Tools / SQ3: Where is "Where am I?"?
« on: September 30, 2020, 08:59:37 AM »

In SQ3 intro, Roger says "Where am I?".
(Which *was*, or *wasn't* heard by the Soundblasters of the Dos era, I don't know - I have seen some different reports of this; I had only PC speaker at the time, anyway...)

It's in room 155. Seems to be sound resource 100:
Code: [Select]
(instance whereSound of Sound
number 100
priority 5
ScummVM debugger also reports that it's number 100.

However, I can't play it in SCICompanion.
It seems to treat it just like (an empty) regular MIDI resource, without digital sample.

Citing from
SCI0 Sound resources can also contain digital samples, although an SCI remake of KQ1 is the only DOS game I know of that includes them. These files still contain MIDI data, but the wave data is appended at the end. The MIDI data is an approximation of the sound effect for hardware that can't play digital sound.

So, is it possible that SCICompanion just ignores the wave data at the end?
Or is there some way to access it?

SCI Development Tools / SQ3: missing defines in decompilation?
« on: July 21, 2020, 08:56:04 AM »
Well, another SQ3 question :-)

When I decompile it with latest SCICompanion, there are compilation errors in - it uses unrecognized constants:
Code: [Select]
Error: ( Undeclared identifier 'dsWIDTH' .  Line: 98, col: 6
Error: ( Undeclared identifier 'dsCOORD' .  Line: 100, col: 6
and more errors follow.

With Phil's version, it just uses numerical values.

Code: [Select]
                        {^D 1989 Sierra On-Line, Inc.}

instead of:
Code: [Select]
{\04 1989 Sierra On-Line, Inc.}

Of course, I prefer Kawa's version...
But what is missing?
'grep' didn't help me find where these are defined.

SCI Development Tools / Strings: {} vs "", and underscores
« on: July 20, 2020, 11:21:50 AM »
In SCICompanion, is there any difference between {} and "" as strings delimiter?
Will they be compiled to the same thing?

What do underscores mean?
For example, after dying, the possibilities are:
Code: [Select]
{Restore}, {Restart} and {____Quit____}


2 related questions:

What tools exist for translating games, from early SCI, such as SQ3?
I've seen, but it's for later games.
Are there any more relevant tools?

I've built Python scripts to extract all information from the 'text' files to a CSV, and build 'text' files from the CSVs.
I've also built Python scripts to extract all words from the vocabulary to a CSV, and build back the vocab.
Now my problem is the strings inside the scripts files.
I've built Python script that extracts all text strings from the (decompiled) scripts files to a CSV file.
However, building back (compiled) scripts files from the CSV file is more problematic:

- My first thought was to go over the binary script file (patch extracted from SCICompanion), analyze it, replace the strings in the strings area, and then fix the offsets.
But then I realized that there is also information after the strings area, and therefore I will need to fix its offsets as well.
Sounds cumbersome...

- My second thought was to try to replace all string code hard-coded in the scripts file, to something that will tell it to use strings from texts files, and add the relevant strings to the texts files.
Is it feasible, or am I missing something here?

- My next thought was that probably someone has done part of this job already, so I came to ask here...
I've been told that there are quite old SCI fan-made translations (such as to Polish), that were made by non-programmers, so there's probably some nice tool that they used. But I haven't found any such as nice tool.



I'd like to check something in Sierra's original adl.drv (for qfg1 ega, if that matters)
Is there source code of it, or of any other Sierra's drivers? I haven't found in
Or maybe someone has good disassemblies?

And anyway, how can I disassemble it myself?
(I have never done reverse engineering, but I'm a quick learner ;-) )
I've downloaded Ghidra. Is it a good tool for this?
Just opened the driver in Ghidra, selected the language as "x86/Real Mode/16 bit/LE" (is it??), and it doesn't look very nice  :-\
Does it need some more information/configuration?

SCI Development Tools / Extending font files
« on: May 06, 2020, 10:44:37 AM »
Another SQ3-translation-to-Hebrew-project question:
The original SQ3 fonts are 128 letters.
For Hebrew, we need 255 letters.

If we take a font from another game, and just plug it in, it works well, so it shouldn't be interpreters issue here...
(that what we've done so far, but the English letters look too different, of course)

The question is - is there a way to extend an existing font with some of the tools?
Couldn't find in SCICompanion and SCIStudio.

Again, I can take the information from and do that myself, but, why waste resources if it has already been done?

SCI Development Tools / Extract all `said` strings from scripts
« on: May 06, 2020, 06:20:03 AM »
It's related to my previous post, but it's actually a different topic - what I really need now is to extract all `said` strings.
That can be accomplished with SCICompanion's 'Find in Files' feature, but it leaves work to do.
For example, there are cases like:
Code: [Select]
which aren't found.

And anyway, the find in files give results like:
Code: [Select] ((Said 'pump,backstage/shark,pass') (proc255_0 0 3) (= global200 1))While all I'm intereseted at is
Code: [Select]
I can solve this, but again, I don't want to re-invent the wheel, if someone has already solved it...


Is there a tool to extract all SCI scripts as regular text files? (for example, to `grep` something in all of them)
I know I can open each script in SCICompanion, select all, copy, and paste in a new file.
But isn't there something that can do it once for all?

There is Tools -> Extract all resources, but it extract the scripts as binary patch files.

I've explained my motivation in other post, with the specific use case that I need now.
However, I needed it also in the past, and was too lazy to ask ;-)
I think that it's useful, even if my specific use case now can be solved otherwise.


What tools can be used to edit SCI games, besides SCICompanion and SCIStudio?

I'm trying to change `vocab.000` of SQ3 to support Hebrew, but both tools refuse to save it with the Hebrew inside.
(but it *is* possible to change messages texts to Hebrew)

(Maybe it's impossible by design of SCI??  :'( )

I've seen that `global91` is used to display Torin Passage's messages. It's all over the game.
However, I can't find its definition in SCICompanion - both in the original version, and in Kawa's fork (is correct?).
All I found is in,
Code: [Select]

But where is the actual code?

SCI Syntax Help / `DoSound sndSTOP` stops another sound resource?!
« on: April 13, 2020, 11:31:03 AM »
Hi there to all SCI experts.

I've found something strange with SQ4, while investigating a bug report on ScummVM, and would really like your advice.
It seems to me like some bug in original Sierra SCI interpreter, but I'd like to hear more opinions regarding the situation...

The short story:
Open SQ4 in SCICompanion, and make the following changes to script #1:

Add at the beginning:
Code: [Select]
(use Sound)

Change in `changeState`, state 0 to be:
Code: [Select]
;Z (gLongSong loop: -1 playBed:)
(myPukeSound play:)
(gLongSong number: 886 loop: 1 play:)
(DoSound sndSTOP myPukeSound)     ;why does it stop?
;Z end
(= cycles 1)

Add at the end of the file:

Code: [Select]
(instance myPukeSound of Sound
number 162   ; try to change me to 9

Now, no sound will play at all, because of the `(DoSound sndSTOP myPukeSound)`.
(you can comment it and listen that it does play)
It doesn't make sense to me.

Furthermore, if we change `myPukeSound ` to use other sound resource, such as 9, then the `sndSTOP ` doesn't stop the music.

Is there any logic to this behaviour?
Or is it indeed some kind of a bug in the original SCI interperter?

The long story:
I've got to this while investigating, and suggested a fix to one of the issues at
You can read there all the details.


I'm trying to see the GK1CD starting theme.
It's activated at - script #375, with this code:

Code: [Select]
((proc13_0 470) 370)
(else 370)
setLoop: -1
setVol: (gGkMusic1 musicVolume?)

In SCICompanion, under "Sounds" tab, #370 seems to be correct. However, Sound #5 is irrelevant - some short sound effect.
When run with ScummVM debugger, I see that it's indeed playing #5, which is digital, audio #5.

Returning to SCICompanion, under "Audio" tab, there is no #5 !

So, two questions:
1. By reading the code I've pasted above, from - is there a way to know that #5 is referring to audio and not to sound?
2. Where is this digitized opening theme audio #5 hiding? How can I see it in SCICompanion?


Pages: 1 2 3 [4]

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

Page created in 0.06 seconds with 17 queries.