Author Topic: SCI error codes  (Read 10572 times)

0 Members and 1 Guest are viewing this topic.

Offline troflip

SCI error codes
« on: May 23, 2015, 03:04:43 PM »
Does anyone know what the various SCI error codes map to (when the interpreter crashes)? I know there are ones for invalid object, and invalid selector (4 and 5 I think?).

While whittling down the SQ5 code into a template game, I've run into a crash for error code 11, after dialogs have been up for about 4 or 5 seconds. It would greatly help to know what I'm looking for. Unfortunately (?) ScummVM plays the game no problem.


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

Offline lskovlun

Re: SCI error codes
« Reply #1 on: May 23, 2015, 03:14:48 PM »
Does anyone know what the various SCI error codes map to (when the interpreter crashes)? I know there are ones for invalid object, and invalid selector (4 and 5 I think?).

While whittling down the SQ5 code into a template game, I've run into a crash for error code 11, after dialogs have been up for about 4 or 5 seconds. It would greatly help to know what I'm looking for. Unfortunately (?) ScummVM plays the game no problem.
I've been wondering about that one as well. The interpreters with intact debug information hint that it has something to do with dongles (copy protection for beta versions?).
In any case, this is connected to global variable number 101... my guess is that you've been pruning the global variables so that that variable doesn't exist anymore/doesn't have the value it used to (1234 decimal).

Offline troflip

Re: SCI error codes
« Reply #2 on: May 23, 2015, 03:27:35 PM »
OMG, you saved the day Lars. There is no way I would have figured that out! That was exactly the problem.

Ugh... I wonder what other pitfalls I'm going to encounter like that.... I guess I should be very careful removing any "unused" globals, especially those that have values assigned to them.

How did you figure this out?
Check out my website: http://icefallgames.com
Groundhog Day Competition

Offline lskovlun

Re: SCI error codes
« Reply #3 on: May 23, 2015, 04:29:50 PM »
How did you figure this out?
As I wrote, there are interpreters out there with intact symbol tables... the dongle stuff rather jumps at you, especially given the fact that the public releases are not physically copy-protected.  So I've known about this for a long time... and it was simple to look it up and verify my hypothesis given the error code 11.

Offline Collector

Re: SCI error codes
« Reply #4 on: May 23, 2015, 04:35:28 PM »
Seems like it would be good for use to have a list of the error codes, at least the ones that are known. That could be useful in tracking down unpatched bugs in the official games, too.
KQII Remake Pic

Offline lance.ewing

Re: SCI error codes
« Reply #5 on: May 23, 2015, 04:56:55 PM »
How did you figure this out?
As I wrote, there are interpreters out there with intact symbol tables... the dongle stuff rather jumps at you, especially given the fact that the public releases are not physically copy-protected.  So I've known about this for a long time... and it was simple to look it up and verify my hypothesis given the error code 11.

What games have interpreters with intact symbol tables (says he, getting out his strings tool to grep over the interpreters he's currently got on his PC)? That sounds very useful. And has anyone put such an interpreter through a C decompiler of some sort? I realise that C is a completely different beast from SCI, so decompiling is very, very difficult. Maybe someone has done it by hand though? I remember decompiling some C code by hand about 17 years ago. Luckily it was only 5 functions.

Offline troflip

Re: SCI error codes
« Reply #6 on: May 23, 2015, 05:00:38 PM »
Yeah, it would be useful to have some interpreters with symbols. Are you using some kind of DOS debugger to look at these (it looks like you can build a DOSBox with debugging capability?), or just looking at them in a hex editor?
Check out my website: http://icefallgames.com
Groundhog Day Competition

Offline Collector

Re: SCI error codes
« Reply #7 on: May 23, 2015, 05:31:30 PM »
Here is a Windows debug build of DOSBox if anyone wants it.

http://sierrahelp.com/dl.php?file=Temp/dosbox-debug.zip

I can also upload a zip of all of the SCI interpreters (North American) if that would help.
KQII Remake Pic

Offline lance.ewing

Re: SCI error codes
« Reply #8 on: May 23, 2015, 05:36:54 PM »
Yeah, it would be useful to have some interpreters with symbols. Are you using some kind of DOS debugger to look at these (it looks like you can build a DOSBox with debugging capability?), or just looking at them in a hex editor?

Not sure if that was a question for me or Lars, but personally I have used a debug version of DOSBox for debugging DOS tools before. I haven't done it with the SCI interpreter though. What I was about to do (to see if I've got any interpreters with symbol tables in them) is to run all of those interpreters through UNLZEXE (since a lot of them are compressed) and then use a Linux tool called strings to give me a first look at what text is it them. That's what I usually do to look for clues. I just haven't noticed one with C compiler debug info in it before. The strings tool isn't perfect tough. It doesn't show you some of the shorter strings, so you have to get in there with a hex editor to see the structure of what is actually in there.

Hmmm, thinking about it, if its been compressed with LZEXE then it's unlikely to have the symbol tables in it (since that is presumably one of the first things it could throw away, if it was smart enough to recognise such sections). We're probably looking for an EXE that isn't compressed with LZEXE, so maybe a later game where they weren't so worried about disk space.

Offline lance.ewing

Re: SCI error codes
« Reply #9 on: May 23, 2015, 05:46:31 PM »
Here is a Windows debug build of DOSBox if anyone wants it.

