Author Topic: Possible new version of SCI Companion  (Read 183333 times)

0 Members and 4 Guests are viewing this topic.

Offline troflip

Re: Possible new version of SCI Companion
« Reply #90 on: April 25, 2015, 02:11:06 AM »
And the colour cycling animation would appear as it does in-game. It would be useful if this preview feature were also in SCI Companion. Also, I had another thought. It'd be easier than entering exact numbers if we could select a series of ...

Lots of good ideas, but most of these are out of scope for the moment.

I agree that easily getting the palette index is important though.

And I already support selecting ranges of palette colors in order to mark them as "used" or not. So at least that part of your cycling feature is done :P


I think I mentioned before that I took a stab at a "visual editor" kind of like you described, but it was too much work. There's no way SCI will ever have the kind of editor support that AGS does. And so I doubt it will ever be quite as easy to use. (I've only used AGS a bit, and it was a long time ago, so I forget what features the editor had).
Check out my website: http://icefallgames.com
Groundhog Day Competition

Offline Collector

Re: Possible new version of SCI Companion
« Reply #91 on: April 25, 2015, 02:37:30 AM »
Wouldn't the move to Audio36 from AUD be to remove some of the limitations the the AUD resource had?
KQII Remake Pic

Offline MusicallyInspired

Re: Possible new version of SCI Companion
« Reply #92 on: April 25, 2015, 02:43:54 AM »
Understandable, troflip. :) Forgot that you mentioned that wasn't realistic.

I already mentioned AddWave, which is included in the SCI Sound Utilities, along with Gumby's ExtractWav. If it is not that big of a deal to include it in the IDE, that would be great, but I would give it a lower priority than other features since it was only used for a few games. This might be nice for creating patches for the official games, but for game creation using  SCI1.1 should not be that much different esthetically than SCI1 and would give the advantage of discrete digital sounds.

No, I know. I was just agreeing with you that we could simply use AddWave. However, I'd still like to be able to create an SCI1 game with all the features that SCI1 games are capable of, because AddWave only works with SCI0. But I'm crazy and I wouldn't just use SCI1.1 because it's better lol. A fully-featured package is what I'm hoping for eventually; the ability to create everything Sierra could with their respective versions of SCI (up to SCI1.1 at least). With the possible exception of SCI01, which had a couple of extra features over SCI0 like screen scrolling.

Quote
As far as how Sierra implemented pairing of MIDI/digital sfx, I only know how they handled it for SCI0 and early SCI1, which is obvious at this point. Never really delved into that aspect for later versions as we had no tools to make anything with them anyway. One area I was never curious about....now you've made me curious. I wonder if it's as simple as having a conditional block of code in the scripts calling for whether the game is running with digital sounds or not? I do know that some games do not have any MIDI equivalents of sound effects at all. There isn't a variation for SQ5's "Doh!", for instance. But there is for when the janitor closet contents spew onto the floor. Maybe it's just as simple as that? Not having equivalents if there are no sounds with the same number for both MIDI and digital?

I don't think that they did it for more than SCI0 and early SCI1. SQ5's interpreter has both a flag for soundDrv and audioDrv, so there would be little reason to embed digital samples in the sound resources. You had to have SB capable hardware to hear the samples, whether embedded or a discrete resource.

Yeah, that's what I said. lol I'm talking about corresponding numbered digital AUD resource files to MIDI SND resource files, like troflip mentioned.

Yes. Yes it is. :P What if we want to be like Sierra sometimes and make 4 different versions of our games (like Mixed Up Mother Goose)? EGA Parser SCI0, EGA parserless SCI1, VGA parserless SCI1, and VGA SCI1.1? Or we could just do it ourselves with AddWave.exe...

Well, it might be fairly trivial to add it. But I won't have that as a goal.

I'd really like to be able to add digital sounds to my SCI0 and SCI1 games...

Quote
I tried adding audio resources for some of the sounds in the opening of SQ5. The midi sounds for the corresponding resource numbers stopped playing, but my sound was also not played. So it looks like it's not quite as simple as that. Maybe the sound resource needs to be modified slightly too? I tried looking through the SCUMMVM code to see how they handle it, but it wasn't obvious. Or maybe the midi sound and the digital audio need to be exactly the same length?

That seems unlikely to me. A case of extra scripting would be my first guess. But I could very well be wrong.

