Multimedia Exploration Journal: September 27, 2002

Okay, this media hacking hobby has clearly crossed the line from hobby -> obsession. I visited a bunch of used video game shops and purchased a total of 15 games today. I only bought one with the intention of actually playing it (MDK2 for the Sega Dreamcast).

The rest are for sample media. I picked up 3 more PS1 games. Don't even remember which ones, but they were cheap and the intro sequences (when I checked them at the store) looked MJPEG-like. Score. these will be good for testing when implementing a PSX STR decoder.

Sega CD Games

[Link: Multimedia samples from various Sega CD Games]

I became curious about SegaCD games. Many of these games predate the Sega Saturn by 1-2 years. Since the games came out so early in the interactive multimedia era, I hypothesized the CD-ROMs would be no-frills, mode 1/form 1 data CD-ROMs with ISO-9660 filesystems. I speculated that they might have FILM files and possibly Cinepak data like the games for their successor system, the Sega Saturn.

I purchased 4 used SegaCD games. Several of them tout TruVideo(TM). One of them mentions both TruVideo(TM) and Cinepak for Sega(TM). (Aside: Google search for "cinepak for sega" brings up my FILM document. Big help.) Anyway, I think it's safe to declare that those FILM files on Lemmings are no longer "deviant". 2 of these 4 games have FILM files that fit the same format deviations that the 3DO Lemmings files showed (abbreviated FDSC chunk with no audio info). These are just early FILM files. Hopefully, they all have the same audio format (22050 Hz, 8-bit, signed PCM).

Followup: These FILM files do not have the same audio format; they actually use sign/magnitude audio coding and at least one of the games uses a sample rate of 16 KHz.

As for the video codec, we finally see something other than 'cvid' as the video fourcc. These files all list either 'sega' or 'SEGA' as the codec. It definitely is not the same as the Cinepak we know and love. What is puzzling is that one of the games Cinepak as well as TruVideo as the technology used.

Followup: The Cinepak for Sega format appears to be a completely intra-coded format. Another thing to keep in mind was the limited capability of the Sega CD. It had a 12 MHz M68K CPU. Plus, it had a very limited number of colors to work with (still trying to figure out exactly how many). This probably helps to explain why they needed a custom version of Cinepak. So I'm trying to envision how the Cinepak concepts we know could possibly translate to an intra-coded video codec. It would not be plausible to transport a full vector codebook for each frame. The codebooks are likely hardcoded into the algorithm.

However, I have a big lead: There is a file on one of the Sega CD games called subplay.bin which appears to be the FILM decoding module. It even contains the string 'CINEPAK VER 1.2 Jo'. I found a very intelligent 68000 disassembler that took the file apart easily. Fortunately, the file is not very large (the binary is only about 5.5K). Unfortunately, I'm not completely convinced that it's the only component of the video decode subsystem. I think there might be another file. Another plus for the file is that they left a bunch of meaningful symbols in it: FilmOpen, FilmTask, FilmClose, InitWorld, AudioFeed, etc. Another minus is that none of the symbols mention video.

TruVideo is, in fact, a video compression technology company at http://www.truvideo.com. But they don't mention anything about this codec, naturally. Raiding the patent database did not yield anything useful, either.

Followup: I have written to TruVideo and they state they have no relationship with Sega.

The first game is Double Switch (MobyGames entry). Apparently the "sequel" to an infamously bad game named Night Trap. This game has a series of .sga files that are substantially large (and this is another "interactive movie"). I have not studied them too carefully, but I have noticed that the sizes of the files always line up on 256- (0x100-)byte boundaries.

[Link: SGA samples from Double Switch]

Dracula Unleashed (MobyGames entry), another TruVideo Product, like Double Switch. This one specifically mentions Cinepak for Sega on the back. This game uses the early FILM files.

[Link: Multimedia samples from Dracule Unleashed]

Ecco: The Tides of Time (MobyGames entry), a game based on Sega's dolphin video game character. It has several early FILM files.

The fourth game Bram Stoker's Dracula (MobyGames entry). It is published by Sony Imagesoft and developed by Psygnosis. It has a bunch of clearly marked video files (/video/*.vid). The files start with these 16 bytes:

    46 4F 52 4D  50 53 59 47  78 78 78 78  53 41 4E 4D  FORMPSYGxxxxSANM

From there, it is a chunked format with chunk names like SANM, SPAL, SAUD, and SBIT.

More information on the VID format can be found in "1-Hit Wonder" Formats.

