[Scummvm-tracker] [ScummVM :: Bugs] #10270: SCI: LSL7: Ocean outside portholes jumps
ScummVM :: Bugs
trac at scummvm.org
Fri Sep 16 08:58:27 UTC 2022
#10270: SCI: LSL7: Ocean outside portholes jumps
------------------------+-----------------------------------
Reporter: DanielSWolf | Owner: sluicebox
Type: defect | Status: closed
Priority: normal | Component: Engine: SCI
Version: | Resolution: fixed
Keywords: sci32 | Game: Leisure Suit Larry 7
------------------------+-----------------------------------
Comment (by sluicebox):
You're welcome! Thank you for your kind words -- I am highly susceptible
to compliments.
This was a hard one, and highly intimidating since the uncanny csnover
took an in depth look and didn't figure it out. I have different skills
and many limitations so I had to think for a long time about how I could
ever approach this. (I refuse to swim in disassembled exe's for more than
a few minutes and have forgotten 100% of the trigonometry I've ever
learned.) But it's a visually obvious bug, and reported by the honorable
LarryScale author, so even though I don't know (care?) about LSL7 myself,
I've really wanted to take this one down for years.
But I'm good with SCI scripts. (I suspect I'm the only person to have ever
decompiled this game.) So for this, I modded the LSL7 ocean script to log
the output of every motion to a text file. Wow that sentence makes it
sound easy. It meant identifying a large swath of code I could safely
overwrite and then manually writing this entire feature (with full file
i/o, string formatting, etc) in byte code (pen and paper and hex editor)
within those bytes plus a bunch of SCI3-specific patches to get the
modified strings working (relocations!) and then, finally, patching
scummvm to allow any of this arbitrary file access. But by the end of the
day I had a modded script patch file I could drop in the game directory
and run in dosbox and scummvm. I could then diff the log files to see
where things really went significantly wrong. That narrowed this down to
the exact state before the big problem. Further tweaks to my patch logged
additional state and that let me somewhat tediously bisect further until I
hit the mod instruction. At that point I had the answer, and while it was
difficult, it didn't involve any x86 so I threw a party. At that point, I
could quickly confirm my findings against many exe's to get the version
check right.
I've never had to touch the core VM before, so this was a lot of fun.
"SCI3 mod opcode is broken in 2022" is not what anyone would have expected
from this.
--
Ticket URL: <https://bugs.scummvm.org/ticket/10270#comment:8>
ScummVM :: Bugs <https://bugs.scummvm.org>
ScummVM
More information about the Scummvm-tracker
mailing list