freesci-develop
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[freesci-develop] Very old SCI


From: Christoph Reichenbach,,,
Subject: [freesci-develop] Very old SCI
Date: Fri, 22 Aug 2003 08:47:36 +0200
User-agent: Mutt/1.3.28i

Hi,

Glutton now supports old SCI games again. I believe that I should
take this oppportunity to outline the differences between old and
new scripts, so that these can, eventually, be added to our new
LaTeXified documentation.

Prefix
------
Each 'old' SCI script is has a two-byte prefix, a 16 bit number
(whose signedness is not clear but meaningless) in LE encoding.
This number describes the number of local variables the script
requests; they are to be initialised with 0. These scripts do
not have an embedded locals block.
  All addresses within are relative to the beginning of the
script _including_ this two-byte prefix (*).

Selector IDs
------------
Old SCI script selectors are all even. During selector lookup,
the LSB of the selector ID looked up (sent to etc.) may be set,
making the number odd; the selector ID actually looked for is
the same selector ID minus the LSB.
  This is supposedly a 'read' vs. 'write' toggle. I'm not sure
what its semantics are supposed to be, but ignoring it seems to
be working so far.


(*) Thus, our 0.3.x handling of these is neccessarily more complex
than the Glutton one: 0.3 moves the script back by two bytes and
later adjusts offsets where appropriate, whereas Glutton leaves
the script unmodified and merely begins analysing it two bytes
behind its physical beginning.


llap,
 Christoph




reply via email to

[Prev in Thread] Current Thread [Next in Thread]