In Sierra-Online games like LSL2,
LSL3, KQ1 (1990) you can enter Sierra's debug mode by pressing LSHIFT RSHIFT GREY All
global variable values can be changed. Although, changes have effect after exiting DEBUG
mode.
Global
variables |
|
Notes
|
1 |
Game ID
(Example kq1) |
Read only
(@) |
2 #8) |
Room number
(Ex. rm8 for room |
Read only |
3 |
Speed |
0 - Max, but
99 is quite slow |
4 |
Unknown |
|
5-8 |
Something
from EventHandler |
|
9 |
Pointer to
object inventory |
Read only |
12 |
Previous
scene number |
|
13 |
Scene number |
Can be used
for teleport. |
14 |
Breakpoint
flag |
If non-zero,
Auto-DEBUG on room CHANGE |
15 |
Score |
New score is
displayed only after next non-DEBUG change. |
16 |
Max Score |
New score is
displayed only after next non-DEBUG change. |
30 . |
Pointer to
SG Directory |
Use INSPECT
to view SG directory. |
Global variable's marked with (@),
attempted value changes have no effect. They are automatically restored. Here are the
debug commands.
Key -
Command |
|
Notes
|
q |
Quit |
Quit
immediately |
t |
Temp
variable |
Inspect temp
variable |
a |
Inspect |
acc |
i |
Inspect |
See chapter
"Inspect" |
o |
Object |
See
available objects. |
r |
Resources |
See
resources |
s |
Send stack |
|
d |
Display
memory |
|
f |
Free heap |
|
g |
Global
variable |
Inspect
global variable |
l |
Local
variable |
Inspect
local variable |
b |
Break in |
(If object
value is changed, Auto-DEBUG) |
c |
Inspect
current object |
|
Inspect subcommands.
Keys |
Effect
|
Up, Down,
Left, Right |
Scroll |
Enter |
Next item |
[,] |
Move to
address |
i |
Inspect |
e |
Edit |
c |
Collection:
If you press C while inspecting Inv, you can get Inventory List. |
Use inspect subcommands recursively.
Example: While viewing Inventory List, assign ego address to owner. ego, owner are
objects. So you can collect all treasures at any time. Write ego in lower case.
You can inspect hex address of memory
(Example $3455) or any object (Example: Sound)