Open main menu

Difference between revisions of "ScummVM Tools"

1,880 bytes added ,  01:22, 1 March 2009
→‎descumm: Started this section.
m (→‎extract_loom_tg16: I missed updating this last time.)
(→‎descumm: Started this section.)
Line 207: Line 207:


=== descumm ===
=== descumm ===
Decompiles SCUMM scripts
Decompiles SCUMM scripts.
 
Syntax:
  descumm [-o] filename
Flags:
  -0 Input Script is C64
  -1 Input Script is v1
  -2 Input Script is v2
  -3 Input Script is v3
  -4 Input Script is v4
  -5 Input Script is v5
  -6 Input Script is v6
  -7 Input Script is v7
  -8 Input Script is v8
  -p Input Script is from Humongous Entertainment game
  -n Use Indy3-256 specific hacks
  -z Use Zak256 specific hacks
  -u Script is Unblocked/has no header
  -o Always Show offsets
  -i Don't output ifs
  -e Don't output else
  -f Don't output else-if
  -w Don't output while
  -b Don't output breaks
  -c Don't show opcode
  -x Don't show offsets
  -h Halt on error
 
descumm sends the results to [http://en.wikipedia.org/wiki/Standard_streams standard output], so you should redirect the output using the ">" character, like so:
 
descumm -5 inscript.tmp > outscript.txt
 
Each version of the SCUMM engine has a different instruction set, so you must specify which set to use when interpreting the input. If you're not sure which version number to use, consult the table at [[SCUMM/Versions]]. Note that Indy3-256 and Zak256 have a few instructions that differ from the standard SCUMM V3 instruction set, so you should also specify the "-n" or "-z" option.
 
By default, descumm attempts to interpret most instructions that jump to another address as "if/else" or "while" blocks. If you like, you can retain just the basic instruction, which will appear in the form of:
 
unless ([boolean-expression]) goto [address];
 
You can also disable outputting the opcode hex values and address offsets, although you may have trouble understanding where jumps go to.
 
If the script has been "unblocked", it is missing the header information as described in [[SCUMM/Technical_Reference/Script_resources]]. This information is not necessary to interperet the code, but you must tell descumm if is not present via the "-u" option.


=== desword2 ===
=== desword2 ===
125

edits