View Single Post
Old 07-24-2009, 11:30 PM   #14
Join Date: Sep 2004
Posts: 41
Originally Posted by cocomonk22 View Post
Those bad jumps occur because jumps are based on hex addresses. When you split the lines to multiple prints and waits, this corrupts some of the jumps.


That's just a simple example. The actual change is even more since a jump might go to the wrong hex value than the start of an opcode. So to fix this you need to change all jump values based on the additional bytes added between the jumps.
This is not necessary when using version v2+ of Scummbler, it uses labels for jumps. The actual text in the label is irrelevant. This means you can insert as many instruction as you want between a jump and the jump target, and it will still behave as normal. The actual cause for these "bad jump" errors is mentioned below.

Originally Posted by LogicDeLuxe View Post
So far, I've noticed two oddities using this tool on MI1:
I'll use the original, non-speech-hacked Monkey Island 1 CD files as reference here (not the files in MI:SE).

Error parsing input file: Local script number must be greater than 200.
Compiles/decompiles fine for me, the script number should be 204. Slightly different files due to descumm automatically commenting out a goto instruction. Could you upload your descummed script to ?

decompiled with descumm and then compiled again with scummbler results in a different file. Using descumm on that gives an error:
ERROR: opcode 0xAB: Unhandled subop 0!
My fault; the delayVariable opcode was being incorrectly modified to indicate that the following parameter was a variable (not a constant), which is unnecessary (delayVariable, funnily enough, only ever takes a variable).

Apparently, there are some compiler bugs as scummtr gives the following errors:
ERROR: Script error at 0x18FFDA in MONKEY.001 (Bad jump(s)) [030:LSCR#0204]
... etc...
I had somehow entered the wrong opcode for loadRoomWithEgo. Instead, it was the opcode for "jump if class of object is" instruction, which is what causes the "bad jump" errors.

I looked at the first three scripts you listed here and they all have the "loadRoomWithEgo", so I'm assuming that's the only problem with those scripts.

And for another minor problem:
000_LECF\030_LFLF_store\000_ROOM\049_LSCR.dmp won't compile. It gives this error: Exception: Invalid escape code: ^375
I can see the problem here. Luckily, this is not a problem with my tools, since it is solved as a side effect of this line split.
Yes, this is a problem with descumm's escape character handling. It would be nice if I implemented an alternative way of writing escape characters in Scummbler. I know you've gotten around this problem now, but a simple fix is to just put a space between the escape character digits and the dialogue text digits.

Here's the latest fixed version of Scummbler:
(link removed)

Hope it works this time

Last edited by jestar_jokin; 08-03-2010 at 07:48 AM. Reason: Removing outdated links
jestar_jokin is offline   you may: quote & reply,