Lost Files of Sherlock Holmes (Scalpel) - Repeating Music

General chat related to ScummVM, adventure gaming, and so on.

Moderator: ScummVM Team

Osprey
Posts: 11
Joined: Fri Aug 25, 2017 7:31 pm

Lost Files of Sherlock Holmes (Scalpel) - Repeating Music

Post by Osprey »

Hi. I posted this over at the DOSBox forums, but figured that it probably deserved to be here, as well, since the game is officially supported by ScummVM. There are also nothing but old adventure lovers here who might appreciate it.

Image Image

I've very recently created a patch for The Lost Files of Sherlock Holmes: The Case of the Serrated Scalpel to cause the music to repeat at each location. If you didn't know or forgot, the game ordinarily plays each location's music only once and then stays quiet until you leave the location. Because most of the music is only a minute long, that likely means playing much of the game in silence. This patch addresses that by having the music start again when it finishes.

Interestingly, the later 3DO version did have repeating music and I just learned today that one of the original developers doesn't know why it didn't repeat in the DOS version and thinks that it might've been an oversight. It's kind of cool to imagine that the developers' intent might've been to do what this patch does if they hadn't been pressured by deadlines or had simply been allowed to patch the game post-release.

Anyways, it's a simple fix that modifies one file. I've verified that it works in ScummVM, as well as DOSBox. I hope that it helps people to enjoy replaying this wonderful game even more.

http://s000.tinyupload.com/index.php?fi ... 7616114931
(This includes both a Windows patcher and a DOS patcher. You can use the DOS patcher from within DOSBox if you don't have Windows.)

Edit: I've created a patcher version and replaced the link because of Raziel's concern.
Edit #2: This patcher version requires the uncompressed, 358 KB version of MUSIC.LIB. It may not work if you installed the game with the "Save Disk Space" option or didn't install at all and simply copied the compressed files straight from the floppy disks, instead. You may need to use DOSBox to install the game with the "Save Play Time" option before you can apply this patch. You can still play in ScummVM afterwards.
Edit #3: Added a DOS patcher to the archive in the link for those who don't have Windows.
Edit #4: Fixed a bug in the intro. Thanks to Raziel.
Last edited by Osprey on Fri Dec 01, 2017 3:19 am, edited 11 times in total.
User avatar
Raziel
ScummVM Porter
Posts: 1517
Joined: Tue Oct 25, 2005 8:27 am
Location: a dying planet

Post by Raziel »

Nice, thank you :-)

Now i wonder if this patch is possible to integrate into the source without the need of an altered data file (which may vanish completely after time).

As it seems to be a "bug in the original" it would be worth fixing/ working around.

Edit: Also, you have an "Original (no repeating)" MUSIC.LIB in your zip.
Is that from the original game?
Because that may bring problems with your link, as original (even parts) data of a game is not allowed on the forums.
Osprey
Posts: 11
Joined: Fri Aug 25, 2017 7:31 pm

Post by Osprey »

Raziel wrote:Nice, thank you :-)

Now i wonder if this patch is possible to integrate into the source without the need of an altered data file (which may vanish completely after time).

As it seems to be a "bug in the original" it would be worth fixing/ working around.
It should be simple to integrate it into ScummVM. Inside MUSIC.LIB are all of the game's music as .MUS files (essentially MIDI files with custom headers). Each of those files ends in either HEX 80 or 81. 80 dictates that the music repeat; 81 dictates that it not. Think of the last bit as a "stop" bit, with 1 for stop and 0 for no stop. I simply changed the files that end in 81 to end in 80, instead. The developers could make it so that ScummVM, when it reads 81 at the end of one of those music files, treats it as 80, instead, repeating the music. They could then even expose that as an option in the launcher to allow the user to toggle that behavior.
Raziel wrote:Edit: Also, you have an "Original (no repeating)" MUSIC.LIB in your zip.
Is that from the original game?
Because that may bring problems with your link, as original (even parts) data of a game is not allowed on the forums.
If you wanted to be super strict, the whole original patch wouldn't be allowed here, then, since it's a replacement MUSIC.LIB that's a reconstruction of the original file. Rather than risk mods removing the link or this thread, I've just created a patcher version that patches just the changes to MUSIC.LIB and replaced the link above.
User avatar
Raziel
ScummVM Porter
Posts: 1517
Joined: Tue Oct 25, 2005 8:27 am
Location: a dying planet

Post by Raziel »

I was just asking about the original MUSIC.LIB in your package as it seems to be double in size than the one i hvae copied from my CD.

Now, we need to get a dev in here :-)
Osprey
Posts: 11
Joined: Fri Aug 25, 2017 7:31 pm

Post by Osprey »