Quote
I'm sure there is. The sounds in SQ5 are all 11025Hz. I tried using a 22050Hz one and that worked too. I think the main limit will be the total byte size of the audio though. Everything in SQ5 is under 64KB, which means the samples are only a few seconds long at most. LSL6 (which I think is a slightly later game than SQ5) has several sounds larger than that (and it also uses 16 bit audio instead of 8 bit).

Fascinating. I wonder if the interpreter can handle up to 44100? I imagine not. Most DOS games of that era were limited to 22050.

Quote
So for music, you may still need to use midi, or something like sciAudio.

Oh, no I wasn't asking for that reason. Just curious about the limitations. I'd never use sciAudio for music personally. MIDI is too much fun. :) Adlib ftw!
Brass Lantern Prop Competition

Offline troflip

Re: Possible new version of SCI Companion
« Reply #93 on: April 25, 2015, 03:25:03 AM »
That seems unlikely to me. A case of extra scripting would be my first guess. But I could very well be wrong.

Except that in the opening room (110) in SQ5, I hear both digital samples and midi sounds. And looking through the script, the code plays sounds 104, 106, 105, 107,109, 108, 110 and 4, all in exactly the same manner. All of those numbers correspond to midi .snd resources, but four of them also have .aud digital samples, and I believe I'm hearing those when playing the game. So I don't think any special scripting is required. It's like the interpreter just prefers the digital audio if it's available (and the hardware supported it).

Fascinating. I wonder if the interpreter can handle up to 44100? I imagine not. Most DOS games of that era were limited to 22050.

44100 seems to work fine, I just tried it. :P
It might have more to do with the audio drivers than the interpreter, I'm not sure.

Check out my website: http://icefallgames.com
Groundhog Day Competition

Offline MusicallyInspired

Re: Possible new version of SCI Companion
« Reply #94 on: April 25, 2015, 03:31:10 AM »
That seems unlikely to me. A case of extra scripting would be my first guess. But I could very well be wrong.

Except that in the opening room (110) in SQ5, I hear both digital samples and midi sounds. And looking through the script, the code plays sounds 104, 106, 105, 107,109, 108, 110 and 4, all in exactly the same manner. All of those numbers correspond to midi .snd resources, but four of them also have .aud digital samples, and I believe I'm hearing those when playing the game. So I don't think any special scripting is required. It's like the interpreter just prefers the digital audio if it's available (and the hardware supported it).

That would be the sensible way to do it. But you said you tried adding a digital alternative to a MIDI-only sound and it didn't work...? I played the opening to SQ5 when Roger is getting out of the bridge simulator. When the bridge simulator opens up it makes a "whooosh" sound. If you have AUD.DRV active in resource.cfg it plays the digital sound only, if you have AUDNONE.DRV active it plays a MIDI alternative instead as you'd expect. Is there some kind of flag? Maybe in the sound resource that tells whether or not there is an associated digital sound?

Quote
44100 seems to work fine, I just tried it. :P
It might have more to do with the audio drivers than the interpreter, I'm not sure.

Cool! Makes sense.
Brass Lantern Prop Competition

Offline lskovlun

Re: Possible new version of SCI Companion
« Reply #95 on: April 25, 2015, 09:31:37 AM »
Wouldn't the move to Audio36 from AUD be to remove some of the limitations the the AUD resource had?
No, the move to Audio36 provided a link between a text message and its associated sound. It's easier to manage when you can use the same identifier for both.
Ordinary audio resources were still used for sound effects that did not have a text message equivalent.

Offline troflip

Re: Possible new version of SCI Companion
« Reply #96 on: April 25, 2015, 11:42:31 AM »
Does anyone know at what point the interpreter started supporting cd audio? And how those resources were handled? (Certainly they were too big to put in the package files, so were they always just patch files, or were they access in some other manner?). I know some SCI1.1 games had CD-ROM versions, so I'm assuming they supported CD audio somehow?
Check out my website: http://icefallgames.com
Groundhog Day Competition

Offline lskovlun

Re: Possible new version of SCI Companion
« Reply #97 on: April 25, 2015, 12:06:23 PM »
Does anyone know at what point the interpreter started supporting cd audio? And how those resources were handled? (Certainly they were too big to put in the package files, so were they always just patch files, or were they access in some other manner?). I know some SCI1.1 games had CD-ROM versions, so I'm assuming they supported CD audio somehow?
There was support in Jones CD (1991), although the interface differs from that of later releases, according to ScummVM.
EDIT: There was a CDAUDIO.MAP file that contained offset/length pairs. Only one audio track was supported. Later versions allowed the scripts to specify track, offset and length explicitly.
« Last Edit: April 25, 2015, 12:14:31 PM by lskovlun »

