Of Geishas and AdLib music

As I mentioned in Part I of what I half-jokingly called my “yearly update”, Geisha was only missing two hard-coded minigames, so it was kind of a low-hanging fruit to get supported. Unfortunately, as happens very often with me, I didn’t actually finish implemented those minigames just then, turning instead to other projects of mine.

I did implement one of them, Diving, a month later. But the other one, Penetration, lingered in its unimplemented state for another 5 month. Until about two weeks ago, when the urge to finally have Geisha done became too great for me to handle. Which then lead to me actually working on the Gob engine again, and since last Saturday, Geisha is officially supported by the daily build of ScummVM (and will be in the coming ScummVM 1.5.0 release).

There was just one tiny thing still bothering me: The missing AdLib music, in MDY/TBR format (.mdy files containing the music score, .tbr files containing the instrument parameters). I’m a sucker for a good AdLib (and SID, MOD, ) tune.

Now, like Fascination, Geisha contains a PCM-based alternative, but it’s far from sounding as awesome as proper AdLib music. We did have some code intending to play those MDY files in the repository, but it was hopelessly broken. Moreover, this code and the ADL (a later Coktel Vision AdLib music file format) player’s was in a very shoddy and undocumented.

Therefore, I decided to just rewrite it completely, which I then did over the weekend. The result is a new working MDY player, a fixed glitch in the ADL player, and, maybe most importantly, clean and documented code for the Gob AdLib stuff.

And what is also very interesting is that I found out that the MDY/TBR format is in actuality the MUS/SND format — apparently created by Ad Lib as a more simple alternative to the ROL format. This format has been used in other, non-Coktel-Vision, games as well, so it might just be that it can be reused by potential future ScummVM engines.

Just shows how what you think is a straight-forward task can still surprise you. 🙂