Community
General and Everything Else => The Games and other Sierra Adventure stuff => Topic started by: Cloudee1 on May 21, 2015, 09:03:12 PM
-
First type in "backstage pass" or "pump shark" and hit enter, then type in "qa"... this only works in room 2. Following the intro.
Typing "tp" after typing in backstage pass will let you teleport anytime however.
-
:O I have a feeling we're going to discover many more secrets nobody ever knew about when all these games get decompiled.
-
There is also this bit and several case statements just like it...
(case 4
(if (not global200)
return
)
(switch ((send pEvent:message))
(case 9728
(if (== printLang 1)
= printLang 49
= subtitleLang 1
)(else
= printLang 1
= subtitleLang 49
)
)
global200 is set to True when Backstage pass is typed in. The case 4 is reflective of the type of event. I am not sure what 4 represents. I had assumed that it was a keyboard event and the values that it checked for, in this case 9728 was the word entry. But that doesn't seem to be right. Event type 128 seems to be keyboard input, so I am actually at a loss as to what 4 is. Type 1 appears to be a mouse event so what does that leave? Joystick....
-
Would referencing a shm file with pEvent values from the SCI0 template help in this regard?
-
4 is evKEYBOARD (my decompiler should recognize this, assuming it's switching on pEvent:type... not sure if I decompiled SQ3 before that, or I have a bug or something). This is in sci.sh.
9728 is hex $2600, which is probably some key value. There is nothing listed in keys.sh for it. Scumm might have something listed for it, I'll check...
-
First type in "backstage pass" or "pump shark" and hit enter, then type in "qa"... this only works in room 2. Following the intro.
Typing "tp" after typing in backstage pass will let you teleport anytime however.
Apparently, this is already known (http://wiki.scummvm.org/index.php/SCI/Debug_Modes#Game_Specific:_Space_Quest_3).
-
Yeah, I was going say that that was ringing some bells. Maybe we could compare what we're finding now for each game against what has been previously documented and see if we can add anything. The Feature Writer functionality might be something that hasn't been covered much previously, particularly the evolution of the tool over time.
-
The ScummVM entry is missing the "pump shark" magic phrase.
-
9728 is hex $2600, which is probably some key value. There is nothing listed in keys.sh for it. Scumm might have something listed for it, I'll check...
9728 is ALT-L.
-
Wow, so apparently we are doing something terribly wrong with our memory. On my best day in a room with almost nothing in it the best I have seen is around 20000 free heap. Looking at the free heap in SQ3, they are averaging available space of over 30000...
The ScummVM entry is missing the "pump shark" magic phrase.
Also just for the record, "pump pass" or "backstage shark" will trigger it as well.
(if (Said('pump,backstage/shark,pass')
-
Hmm, in the first few rooms of SQ3, it's showing me under 10000 bytes of free heap...
-
Wow, so apparently we are doing something terribly wrong with our memory. On my best day in a room with almost nothing in it the best I have seen is around 20000 free heap. Looking at the free heap in SQ3, they are averaging available space of over 30000...
You aren't by any chance testing this in ScummVM ,are you? The memory management is very different in ScummVM versus Sierra SCI, which would account for the difference between your results and Phil's.
-
And there it is. Yes, I was running it in scummvm when I had hit the alt-h key combo to view the free heap.
The screen on the left is from Dosbox and on the right scummvm.
-
Does anyone know how the heap worked in SCI1.1 and the other SCI versions where the heap part of the scripts was a separate resource? I assume there must have been a purpose to separating script from heap, and so (to me) that means that scripts and heap objects must share overlapping 16-bit address spaces (e.g. you could have object data at $1234, but also a procedure at $1234). So that means 64K for loaded scripts, and 64K for data?
[edit:] Hmm, although my SCI1.1 template game only shows 26000 bytes of free heap at the beginning. Not very much...
-
Does anyone know how the heap worked in SCI1.1 and the other SCI versions where the heap part of the scripts was a separate resource?
Heap resource goes on the heap, script resource goes in the hunk. This means in principle a script file can be up to 64K; the heap resource must satisfy the same constraints as before. The purpose is simple, to save some heap memory! The heap lives in the data segment of the interpreter program, which is why the total heap size is never 64K (as it could be in theory). The total free hunk still limits the total number of scripts, and the hunk is shared with all resource types except HEP; however, the hunk is garbage-collected, so running out of hunk memory is not (always) a show stopper.
In ScummVM, every SCR+HEP file _combined_ must be less than 64K, but there is otherwise no limitation on the number of scripts you can have loaded. Because we don't have a heap as such, we return dummy values in the MemoryInfo call which are carefully chosen to avoid "Memory fragmented" or similar warnings from the game code.
-
Just for kicks, I added some extra tallying functionality to ScummVM, and I get 12K used in heap resources at the title screen.
So, back-of-the-hand calculations follow:
12K for heap resources + 13K for static interpreter data + 8K in stack + little dribs and drabs for various lists, audio, and so on.
Let's say this adds up to 35K of memory use. Then we get 29K free heap, quite similar to the number you get experimentally.
-
Hmm, although my SCI1.1 template game only shows 26000 bytes of free heap at the beginning. Not very much...
That's not too bad really. That is a bit higher than our current template runs out of the box
-
Hmm, although my SCI1.1 template game only shows 26000 bytes of free heap at the beginning. Not very much...
That's not too bad really. That is a bit higher than our current template runs out of the box
Yes, the separation into heap and script resources really does pay off.