[Scummvm-devel] opcode 0xE0

Jonathan Gray khalek at linuxgamers.net
Fri Feb 14 21:22:02 CET 2003


hi,
	as many of you probably know I've been trying to get some of the
humongous specific opcodes to either have stubbed or working
implementations.

Currently I'm looking at 0xE0 which is found in at least moondemo and
fbdemo.

Luckily moondemo is windex enabled which means I can get the output of the
interpreter stepping through the scripts.

E0 seems to be concerned with logic in some sense, let me paste some
output.

What I think is the revelant part of the script in hex

e0 de 03 00 40 01 00 00 0f

supposed to mean ?

if (L.{0} != 0){F}

the opcodes are run like this (ScummVM opcode names)

43 o6_writeWordVar
E0 ?
5D o6_jumpFalse
5E o6_starScriptEx

windex (script, slot, offset including header in decimal)
 scr 1   01 01551 V.227 = 128
 scr 1   01 01557
 scr 1   01 01566 if (L.{0} != 0){F} do not jump 118
 scr 1   01 01696

windex with options (hex opcodes, disk usage, stack tracing)
Stack: 128
:
 scr 1   01 01551 V.227 = 128
 5585:0005 43 e3 00 01 80 00 e0 de 03 00 40 01 00 00 0f 5d
Stack: 128
 scr 1   01 01557
 5585:000B e0 de 03 00 40 01 00 00 0f 5d 76 00 6b 90 6b 92
Stack: 0
 scr 1   01 01566 if (L.{0} != 0){F} do not jump 118
 5585:0014 5d 76 00 6b 90 6b 92 03 27 00 01 00 00 0e 5d 20
Stack: 0 3 0
 scr 1   01 01696
 558D:0016 5e 66 58 1e 00 00 01 25 52 4f 4f 4d 00 00 1e 50
Loading script 3 from disk 1
Loading script 3 from disk 1
Stack: empty
:

descumm6 (offset - header in hex, opcode in hex)
[0604] (43) var227 = 128
invalid opcode 0xe0 (stack count 1)

It would be nice if someone could explain to me exactly whats happening or
even implement it :)

Boot script can be found here:
http://users.bigpond.net.au/tgray2/script-1.dmp

thanks

Jonathan





More information about the Scummvm-devel mailing list