Yearly Update, Part I: ScummVM

Well, it’s been a year since you’ve last heard from me, so I thought an update on what I’ve been doing is in order.
As this will be a tad longer, I’ll do that in two parts: This here first post will cover ScummVM-related things, while the next post will talk about eos (which you might not have heard about yet).

So, without further ado, let’s dive right into ScummVM with…

Urban Runner

Since my last post on Urban Runner, a lot has happened: The hotel lock-up has been fixed (thanks to SylvianTV), saving has been implemented and a handful of glitches has been stomped. As of ScummVM 1.3.0 (May 28, 2011), Urban Runner is fully working and supported.

If you watch the video, you can see one tiny remaining glitch: A few video frames are corrupt, filling the screen with garbage. Unfortunately, this is not exactly a bug in ScummVM, but the videos in the data files are really broken. When taking the raw Indeo3’d video data from these frames and decoding that using a vanilla Indeo3 decoder, it displays as garbage too. However, the decoder the game uses somehow “detects” where the frames are broken and just stop decoding that frame. If you run the original Urban Runner EXE, you can actually see that happening when the background noise stops moving for that one frame. So far, we have been unable to duplicate that detection so that it works for all cases and doesn’t break anything.

Another problem that showed later was that saving and loading didn’t work on the PSP. After investigating the issue, we found the cause: the number of file handles on the PSP is severely limited. Since I’m opening all manually open all archive files on startup — the CD detection script doesn’t work when all data files are in one directory and the NO_CD mode requires all data files to be present in CD1.ITK — this already maxed out the available file handles. Luckily, I was able to resolve that by not manually opening CD1.ITK; the scripts already open it, but I, wrongly, feared they might try to close and reopen it.


After Urban Runner was working, I started investigating the script opcodes needed for the Adi and Adibou (Addy and Addy Junior in German) educational games. Among them are opcodes to read string and integer values out of INI and xBase database files, for which I wrote quick loader classes. After a few days, I managed to get the environment CDs (which ship with each game to serve as a hub to start the individual lessons and provide some quick games to play in between) partially playable. With a lot of glitches, of course.

Most noticeable are the missing animations, but that’s far from being everything that’s missing.
Please note that it also only includes second generation Adibou games. Third generation ones are still completely unplayable (and actually use a different scripting language altogether, so support is questionable at best). And fourth and later generations are not even Gob, so completely out of scope for this ScummVM engine.


The next Coktel Vision game I’ve turned to is Geisha, an erotic puzzle adventure (or rather, a lot of puzzles embedded into a thin layer of adventuring). Under the hood, it’s very similar to Fascination, so it seemed like a low hanging fruit to finish. In fact, it is now already completable in ScummVM. The only thing missing is two hardcoded minigames, Diving and Penetration. I also already implemented about half of Diving; Penetration, however, is still completely unimplemented.

Still missing as well is a player for the AdLib music format MDY/TBR (the former containing the track, the latter the instrument definitions). Like in Fascination, there is exactly one MDY track in Geisha, the title music. And like in Fascination, there is a PCM-based alternative, which is normally played when there is no AdLib compatible sound card, and on the Atari ST. Right now, ScummVM always plays that alternative in both games, but it would be nice to have the AdLib music working too. Strangerke already started writing an MDY player, but it’s currently still not working properly.

Being an erotic adventure, it does feature full nudity. I’d like to keep this blog somewhat family-friendly, so I’m not embedding any videos or screenshots.

Dark Seed II

One game I did not make any real progress on is Dark Seed II. The scripts seem to work somehow differently to how I thought they would. Right now, they lock up in at least two places early on: when talking to the fortune teller and when entering the mirror labyrinth (both located on the carnival grounds). Moreover, I can’t seem to understand the numerical parameters accompanying a lot of the opcodes, and I’m not sure about the evaluation order of the different functions.

Likewise, the walking code is still wrong, as I can’t find the correct ways to evaluate the walkmap scaling parameter, and the character scaling factor. The algorithm I use is also probably not the optimal one for the provided walkmaps.

Nearly all the code (except the archive decompression) I have written is not based on reverse engineering, but educated guesses, and in those cases, I apparently guessed wrong and am not “educated” enough to guess correctly. To fix this, I will have to actually reverse the binary.

As an interesting side note, we found out that there is a Japanese Sega Saturn version of Dark Seed II. The archives are organized a bit differently, and the movies are Cinepak instead of MSVideo1 and Indeo3, but adding support for the former was easy and clone2727 already had a decoder for the latter, so the state of the version in ScummVM is similar to the DOS versions. The only missing features are proper line wrapping according to Japanese grammar rules (instead of just allowing wrapping after each character), the different dialog interface (the Japanese version plays more like a Japanese graphical novel) and the Saturn-specific music format. If anyone has any information on that music format, I’d be very much interested.

The Japanese Sega Saturn version of Dark Seed II

Update: Thanks to peres for informing me that the last character in each line was wrong (I can’t read Japanese, so I hadn’t noticed). It turned out to be a bug in my line trimming functions and is now fixed. The screenshot above has been changed to reflex the fix. For comparison, here’s the broken version.


2011 was a bit of a slow year for me when it comes to ScummVM. I fixed a few bugs, started a few things, but didn’t really finish anything (except for Urban Runner, but the lion’s share there was done in 2010).
I’ll talk more about what I’ve done in the other big project I was involved in in the next post.

One comment