Author Topic: Brian's SCI1 Script Compiler  (Read 13489 times)

0 Members and 1 Guest are viewing this topic.

Offline MusicallyInspired

Re: Brian's SCI1 Script Compiler
« Reply #15 on: December 19, 2015, 01:00:23 PM »
I know they're different formats, but have you tried anything with SCI0 or SCI01 VOCAB resources? Wouldn't it make sense that none of those would work from KQ5 because the parser was straight up removed?
« Last Edit: December 19, 2015, 03:37:27 PM by MusicallyInspired »
Brass Lantern Prop Competition

Offline troflip

Re: Brian's SCI1 Script Compiler
« Reply #16 on: December 19, 2015, 01:34:32 PM »
I was prioritizing those with the closest interpreter numbers, and those that contain resource 911 and 912 instead of 900,901. Unfortunately there are very few of those. I'm not sure when the renumbering happened, but it seems to be right when they removed the parser!

I believe in this case (when you input a non-recognized word), it's trying to load the suffix dictionary to see if it can resolve it that way (and failing). I suppose it's possible that the 1990 Christmas Card Demo just has a broken parser, since it wasn't used.
« Last Edit: December 19, 2015, 01:36:36 PM by troflip »
Check out my website: http://icefallgames.com
Groundhog Day Competition

Offline Kawa

Re: Brian's SCI1 Script Compiler
« Reply #17 on: December 19, 2015, 02:02:04 PM »
I suppose it's possible that the 1990 Christmas Card Demo just has a broken parser, since it wasn't used.
That doesn't sound too unlikely.

Offline troflip

Re: Brian's SCI1 Script Compiler
« Reply #18 on: December 19, 2015, 02:27:25 PM »
Looking at ScummVM, it either tries to get 0/900/901, or 900/901/902  (for main/branches/suffixes). It never does 911 or 912, which is what the CCD appears to be expecting.

So it would be safe to assume that none of the released games with 911 or 912 vocab resources actually use them.
Check out my website: http://icefallgames.com
Groundhog Day Competition

Offline troflip

Re: Brian's SCI1 Script Compiler
« Reply #19 on: December 19, 2015, 02:40:44 PM »
I just noticed that the syntaxFail and semanticFail methods are never called from game code. So they must be called directly by the kernel. Which means it could be making erroneous assumptions about which selectors they correspond to.
Check out my website: http://icefallgames.com
Groundhog Day Competition

Offline lskovlun

Re: Brian's SCI1 Script Compiler
« Reply #20 on: December 19, 2015, 02:59:26 PM »
I just noticed that the syntaxFail and semanticFail methods are never called from game code. So they must be called directly by the kernel. Which means it could be making erroneous assumptions about which selectors they correspond to.
This is true. The reason for the numbering change-over, btw, is the introduction of support for multiple languages in SCI01. The way it works is that the interpreter chooses between 900/901/902 or 910/911/912 based on the value of the parseLang and printLang properties of the game object. Having two sets of files allowed you to switch languages on the fly. The formats should be identical, but changed from SCI0 to SCI01 (Companion does support loading them; but are you saving them properly?).

The language codes follow the international telephone codes, so in general both selectors should have a value of 1=English.

EDIT: And of course, these selector numbers are hardcoded into the interpreter (it doesn't use VOCAB.994 here).
« Last Edit: December 19, 2015, 03:05:37 PM by lskovlun »

Offline troflip

Re: Brian's SCI1 Script Compiler
« Reply #21 on: December 19, 2015, 03:30:11 PM »
Companion doesn't support editing the 901/902 resources, and I haven't changed the 900 resource (and I know that works anyway), so Companion saving them properly isn't an issue.

I don't understand what you mean by "both selectors should have a value of 1=English. "

The selectors for syntaxFail and semanticFail are 72 and 73. Not sure how that relates to 1=English.

Or you're talking about the printLang and parseLang? Those are 87 and 86, respectively.

Oh, you're saying the values should be 1 (they are), but possibly the printLang and parseLang are being looked up incorrectly because the interpreter uses hard-coded values.

So given the interpreter uses hard-coded values for printLang, parseLang, syntaxFail and semanticFail, there are two potential failure points: getting the language properly, and invoking syntaxFail/semanticFail properly.

I suspect the former is not a problem, because things work fine when entering words that don't cause syntax fails.
« Last Edit: December 19, 2015, 03:34:41 PM by troflip »
Check out my website: http://icefallgames.com
Groundhog Day Competition

Offline Collector

Re: Brian's SCI1 Script Compiler
« Reply #22 on: December 19, 2015, 05:15:50 PM »
The language codes follow the international telephone codes, so in general both selectors should have a value of 1=English.
Is this consistent across all interpreter version? I have been wondering about the values for the language flag in the RESOURCE.CFG.
KQII Remake Pic

Offline lskovlun

Re: Brian's SCI1 Script Compiler
« Reply #23 on: December 19, 2015, 06:29:58 PM »
The language codes follow the international telephone codes, so in general both selectors should have a value of 1=English.
Is this consistent across all interpreter version? I have been wondering about the values for the language flag in the RESOURCE.CFG.
Yeah, I forgot to mention that. Sierra adheres to this principle strictly. The value is used in StrSplit and similar functions (mapping #S, #J, #P and so on to the corresponding numbers). Some interpreters (but apparently not the CC1990 one) take the language= value and put it in the appropriate property on startup (I can't remember whether these interpreters modify both properties or only one of them).

Offline Collector

Re: Brian's SCI1 Script Compiler
« Reply #24 on: December 19, 2015, 07:47:07 PM »
Thanks, it never occurred to me to cross compare the few I knew from the RESOURCE.CFG to the telephone codes. I have been wanting to compile a list for a reference for my installers and patches and such, but only had a few non-English RESOURCE.CFGs to check. It would be nice to have enough info on how the interpreter used this to create documentation or even a tutorial so that fan developers could do multi-language games with Companion.
KQII Remake Pic

Offline lskovlun

Re: Brian's SCI1 Script Compiler
« Reply #25 on: December 23, 2015, 12:04:53 AM »
Looking at ScummVM, it either tries to get 0/900/901, or 900/901/902  (for main/branches/suffixes). It never does 911 or 912, which is what the CCD appears to be expecting.
Also, ScummVM does access 910/911/912:
Code: [Select]
        if (_foreign) {
                _resourceIdWords += 10;
                _resourceIdSuffixes += 10;
                _resourceIdBranches += 10;
        }

Offline troflip

Re: Brian's SCI1 Script Compiler
« Reply #26 on: December 24, 2015, 12:29:24 AM »
Thanks, that would have been a tough thing to search for!
Check out my website: http://icefallgames.com
Groundhog Day Competition


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

Page created in 0.06 seconds with 24 queries.