Community

SCI Programming => SCI Development Tools => Topic started by: OmerMor on January 11, 2019, 06:17:32 AM

Title: SCI32 Source Code
Post by: OmerMor on January 11, 2019, 06:17:32 AM
https://github.com/OmerMor/SCI32 (https://github.com/OmerMor/SCI32)

This repository contains snapshots of the SCI interpreter and system scripts between 11/1994 - 10/1995, and you can learn about the evolution of the SCI in this era.
You can see the these snapshots in git's commit history: https://github.com/OmerMor/SCI32/commits/master (https://github.com/OmerMor/SCI32/commits/master)
Title: Re: SCI32 Source Code
Post by: Daventry on January 11, 2019, 07:18:44 AM
Thanks so much. Have you sci0, approximately 88-90 years?
Title: Re: SCI32 Source Code
Post by: MusicallyInspired on January 11, 2019, 09:10:57 AM
Awesome!! God bless you and your connections!
Title: Re: SCI32 Source Code
Post by: EricOakford on January 11, 2019, 12:17:45 PM
Maybe now we can get to work on improving SCI32 support in Companion. I could maybe work on putting together a decompile of the SQ6 demo, and using that as the basis for the SCI32 template game. We now have original procedure and global names!
Title: Re: SCI32 Source Code
Post by: Kawa on January 11, 2019, 01:22:45 PM
WOOHOO!
Title: Re: SCI32 Source Code
Post by: Collector on January 11, 2019, 02:55:22 PM
Thank you Omer!
Title: Re: SCI32 Source Code
Post by: Kawa on January 11, 2019, 03:59:15 PM
I tried to compile it. After a bunch of work regarding missing implied int and some scope shenanigans, I got up to the point where it can complain about sound drivers in 640x480, then crashes.
Title: Re: SCI32 Source Code
Post by: Collector on January 11, 2019, 04:39:15 PM
I have not yet looked through this. What version is this interpreter?
Title: Re: SCI32 Source Code
Post by: Kawa on January 11, 2019, 05:30:16 PM
INFO.CPP says 2.100.002.
Title: Re: SCI32 Source Code
Post by: EricOakford on January 11, 2019, 08:44:23 PM
Okay, here is my decompile of the SQ6 demo. The system scripts have been identified (namely, those in the 64xxx range), as have the system globals (namely, the first 100).

The scripts compile without error, but the game will refuse to run, giving "Error 42: This game has not been version-stamped".
Title: Re: SCI32 Source Code
Post by: Collector on January 11, 2019, 09:29:23 PM
INFO.CPP says 2.100.002.

So we are talking about KQ7/SQ6 era.
Title: Re: SCI32 Source Code
Post by: lskovlun on January 11, 2019, 10:26:10 PM
Meanwhile, I've been working on a savegame dumper for SCI32 games (where that is actually possible, unlike earlier SCI generations). It uses ScummVM to get data on class layouts and such (and for the compression code). I've already used it to investigate one bug in KQ7.

EDIT: Sierra SCI savegames, of course.
Title: Re: SCI32 Source Code
Post by: Collector on January 12, 2019, 12:22:27 AM
What bug?
Title: Re: SCI32 Source Code
Post by: lskovlun on January 12, 2019, 02:19:28 AM
Some KQ7 rooms set up global state and may not reset that state properly if you teleport out (using the debugger). This causes a crash down the road (so far down the road, in fact, that you wouldn't make the connection between the two events). It only happens if you edit variable 13 directly, not when a script calls the newRoom: method. This, of course, means that the KQ7 debug script works, since it does it the proper way. But that is not so easy to do by hand.
Title: Re: SCI32 Source Code
Post by: Kawa on January 12, 2019, 06:16:04 AM
The latest version of Watcom I could find that would compile the interpreter without needing anything like adding missing int type specifiers and had the required compiler and linker, 11b, gave me the same result as yesterday's attempt with OpenWatcom: it switches to high-res, throws up a message about the sound driver if you set that up wrong, then crashes. I had to remove the univbe and spmode library inclusions to finish the make, and I guess one of those might be related to the crash?

https://winworldpc.com/product/watcom-c-c/110b

(7 didn't have the right programs, 10 choked on memory.cpp, and OpenWatcom is too strict.)
Title: Re: SCI32 Source Code
Post by: Kawa on January 12, 2019, 09:44:54 AM
I'm not sure what I did but it no longer crashes. On the flipside, it doesn't seem to take resource volumes?
Title: Re: SCI32 Source Code
Post by: OmerMor on January 12, 2019, 04:17:23 PM
Thanks so much. Have you sci0, approximately 88-90 years?

Unfortunately - not.  :(
Title: Re: SCI32 Source Code
Post by: EricOakford on January 15, 2019, 11:08:45 PM
Here are the SCI32 header files adapted for SCICompanion. Yes, we should add support for non-integer and complex defines, since Sierra used them. For that matter, we have information on the SCI32 kernel functions.