Simon the Sorcerer GME Help Needed!

Ask for help with ScummVM problems

Moderator: ScummVM Team

Post Reply
Nitrus
Posts: 177
Joined: Wed May 18, 2011 9:49 am

Simon the Sorcerer GME Help Needed!

Post by Nitrus »

Hello all,

Lately I've been trying to combine Simon the Sorcerer 1 talkie version with subtitles (I compiled ScummVM on my own for testing so I have no problem playing with MD5), and I noticed that in the no-talkie CD dos version the settings for the subtitles AND the subtitles themselves are kept in the simon.gme file, while the floppy version has 30 or so TEXT files.

Now, can anybody tell me how to work the GME files? Unpack, and Repack them? At least explore them somehow?

Thanks in advance.
Nitrus
Posts: 177
Joined: Wed May 18, 2011 9:49 am

Post by Nitrus »

I mean, I enabled the subs in the Agos engine, so I can play with subs, I even finished it, and quite frankly there's just one or two lines missing. I just want to add the missing ones, and fix some of the existing ones so I wouldn't get the "invalid type" error if I do them just in a hex or text editor. I'd actually need to explore the GAMEPC too...
Nitrus
Posts: 177
Joined: Wed May 18, 2011 9:49 am

Post by Nitrus »

OK, this thread has gotten tedious, so I think it should be deleted, but before that would the DEVS please answer a few questions:

1. SS1 uses text based subtitles right? I mean they're not BITMAPs encoded in the data files, right?

2. I know that the Game Developers released the English Talkie without support for simultaneous subtitles (due to them being incomplete), so I want to know if it would be legal if the missing ones were incoroprated into ScummVM, and then be enabled? I mean, you guys probably have parts of the source code for the game, so I think that when some speechid's would be trigerred (and there is not a lot of them missing, only about a 100 words from the GAMEPC, that would be only a couple of sentences), the AGOS engine would return some text with the print string function (I may be wrong on the string function, I didn't look too much into it).

I love this game so much, I would gladly work on it, with your permission, plus, that's actually supporting the game devs.
Nitrus
Posts: 177
Joined: Wed May 18, 2011 9:49 am

Post by Nitrus »

OK, I think I'll continue my one man show in my compiler for the next few days.

Image

The problematic Calypso's letter identified.
Talkie BTW, with speech on.
User avatar
eriktorbjorn
ScummVM Developer
Posts: 3561
Joined: Mon Oct 31, 2005 7:39 am

Post by eriktorbjorn »

Nitrus wrote:but before that would the DEVS please answer a few questions:
I don't know how many active developers there are still around who know the AGOS engine well. (I know my name appears in the credits, but I've only done a few little things here and there.) By now, you may very well be the one who's looked the most closely at it recently.
Nitrus wrote: 1. SS1 uses text based subtitles right? I mean they're not BITMAPs encoded in the data files, right?
As far as I know they're text, but you probably knew that by now.
Nitrus wrote: I mean, you guys probably have parts of the source code for the game
We got some game engine source code, but I don't think we've ever seen what the game scripts themselves looked like originally, if that's what you meant.

Personally, I have no idea how complete/incomplete the Simon the Sorcerer 1 subtitles are compared to, say, the ones in The Feeble Files (which are enabled despite being incomplete), or what it would take to fill in the blanks.
SimSaw
Posts: 70
Joined: Tue Nov 01, 2005 11:10 am
Location: Germany
Contact:

Post by SimSaw »

I have worked on it some time before, but freezed work on it, because there is so much extra stuff to be done. I have gotten really far though.

If you want, you could get in private conversation with me and you might assist me.
Nitrus
Posts: 177
Joined: Wed May 18, 2011 9:49 am

Post by Nitrus »

OK, where do you want to talk about it? In the PM's?
SimSaw
Posts: 70
Joined: Tue Nov 01, 2005 11:10 am
Location: Germany
Contact:

Post by SimSaw »

Yes, it's best to send me a PM.
bonki
Posts: 5
Joined: Wed Feb 13, 2013 12:25 pm
Location: Sweden/Austria

Post by bonki »

Nitrus/SimSaw: Any update on this guys?
User avatar
merlo
Posts: 3
Joined: Sun Jan 10, 2010 7:59 pm
Location: Czech Republic
Contact:

Post by merlo »

Hello, i am very curious about this problematic too. I finished Simon II many times but never even seriously started first one because of subtitles absence.

:idea: What about to replace subtitles in spanish CD version? Like switch them with english texts? I believe its not that simple, but maybe it would be easier that implementing it to the english CD version from scratch.
Nitrus
Posts: 177
Joined: Wed May 18, 2011 9:49 am

Post by Nitrus »

I'm sorry for reviving this old post, I just wanted to post an update of what was achieved at the time:

Because the talkie was not released with a simultaneous option of subtitles (due to the fact that they were incomplete at the time), we wanted to make an unofficial patch of sorts which would sort the problems out, like adding missing lines, fixing the ones which were different from the voice input and stuff like that, but due to lack of time which was needed for this (time I did not have), and the amount of work which was required (different versions of the game required different methods of unpacking the containers), I stopped working on it, though SimSaw might have found somebody else to continue with.

The fact is subtitles DO EXIST in the game files (incomplete but it really isn't that bad, highly playable) and they CAN be enabled side by side with voices, if ScummVM's source was to be modified, a simple boolean flag. I've completed the game several times like this (talkie and subs) and it's great 95% of the time, though I would recommend if anybody were to try this, that they consulted the developers first, or create a fork if they do not intend to do it solely for personal use.

Because ScummVM's source code already contains equivalent subroutines and opcodes, everything needed from actors to display methods and a simple duration routine, subtitles can be added directly in the code, which is how I created the image above. This defeats the purpose though, since anything done to improve/fix/modify the game should not be conducted through ScummVM.

Also, there was an idea to modify the images too, so some on-screen words in the graphics could be translated for different languages. This was accomplished successfully for the floppy version (where the VGAs were all for themselves) but I didn't have time or nerves to create a GME unpacker, for the more important (in my opinion) CD version, because for the CD version, the VGAs were packed in the GME.

The images for Simon 1 are essentialy two types of files: one for raw image data, and another for the palettes.
The raw image data contains a header with offsets, width, height, type of image (big, small, background or something of the sort) and a flag for image packing encryption, not necessarily in that order, and perhaps there was something else, but as I said, it has been a long time.
Most of the encryption was a custom RLE algorithm, for which I've quite forgotten the characteristics, but it was pretty straight-forward. (I think it compressed 8 bytes of data in 5 ). The RLE decryption was accomplished with a lot of help from JestarJokin (hats off).

So, if anybody wants to attempt fixing this, first and foremost, I'd suggest looking into unpacking the GME, for both the subtitles and the images.

Sidenote: The voice data for Calypso's Letter as I recall was slapped at the end of the voice file, with a strange and inconsistent index, like 9999, an index used for multiple different voice sequences, while in reality it's the 160th sequence in the voice file. Also, it was one big sequence, which couldn't be chopped up for subtitle fragments without great difficulty, and this kinda strikes me as one of the reasons why the game was released without complete subtitle/voice synchronization. Just putting it out there, since this was one of the things which tormented me at the time.

Cheers.

EDIT: Also, I was just reminded by my previous post that most subtitles were in the GAMEPC file too. They were clear text, but I don't recall where the info for the actors (color), width, height etc. is being kept.
Kirben
Posts: 421
Joined: Wed Sep 21, 2005 12:15 pm
Location: Melbourne, Victoria, Australia

Post by Kirben »

The task is much more complicated than just adding the missing subtitles, the string id numbers were completely removed from the scripts in the English/German talkie versions where subtitles are missing. So you would need to alter numerous scripts in the data files, to add back string id numbers for the extra subtitles.

Also the scripts were actually altered to allow speech and subtitles in the multi-language versions. So altering the English/German talkie versions isn't a good idea.

You would need to completely change the subtitles in one of the multi-language versions, along with changing the verb images too. Which would be an enormous task.
Nitrus
Posts: 177
Joined: Wed May 18, 2011 9:49 am

Post by Nitrus »

Yes, I gathered as much, and that's the primary reason why I gave up on it at the time. I managed to insert text through ScummVM, using some opcodes (can't remember which ones were used for text display, o_wait and some others), then I called printTextMsg I think, and was able to do it that way, though I had to alter the display duration formula for some of them, Calypso's Letter for example. But as I said, at the time I found it to be too much work.

Now though, my wish to do it is kinda rekindled again, so I started poking around in the GME, and I was able to identify the VGA headers, some midi fragments and such, and of course the clear text.

I'd really appreciate if you could tell me what's contained in the TABLES files (for the DOS CD version), and I suppose there must be some headers or some-such that point to the text/voice index offsets? I couldn't find where they are, so if you recall the game's files' data structures and are able to tell me, I'd be very grateful.

I had in mind to create some sort of a GUI program to provide the ability of exploring the GME, inserting strings and matching them with appropriate voice indexes, and of course make the program alter all offsets which were affected in the process, something like this this...

I'm also oblivious to the use of the TBLLIST file, and the STRIPPED.TXT.
Also the scripts were actually altered to allow speech and subtitles in the multi-language versions.
Does this mean that they fixed those versions when they released them, or they released them faulty too?
...along with changing the verb images too. Which would be an enormous task.
Been there, done that :)
Image

UPDATE: Figured out the TABLES, thanks to ScummVM's documentation of opcodes.
So now when it comes to the talkie versions, I understand the size of this undertaking better.
Images remain not that big of a problem. Adding text though... -.-
Post Reply