[Link: Multimedia samples from Bram Stoker's Dracula]

PC Games

I also stopped at a bookstore that happens to sell used PC software. This is the score:

Quake II (MobyGames entry)

Id CINematic files: We already have this format down, I just wanted to enjoy the fruits of my labor and watch the rest of the movies. This is, after all, the only known piece of software that takes advantage of the Id CIN file format.

[Link: CIN samples Quake II]

Day of the Tentacle (MobyGames entry)

LucasArts game! For 1 dollar! I had heard that LucasArts titles used a custom media format. Unfortunately, I just learned that this game is too early to have used the format. However, I can still use the GPL'd ScummVM project to play the game under Linux.

Mad Dog McCree (MobyGames entry)

This is an Old West-themed shooting game, mostly FMV. Mad Dog McCree is spec'd to be able to run on at least a 16 MHz 286 PC (386 recommended). There are only a handful of files on the CD-ROM, but one is a 114 MB file called maddog.lib. If I were a guessing man, I would say that the first 0x2E bytes of the file are some sort of header followed immediately by a bunch of 8-bit unsigned PCM data. The manual states in the credits that the game runs with the help of PhotoMotion which is a trademark of IBM. Sure enough, the fourcc list specifies 'PHMO' as belonging to IBM PhotoMotion.

There are also 9 small (300-1000 bytes each) files with the extension .ani:

/mnt/cdrom/ammo.ani    /mnt/cdrom/gun.ani   /mnt/cdrom/knife.ani
/mnt/cdrom/bullet.ani  /mnt/cdrom/hat.ani   /mnt/cdrom/numbers.ani
/mnt/cdrom/clip.ani    /mnt/cdrom/hole.ani  /mnt/cdrom/shootout.ani

I'm developing a theory that these have information about how to play data inside the maddog.lib file. At any rate, this game is low on my priority list. It's interesting to note, however, that the credits list 2 people: 1 for programming and 1 for artwork.

The Daedalus Encounter (MobyGames entry)

Interactive movie type game starring Tia Carrere. IMDb entry. Ironically, it was just the other day that I unearthed an old CD-ROM that came with an ATI card long ago. It had a bunch of MPEG files, including a little trailer for this game. I couldn't believe the scenes they were showing. It reminded me of a kids' TV show, where there are real actors superimposed on cartoonish backgrounds, only considerably more violent.

Moving right along, there are 3 CD-ROMs to this game. The first disc contains the setup for both Windows and Mac. The manual keeps making reference to Quicktime technology so it is probably a Quicktime-based game.

However, I can't seem to find the movies or any other data files. All 3 discs will have movies/, images/ and sounds/ top-level directories. But check this out (dir is aliased to 'ls -al'):

[melanson@x-wing mnt]$ dir cdrom/
total 20
dr-xr-xr-x    1 root     root         2048 Mar 21  1995 .
drwxr-xr-x   12 root     root         4096 Sep  7 06:00 ..
dr-xr-xr-x    1 root     root         2048 Mar 21  1995 images
dr-xr-xr-x    1 root     root        10240 Mar 21  1995 movies
dr-xr-xr-x    1 root     root         2048 Mar 21  1995 sounds
[melanson@x-wing mnt]$ dir cdrom/movies/
total 12
dr-xr-xr-x    1 root     root        10240 Mar 21  1995 .
dr-xr-xr-x    1 root     root         2048 Mar 21  1995 ..
[melanson@x-wing mnt]$

The directories come up fine under Windows on the same PC and CD-ROM drive but not under Linux (v2.4.18 kernel). Anyway, the game is mostly Cinepak videos (pretty good quality) with PCM audio.

Descent II (MobyGames entry)

Interplay MVE multimedia files packaged in a simple resource format with the extension MVL.

[Link: Interplay MVE sample files]

Waterworld (MobyGames entry)

Based of the smash-hit (heh) Kevin Costner film, was also published by Interplay. Therefore, it might use Interplay MVE files. Sure enough, the CD-ROM has a movies/ directory at the top level populated with over 20 large .mve files. Investigation on this game is hereby complete.

[Link: Interplay MVE sample files]

7th Guest (MobyGames entry)

Mostly FMV, from what I remember. I also remember an article that explained that when 7th Guest was developed, there were no suitable software tools for the creation of the 3D environments and the tools needed to be designed in-house. It stands to reason that they might have needed to take the same approach with video coding.

by Mike Melanson (mike at multimedia.cx).

Multimedia Exploration Journal
Multimedia Research Institute Main Page