http://sierrahelp.com/dl.php?file=Temp/dosbox-debug.zip

I can also upload a zip of all of the SCI interpreters (North American) if that would help.

Are you saying that this would be a ZIP of every SCI interpreter version (North American), from every game (including different versions of games)? That would be great. If an interpreter exists with the C debugging info retained, then we're bound to find it in such a collection.

On a related note, does anyone know why the later SCI games have line number debug information in them? Not only the line number debug info but also the original name of the source file. It seems quite strange. Why would they need to include this in the compiled files, unless they made use of this in the SCI interpreter debugger, or in some sort of crash report.

Of all the SCI interpreters that we have access to, which is the newest one that still has a byte code debugger in it? i.e. the one that steps through the code? I read somewhere that some of the demos for later games had the debugger still in them, such as the Gabriel Knight 2 demo. Is that the most recent one?

Offline Collector

Re: SCI error codes
« Reply #10 on: May 23, 2015, 06:08:33 PM »
The ZIP may not include all known NA version releases, but it would cover all SCI games and most of the demos and a few multiple versions.
KQII Remake Pic

Offline lance.ewing

Re: SCI error codes
« Reply #11 on: May 23, 2015, 08:03:48 PM »
I found one of my first try. I thought I'd go for one of the later ones, so tried Gabriel Knight 2. It clearly has the symbol tables in there:

It mentions source file names:

Code: [Select]
..\array.cpp
..\asm2cpp.cpp
..\audio.cpp
..\blob.cpp
..\celobj.cpp
..\config.cpp
..\cursord.cpp
..\dialog.cpp
..\drawlist.cpp
..\eventd.cpp
..\except.cpp
..\font.cpp
..\graph.cpp
..\graphmd.cpp
..\graphmgr.cpp
..\intrpt.cpp
I:\SYS\SCI\GK2\hotkey.cpp
..\language.cpp
..\list.cpp
..\memmgr.cpp
..\message.cpp
..\motion.cpp
..\moused.cpp
..\movie.cpp
..\palette.cpp
..\palmgrd.cpp
..\palmgri.cpp
..\plane.cpp
..\playvmd.cpp
..\plist.cpp
..\polygon.cpp
..\rectlist.cpp
..\remap.cpp
..\resource.cpp
..\restype.cpp
..\robot.cpp
..\savegame.cpp
..\sci.cpp
..\scid.cpp
..\screen.cpp
..\script.cpp
..\shwstyle.cpp
..\si.cpp
..\silist.cpp
..\soundd.cpp
..\table.cpp
..\vmdbase.cpp
..\vmd.cpp
..\vmdview.cpp
..\window.cpp

and a whole bunch of symbols, such as these (just to list a few):

Code: [Select]
LNew
LDispose
LNewNode
LFirstNode
LLastNode
LEmpty
LNextNode
LPrevNode
LNodeValue
LAddAfter
LAddToFront
LAddToEnd
LAddBefore
LMoveToFront
LMoveToEnd
LFindKey
LDeleteKey
LIndexOf
LEachElementDo
LFirstTrue
LAllTrue
LSort
Load
Unload
ScriptID
DisposeScript
Lock
ResCheck
Purge
SetLanguage

It's the same with Police Quest SWAT, QFG4, LSL6, and Space Quest 6. There doesn't seem to be as many symbols as I would have expected though.

Offline lskovlun

Re: SCI error codes
« Reply #12 on: May 23, 2015, 08:14:18 PM »
It's the same with Police Quest SWAT, QFG4, LSL6, and Space Quest 6. There doesn't seem to be as many symbols as I would have expected though.
That's because they aren't symbol tables, but rather just instances of the file names being used in error messages. See here, for instance:
http://www.vogons.org/viewtopic.php?p=95455
No, the interpreters I'm talking about are SCI1.1; try LSL6, for one. I am not aware of any SCI32 interpreters for PC being released with symbol tables. There were some for other platforms, though.

Offline lance.ewing

Re: SCI error codes
« Reply #13 on: May 24, 2015, 04:20:51 AM »
Aha! Yes, I can see that in LSL6 (VGA version). I was initially looking in the LSL6 SCI32 version, but after downloading the VGA version, I can clearly see strings in there that appear to be symbols, e.g.:

Code: [Select]
_RMoveu
_SetCursorData=
_GetCursorData
_RMoveTo
_GetPointSize*
_CharHeight
_GetShortXY$
_SetControl
        _SetColor
        _SaveBits
        _SizeRect
_pcSeg
_SetMaps[
        _GetAbsXY
_DoCel
        _DoBitMapu
_RHideCursor
_ExpandI
_ColorFade
_PaletteCheck
_ClearPagedScreens
_DoAbsFills
_DoMedLine
_DoShortBrush
_OldSetPaletteu
_SetCLUTPalette6
_ClearPriority
_PaletteShell
_KGraph1


Offline Collector

Re: SCI error codes
« Reply #14 on: June 01, 2015, 12:08:23 AM »
Not sure if anyone still wants this or not, but here are (nearly) all of the SCI interpreters I have. There are probably a few newer acquisitions that I missed adding. They are sorted by game, version and interpreter version. No game data, so there is probably no problem with publicly posting this.

http://sci.sierrahelp.com/DL/SCIInterpreters.7z
KQII Remake Pic


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

Page created in 0.085 seconds with 22 queries.