Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[MI1 VGA floppy] Modifying the total length of certain lines triggers "BUG: TableOfContent::merge different roomIds" #54

Open
1 task done
SushiGoldfish opened this issue Mar 15, 2022 · 2 comments
Assignees
Labels
bug Something isn't working help wanted External contributions wanted!

Comments

@SushiGoldfish
Copy link

Summary

In the VGA 1.1 version (also seen in the 1.0 version) there is an issue with translating from ~ line 360 onwards

Removed (59, 0x13AB3) from the index
BUG: TableOfContent::merge: different roomIds

I have narrowed down the issue by taking the original exported text and changing just 1 character.
When you add or remove a even a single character there, it fails with this kind of error:

When compensating for the character removal/addition with an equal amount of characters on one of the next lines, the error does not show up.

in 1.1; line 362 (not counting the two new scummtr header lines):
I just knew you'd be back!\255\003I knew you wouldn't be able to get that little beauty out of your mind!\255\003Come on. Let's go take another look at her!
in 1.0; line 367:
chickens
This same behavior shows all the way until line 568 (The Sea Monkey in 1.1)
The next lines are fine again to translate/change length... until line 905 where the same kind of error starts (door in 1.1 - while 906 is also chickens as in 1.0... coincidence? Don't think so... In my translation, door had the exact same number of characters, so I got lucky.) Same wrong behavior until line 1033 (It will terrify you) - this is the last line in that section for the Voodoo lady, which also was problematic in the 1.0 game.

Another simple way to trigger the bug is to use the -A ao(v) option to export and reimport the original text, as it is likely to pad one of the lines in the sensitive blocks with @'s. This also renders that padding option unusable for this game as a side effect.

Note: for the EGA version (also 1.0 - but older), the -A aov option round-trip export is ok. [I still need to match my translation files before I can try with an actual translation on that version]

Impacted games

The Secret of Monkey Island

ScummTR versions

v0.5.1

I own a legitimate game

  • I promise that my game does NOT come from an illegal source, such as "abandonware" websites
@SushiGoldfish SushiGoldfish added the bug Something isn't working label Mar 15, 2022
@dwatteau dwatteau self-assigned this Mar 15, 2022
@dwatteau dwatteau added the help wanted External contributions wanted! label May 4, 2022
@dwatteau
Copy link
Owner

dwatteau commented May 4, 2022

Hi, thank you for your report and the details you provided!

Sorry, it took me some time to look at this and come back to you.

I'm pretty sure that we hit this original Monkey1 VGA bug that ScummPacker fixed many years ago:
https://bitbucket.org/jestar_jokin/scummpacker/commits/96f34dc6a2b947dea259382387c574329c819efe

i.e.,

The new solution will now only read in the first room block contained in an LF block; any other RO blocks are skipped. This is limited to V4 games.

But unfortunately, I didn't manage to do this change inside the ScummRP core; I just don't have a good-enough understanding of the original ScummRP code and the LFL structures to do this change myself, at the moment. If someone wants to help here, that would be very welcome.

In the meantime, if you have a Python 2 interpreter, maybe ScummPacker (documentation) could help; maybe it will fix the original game if you unpack/pack with ScummPacker first, and then use ScummTR on top of the result? (I'm not sure about this). Or maybe NUTCracker will have support for V4 games at some point.

@dwatteau dwatteau pinned this issue May 4, 2022
@dwatteau
Copy link
Owner

dwatteau commented May 5, 2022

I tried repacking it with ScummPacker, but it looks like it doesn't fix the original files (it just works around their bugs I believe), and ScummPacker event hits the #47 glitch in 000.LFL when doing its repack.

So I don't have a fix for this at the moment… unless you work from a verbose language version (such as German) and manually pad each string with @ so that you always keep the original length of every string you're translating… and I'm not even sure that it would work :/

Anyway, what we know is that the VGA floppy version of Monkey1 has multiple format errors that we don't handle yet. I think I'll change the code so that repacks/imports print a big warning, since it's known to cause corruption issues.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working help wanted External contributions wanted!
Projects
None yet
Development

No branches or pull requests

2 participants