Offline troflip

Re: Possible new version of SCI Companion
« Reply #98 on: April 25, 2015, 12:07:25 PM »
Hmm, maybe it doesn't matter. It looks like the size for aud resources is larger than I thought. I just dropped a 30 second 22kHZ clip into SQ5. It's size is 660KB, and it played just fine...  :D
Check out my website: http://icefallgames.com
Groundhog Day Competition

Offline lance.ewing

Re: Possible new version of SCI Companion
« Reply #99 on: April 25, 2015, 12:23:31 PM »
Here is some sample output from the decompiler, for a few of the rooms/scripts in Space Quest 5.

These are amazing. Awesome work. I'm guessing once you've worked out the flow control, you could generate the source in any format? e.g. original SCI vs. SCIStudio vs. Java-ish vs. <other language here>, etc.? - There's a lot of switch statements in there, isn't there? It seems like a lot of the scripts were based around that and state changes.

I notice some of the kernels are incorrect. For instance, room 110 (the opening room) transitions palettes, and it ends up being identified as Joystick kernel call.  I know various kernel functions moved/changed between SCI versions, but looking at the SCUMMVM source code, there was never any palette-related kernels that were in the Joystick slot (0x6d), so it's a bit strange.
Anyway, I'll need to provide some kind of config file to allow for differences in kernel functions in different versions.

I had wondered whether the Kernel procedure slots stayed constant or not. I realise new ones would have been added over time. I read somewhere (maybe the specs?) that a slot once allocated was fairly static, but apparently that VOCAB.999 was notoriously unreliable as a match for the game it is in. I guess that makes some sense. It's probably a file that doesn't get generated by compilation. VOCAB.997 and VOCAB.996 would be a direct output of the compilation process, since they apply to the game itself, but VOCAB.999 is related to the interpreter and would have been provided by the interpreter developers. It is possible, and maybe even probable, that it wasn't updated as often and got out of sync sometimes, particularly I'm guessing when the same game is released on a newer interpreter version.

This is a lot more powerful that Brian's decompiler was going to be, since it does control flow analysis and attempts to recover higher level constructs like if/else, compound conditions, loops and switch statements. There are still some flow control structures I can't identify though, so I'll have to leave those odd functions as assembly.

I'm curious to see some examples of assembly code that you haven't yet been able to identify. Maybe we could start a separate thread related to decompilation to discuss such examples. I'll have to grab my SQ5, if that is where you've been focussing.

Offline Collector

Re: Possible new version of SCI Companion
« Reply #100 on: April 25, 2015, 01:17:13 PM »
No, the move to Audio36 provided a link between a text message and its associated sound. It's easier to manage when you can use the same identifier for both.
Ordinary audio resources were still used for sound effects that did not have a text message equivalent.

Thanks for the info. I have been wondering about the difference for some time. That would make sense given the naming convention of the Audio32 resources.

Most of the SCI1.1 CD games just used standard audio resources, either AUD or Audio36. lskovlun is probably right about Jones. I have heard rumors of a CD audio version of Mixed-up Mother Goose CD using CD-A tracks, but my copy does not have it. Mine is the red label. There was a blue label, but that that was just the international version and I don't think it had CD-A either.
KQII Remake Pic

Offline MusicallyInspired

Re: Possible new version of SCI Companion
« Reply #101 on: April 25, 2015, 02:05:23 PM »
The only other SCI game I can think of that used CD Audio other than Jones was KQ6. And even that I think only the Windows version actually called it. The DOS version had a lo-fi audio equivalent in the resources. It certainly didn't sound like CD quality audio, anyway.
Brass Lantern Prop Competition

Offline lskovlun

Re: Possible new version of SCI Companion
« Reply #102 on: April 25, 2015, 02:05:59 PM »
I've written a little javascript tool that decomposes an audio36 resource name into its parts.
The results can be used with SCI Viewer (open the message file corresponding to "module"; the other fields correspond to the columns in the SCI Viewer display).
I can implement a tool that does the opposite if there is demand.

http://sprogklog.dk/sci/audio36.html

Offline MusicallyInspired

Re: Possible new version of SCI Companion
« Reply #103 on: April 25, 2015, 02:11:16 PM »
Nice!
Brass Lantern Prop Competition

Offline Collector

Re: Possible new version of SCI Companion
« Reply #104 on: April 25, 2015, 02:14:44 PM »
I can implement a tool that does the opposite if there is demand.

That would be great.
KQII Remake Pic


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

Page created in 0.032 seconds with 16 queries.