Secret of the Monkey Island VGA/DOS translation

Ask for help with ScummVM problems

Moderator: ScummVM Team

Post Reply
User avatar
Praetorian
ScummVM Developer
Posts: 787
Joined: Tue May 08, 2007 8:54 am
Location: Greece
Contact:

Secret of the Monkey Island VGA/DOS translation

Post by Praetorian »

I need some help with this one.

I am currently trying to port a greek fan made translation for the CD version of SOMI to the DOS/VGA version.

Things seem to go well (fonts were changed successfully), but after I imported the new subtitles text, upon loading the game through ScummVM I got the "Dial-a-pirate" copy protection system, but with messed up background image.

That means noone can make sense of what the pirate presented looks like. It also tends to crash often and randomly at this point.
Also this part seems to be bypassed by ScummVM for the original (english) version.

Any ideas on what to do?

Edit: (Some more info). I tried running the original (english) Monkey Island, with the copy_protection=true parameter set in the ScummVm.ini. In this case, the "Dial-a-pirate" appears normally (no image distortion).
Then I ran the greek translated Monkey Island with copy_protection=false, and I had the same results as before (the copy protection still appears, and the image is all messed up_.
Finally I tried changing only one letter (I deleted a character) from the original text and then I re-imported it into the game. Again I got the messed up version of the Dial-a-pirate. Thus, I assume there is some kind of MD5 checksum check that decides whether to skip the copy protection or show it. But why show it messed up like that?

P.S. Just to clarify things, I have no problem with the copy protection system being shown if that is inevitable for the translated version. My problem is with it being shown all messed up, and thus noone can make sense of it.

Some images to show what I mean:
With changed text (even with deleting just one character):
ImageImage

With unchanged text and explicitly enabling the copy protection from the scummvm.ini:
ImageImage

Edit 2: It seems that I might have been wrong about the checksum thing. From a few tests I run, I concluded that the subtitles' text is serially distributed amongst the 4 .LEC files. Changing the text ONLY from the first file results in the problem I am encountering. This only happens when the overall number of characters in this chunk of text is changed (characters added or deleted), and does not occur when the overall number of characters remains the same (!!). Which leads me to believe that when importing my translated text into the game, some values don't get updated as they should, and so something overlaps with other data when it should not.
Unfortunately, until I find out more (if available) for the .Lec and lfl structure of the Scumm V4 engine, I won't be able to find a practical solution for this.
User avatar
eriktorbjorn
ScummVM Developer
Posts: 3523
Joined: Mon Oct 31, 2005 7:39 am

Re: Secret of the Monkey Island VGA/DOS translation

Post by eriktorbjorn »

Praetorian wrote:This only happens when the overall number of characters in this chunk of text is changed (characters added or deleted), and does not occur when the overall number of characters remains the same (!!).
Well, I don't know exactly how you are changing the texts, but I assume that if you change the length of a text, you also have to adjust the surrounding script opcodes to compensate for that.
User avatar
Praetorian
ScummVM Developer
Posts: 787
Joined: Tue May 08, 2007 8:54 am
Location: Greece
Contact:

Re: Secret of the Monkey Island VGA/DOS translation

Post by Praetorian »

eriktorbjorn wrote:if you change the length of a text, you also have to adjust the surrounding script opcodes to compensate for that.
I am not doing the exporting/importing of the subtitles text manually. There is an old and well known -I presume- tool that does that for many of the classic scummvm games.

(I don't know if I should say specifically which or give a link, so I won't just yet). Suffice to say, this tool has worked already flawlessly for me with other games (Loom, Indy 3, Monkey Island CD version, etc). This is the first time that something went wrong in the import procedure.

I suppose you're right. I might have to write a custom tool to do the work, changing the appropriate hex values and content in the files.

I was wondering, though, if anyone else has tried translating the floppy version before and stumbled upon the same problem...(and if s/he did how did s/he solve it)
Butz
Posts: 1
Joined: Tue Feb 07, 2006 9:44 pm

Re: Secret of the Monkey Island VGA/DOS translation

Post by Butz »

Praetorian wrote: I am not doing the exporting/importing of the subtitles text manually. There is an old and well known -I presume- tool that does that for many of the classic scummvm games.
This old and well known tool also has an old and well known bug in working with SOMI VGA FLOPPY.
User avatar
Praetorian
ScummVM Developer
Posts: 787
Joined: Tue May 08, 2007 8:54 am
Location: Greece
Contact:

Re: Secret of the Monkey Island VGA/DOS translation

Post by Praetorian »

Butz wrote: This old and well known tool also has an old and well known bug in working with SOMI VGA FLOPPY.
Yes. Apparently it does. Could you provide any more details on this, or perhaps reference some discussion of this bug?
User avatar
Sushi
Posts: 26
Joined: Wed Dec 26, 2018 12:37 am

Re: Secret of the Monkey Island VGA/DOS translation

Post by Sushi »

Sorry to bring back this thread from the dead - although Guybrush has inadvertently resurrected much greater evils, but I digress...

I have exactly the same issues as you had 12 years back: only replace Greek with Dutch in the description.

So, Praetorian did you finally find solutions to any of these issues or did you simply had to give up in the end?

I am now in a stage where I am adding line by line - checking if scummtr throws an error or not and if so, matching the number of characters per line, which is quite hard to do and will be impossible if that is indeed required for the complete file.

Up until line 367 things were fine. At first I thought I simply had to make sure there are enough @@@@ to reserve the memory between "name_is" and "new_name_is" for objects.

The errors (in scummtr) are
Removed (70, 0x6AB4) from the index
Removed (77, 0x49BB) from the index
BUG: TableOfContent::merge: different roomIds
User avatar
Praetorian
ScummVM Developer
Posts: 787
Joined: Tue May 08, 2007 8:54 am
Location: Greece
Contact:

Re: Secret of the Monkey Island VGA/DOS translation

Post by Praetorian »

Sushi wrote: Sun Oct 11, 2020 5:39 pm So, Praetorian did you finally find solutions to any of these issues or did you simply had to give up in the end?
If memory serves, I finally gave up on the particular version of the game.
I do hope someone will resolve this eventually.
User avatar
Sushi
Posts: 26
Joined: Wed Dec 26, 2018 12:37 am

Re: Secret of the Monkey Island VGA/DOS translation

Post by Sushi »

Too bad... That means the stump joke will remain non-translated forever *
Regarding the copy protection - I thought I could use the target_md5 setting that I found in some other threads here. But it was removed in later builds of scummVM - so that's a dead end too. It does work fine in DOSbox, even on a partially translated file!

I think I can bury my hope to ever get the EGA version translated too.

*: well it is restored in the Ultimate Talkie - which I did translate too. Still a few of the dialogs are different between the versions. There are a few lines cut when moving to the CD version.
borges
Posts: 3
Joined: Wed Dec 30, 2020 11:33 am

Re: Secret of the Monkey Island VGA/DOS translation

Post by borges »

It appears that the program is having trouble removing invalid entries from the index. If you remove those entries, the program works even when the number of characters are different.
Attachments
monkey_vga_000_cleaned.zip
BPS patch created with Floating IPS on the English version's 000.LFL file
(237 Bytes) Downloaded 83 times
User avatar
Sushi
Posts: 26
Joined: Wed Dec 26, 2018 12:37 am

Re: Secret of the Monkey Island VGA/DOS translation

Post by Sushi »

borges wrote: Thu Dec 31, 2020 3:08 pm If you remove those entries, the program works even when the number of characters are different.
Could you give an example of what entry to remove where?
Tsomi
Posts: 50
Joined: Sun Apr 14, 2013 3:48 pm
Location: France

Re: Secret of the Monkey Island VGA/DOS translation

Post by Tsomi »

Hi,

Thomas, the original author of ScummTR gave me the original source code with permission to open-source it, last year.

This bug is indeed fixed in the new version I've made. I'm (hopefully) going to release it in a few weeks, but in the meantime you can PM me for a beta release if you'd like.

EDIT: Actually, there's still an unresolved bug in ScumMTR regarding this: https://github.com/dwatteau/scummtr/issues/47. I couldn't find a solution yet.
Post Reply