Raziel wrote:I was just asking about the original MUSIC.LIB in your package as it seems to be double in size than the one i hvae copied from my CD.

Now, we need to get a dev in here :-)
It's the only size that I've ever seen, which is 358 KB. That's the size in the floppy version and the size in the Hit Squad CD version. Perhaps yours is corrupt or you have compression enabled on it.

Edit: Oh, wait a second. The game has an option in the installer to "Save Disk Space" or "Save Play Time" and I read somewhere that the difference between the two is that the latter version decompresses certain files, taking up more disk space. That must be it. You must've installed the game with the "Save Disk Space" option, meaning that your MUSIC.LIB is compressed.
Last edited by Osprey on Mon Aug 28, 2017 10:12 pm, edited 2 times in total.
User avatar
Raziel
ScummVM Porter
Posts: 1517
Joined: Tue Oct 25, 2005 8:27 am
Location: a dying planet

Post by Raziel »

Osprey wrote:
Raziel wrote:I was just asking about the original MUSIC.LIB in your package as it seems to be double in size than the one i hvae copied from my CD.

Now, we need to get a dev in here :-)
It's the only size that I've ever seen, which is 358 KB. That's the size in the floppy version and the size in the Hit Squad CD version. Perhaps yours is corrupt or you have compression enabled on it.

Edit: Oh, wait a second. The game has an option in the installer to "Save Disk Space" or "Save Play Time" and I read somewhere that the difference between the two is that the latter version decompresses certain files, taking up more disk space. That must be it. You must've installed the game with the "Save Disk Space" option, meaning that your MUSIC.LIB is compressed.
Actuall no, i didn't install the game as Windows exe's don't run here.
I simply copied the whole floppies over. I've got the Electronic Arts big box. The file is on disk 1 and has 156,697 bytes.

Maybe with that option it decompresses some already compressed file? (Oh, was that what you meant?)

otoh if i view both files in a hex editor they seem to be the same, at least the first bytes are completely the same...except for the size...strange
Osprey
Posts: 11
Joined: Fri Aug 25, 2017 7:31 pm

Post by Osprey »

Raziel wrote:Actuall no, i didn't install the game as Windows exe's don't run here.
I simply copied the whole floppies over. I've got the Electronic Arts big box. The file is on disk 1 and has 156,697 bytes.

Maybe with that option it decompresses some already compressed file? (Oh, was that what you meant?)

otoh if i view both files in a hex editor they seem to be the same, at least the first bytes are completely the same...except for the size...strange
Yes, that's essentially what I meant. If you simply copied the files from the floppies, then they'd naturally be compressed, so you're using the versions of the game files that you would if you were to run the installer and choose "Save Disk Space."

It makes sense that the headers of both versions are the same, since the file is a container and the game has to be able to open both versions.

This does bring up a concern... actually, two concerns. First, does the uncompressed (358 KB) MUSIC.LIB still work in an installation with compressed files? If it works for you, then that answers that question. Second, my new patcher that I linked in this thread assumes that you have the uncompressed MUSIC.LIB and may not work with the compressed version. I may need to create another version just for the odd person (not that you're an odd person) who has the compressed versions.

Edit: I can't get the installer to compress the files; it must only decompress them. I would need to have the original, compressed version from the floppies to create a second patcher, which I don't have with me. I guess that I'll just tell people above, if they have the original floppies, to use DOSBox to install the game with the "Save Play Time" option first.
Last edited by Osprey on Tue Aug 29, 2017 3:25 pm, edited 1 time in total.
User avatar
Raziel
ScummVM Porter
Posts: 1517
Joined: Tue Oct 25, 2005 8:27 am
Location: a dying planet

Post by Raziel »

I installed it with DosBox and yes, it's the compressed version.
Decompressed it's 366.465 bytes.

What's strange is, that i got no music at all with both versions.
At least not in the first two scenes i tried, i guess it shouldn't be all silent there, should it?

It can't be the installs, because i tried the "copy over all files" and the "install with decompressing"...hmm

Nope, no matter what, there is no music, only sound effects and speech...not sure if the HOLMES.CFG is even used by ScummVM, but changing this from MT-32/MIDI to AdLib doesn't help either.
Osprey
Posts: 11
Joined: Fri Aug 25, 2017 7:31 pm

Post by Osprey »

It shouldn't be silent. If you're asking, though, you probably didn't check that music worked before you applied my patch. You might have an issue with MIDI in your OS or ScummVM that you need to get sorted out first.
albadross
Posts: 57
Joined: Wed Jun 14, 2006 11:55 pm

Post by albadross »

Just to confirm I have got Osprey's patcher to work correctly on the uncompressed MUSIC.LIB file. I first ran a saved game from the opening scene using the unpatched (original) MUSIC.LIB file and the music lasted around 69 seconds.

I then ran the patch to amend MUSIC.LIB. I played the same saved game again and I stopped the music after 7 minutes - the music had repeated itself 6 times ... and was happy to continue!

EDIT : Using fairly recent daily Windows 64 build on Linux under Wine.
Osprey
Posts: 11
Joined: Fri Aug 25, 2017 7:31 pm

Post by Osprey »

Thanks for the confirmation, albadross. It's appreciated.

For a second there, I was wondering why you had to use Wine, since ScummVM is ported to nearly everything, then realized that it was to run my patcher, which is for Windows. I hadn't even thought about that.

Edit: I've whipped up a DOS patcher, bundled it with the Windows patcher and updated the link. Hopefully, everyone who doesn't have Windows can at least run DOSBox and use the DOS patcher from there.
albadross
Posts: 57
Joined: Wed Jun 14, 2006 11:55 pm

Post by albadross »

Osprey wrote: ScummVM is ported to nearly everything.
@Osprey, indeed ScummVM is ported to Linux - this was one of the reasons that supported my decision 2 years ago to remove Windows OS and install Linux (Mint) on all the family's computers.

I do run the stable Linux ScummVM version (whenever it is released) but, for development purposes on a daily basis, I just find it easier to run the latest Windows development version under Wine. For instance, I don't have to hunt for the ini file whenever I want to edit it.

But, as I have the stable Linux version 1.9.0 installed as well at the moment, I ran the game again in a similar fashion - and, surprise surprise, the music repeated itself under Linux (with the patched MUSIC.LIB).
User avatar
Raziel
ScummVM Porter
Posts: 1517
Joined: Tue Oct 25, 2005 8:27 am
Location: a dying planet

Post by Raziel »

Hey Osprey,

i finally had the time to test and to see if i can get my music working and yes, after some strange stuff, it plays now in ScummVM.
Not the best MIDI pieces i've heard so far, but for the mood of the game they are fine, i guess.

I also tested your patch, of course, and, as far as i can tell, it does what it should do...except, one little thing. :-)

I found a bug in your patch!

Here's how to reproduce it.

1) Install any of the patched MUSIC.LIB's (instant repeat, after 20 secs, after 40 secs)
2) Start the game in ScummVM
3) Let the intro roll
4) After the "alley incident" there will be a second story pusher text displayed, which reads "Early the following morning on Baker Street..." and which should then disappear to show the second part of the intro. The one with the police constable.

Alas, it does not ;-)
The game will get stuck on displaying this text and won't continue, until i skip the whole second part of the intro, which is bad.

Here's what i found out.

- Exactly AFTER displaying the aforementioned text message, the ambient music should change (you can hear that correct behaviour with using the original MUSIC.LIB) from intro music part 1 to intro music part 2.
- But that never happens, instead, it repeats intro music part 1, over and over again, because you told it to do so with your patch ;-)
- One interesting thing is, that it does'nt matter which of your patched MUSIC.LIBs is installed. ALL of them will instantly repeat the intro music part 1, without waiting.

What i "guess" is happening here is (but that is just mho being no coder and such) that the game relies on that "exit music flag" you patched out. At least in this specific case.

That is probably also why it doesn't respect the pause you patched in.

I hope you can patch that bug too, would be nice.

Anyway, thanks a bunch for the patch
Osprey
Posts: 11
Joined: Fri Aug 25, 2017 7:31 pm

Post by Osprey »

Apparently, I forgot to check back here for over a month. Sorry that that I didn't get back to you sooner, Raziel.

Thanks for taking the time to test the patch and report the bug. Unfortunately, I can't reproduce it. The intro (including the constable scene) works fine in DOSBox and the intro ends early in ScummVM even with the original MUSIC.LIB. I recall someone saying that the intros plain don't work in ScummVM (regardless of my patch). How you are even getting to the alley scene? The intro goes straight from the opening carriage scene to the gameplay for me.
User avatar
Raziel
ScummVM Porter
Posts: 1517
Joined: Tue Oct 25, 2005 8:27 am
Location: a dying planet

Post by Raziel »

Oh?

I didn't know the intro has a problem in ScummVM...is there a bug tracker item for this?

Well...i let the intro roll, doing nothing,
Start the game in ScummVM and watch, it plays until the alley scene is over and the text window appears...


But if there is a bug in ScummVM playing the intro correctly et al than it's probably not your patch i accused wrongly, so sorry :-)

Edit: Just tried again and it plays the alley scene just fine, but on the next text window it's stuck

Do you get to see the complete carriage scene? Everything upto the drawing of the game's title?
Post Reply