December 31st, 2005 by
Multimedia Mike
A fellow multimedia hacker, Benjamin L., pointed out that a reverse engineer might find some odd numbers in data tables while poking through binary codecs. For example, 0xbaadc0de and 0xdeadbeef. Sense of humor? Certainly. But why would such nonsense values be there? That is a question worth exploring. They sometimes turn up in codec data tables. Dead spots? Don’t-care values? Strange.
Posted in Reverse Engineering |
No Comments »
December 30th, 2005 by
Multimedia Mike
I missed out on any kind of compiler theory course during my time in academia. Add that to the list of topics I would like to study and comprehend someday (along with 3D graphics and artificial intelligence).
The MultiEx Commander program uses a simple, custom scripting language to interpret game resource archive formats (a.k.a. GRAFs). Why do I care? Because these GRAF files often carry lots of FMV files that I want to separate and study invidually. This is a script that takes apart the BIFF (.bif) GRAF files from Baldur’s Gate:
IDString 0 BIFFV1 ;
Get DUMMYL Int 0 ;
SavePos FILESTART 0 ;
Get FILECNTL Long 0 ;
Math FILESTART += 16 ;
Do ;
GoTo FILESTART 0 ;
Get FILEOFF Long 0 ;
Get FILESIZE Long 0 ;
Math FILESTART += 16 ;
Log FILENAME FILEOFF FILESIZE 0 0 ;
Math EXTRCNT += 1 ;
While EXTRCNT <> FILECNTL ;
That script was taken from the XentaxWiki entry for BIF. Plenty more sample scripts are available on that Wiki.
Who can tell me the best approach to writing a program that can interpret scripts like the one shown above? Something tells me that full-fledged compiler theory is overkill for this type of application. It looks like the language was designed to be parsed in a fairly braindead virtual machine. But that’s just my best, uneducated guess.
Update: I am working on a BMS language spec in the XentaxWiki.
Posted in General |
4 Comments »
December 29th, 2005 by
Multimedia Mike
Remember The 7th Guest, one of the original FMV-based computer games?

screenshot courtesy of MobyGames
Watto has reverse engineered both the resource format (GJD) and FMV format (VDX). I will try to extract some VDX samples and post them soon in case anyone wants a closer look at this format.
Posted in Reverse Engineering |
No Comments »
December 28th, 2005 by
Multimedia Mike
I have been working on this little by little but I think I am finally ready to announce that I have set up a MultimediaWiki. Originally, I wanted to create some kind of database-driven website that could supplant the useful yet infrequently-updated FOURCC list. Plus, I wanted to link to samples, document audio identifiers, and the feature wish list just grew whenever I brainstormed on the idea.

Then I started warming up to the idea of Wiki or, as I like to call it, “the poor man’s content management system”. I have started out with several major categories such as video codec list, audio codec list, container list, and company list. But there are other categories that we might come up with (I am thinking about tracking patents with this system).
I also want this Wiki to somehow supplant my page on undiscovered codecs. I think Wiki categories are the feature that are supposed to facilitate this.
One more activity I wish to promote with this Wiki project is distributed reverse engineering and documentation. To that end, I have started a page called Understanding AAC which will document the bitstream parsing and reconstruction processes for the AAC audio codec that the community will be able to use.
So, what more can I tell you? Get contributing and we’ll see if we can make this idea fly.
Posted in Open Source Multimedia |
3 Comments »
December 24th, 2005 by
Multimedia Mike
I updated the AVS format document today. VAG and I believe it to be correct. But we won’t know for sure until something (maybe me, maybe someone else) creates a fresh implementation based on the information.
Posted in Open Source Multimedia |
2 Comments »
December 23rd, 2005 by
Multimedia Mike
After hashing it out with Trixter in the comments of the previous post, I have seen the light regarding the Sound Blaster frequency divisor. This should be the correct formula:
frequency = 1000000 / (256 - sample_rate_divisor)
sample_rate_divisor should be treated as an unsigned quantity (0..255). Thus, as the divisor runs from 0 -> 255, the total divisor will get smaller and the output frequency will be higher. The low end is 3921 Hz and the high end is 1000000 Hz, though frequencies above 45454 Hz (divisor 234/0xEA) are unsupported by the original Sound Blaster DAC hardware.
The reason the other formula appeared to work along with the signed sample rate is that key divisors yielded similar numbers. For example, for actual sample .VOC files I have collected from various games:
Signed divisor formula:
divisor = -47 (0xD1), frequency = 21532
divisor = -45 (0xD3), frequency = 22478
Unsigned divisor formula:
divisor = 209 (0xD1), frequency = 21276
divisor = 211 (0xD3), frequency = 22222
Pretty close. The unsigned divisor formula yields the trademark “weird” SB frequencies like 22222 Hz. Plus, the unsigned formula is able to accommodate much lower frequencies.
One last point of closure: I always thought the certain weird frequencies common in the early days of PC multimedia such as 11127 Hz and 22254 Hz were artifacts of the original Sound Blaster hardware. It turns out that they were the result of Apple Macintosh hardware. Thanks to Trixter for pointing me to this page on the subject.
Posted in General |
No Comments »
December 19th, 2005 by
Multimedia Mike
Remember when the original Creative Labs Sound Blaster was released? It was quite revolutionary for PC audio at the time since it was basically a stock AdLib FM synthesizer card and but with an 8-bit, monophonic digital to audio converter (DAC) that could output raw PCM data.

One of the more curious artifacts of the original Sound Blaster is the frequency divisor used to initialize the DAC for PCM playback.
Read the rest of this entry »
Posted in General |
4 Comments »
December 18th, 2005 by
Multimedia Mike
Vladimir “VAG” Gneushev has uncovered the world’s simplest vector quantizer codec. An FMV format named AVS was used in a 1994 CD-ROM title called Creature Shock. Intraframes carry a vector codebook and vector map; interframes also carry a change map. The audio chunks are actually Creative VOC chunks. Complete details are here.
The strangest thing about this particular VQ codec is that the vectors can have a dimension of 3. For example, the intraframes are comprised of 3×3 pixel vectors. 3 is not divisible by many common video frame resolutions. This game ran on IBM VGAs in 320x200x256 color mode. But the resolution of the movies was actually 318×198. Look carefully at a screenshot from the game:

screenshot courtesy of MobyGames
The top row, bottom row, and 2 right columns are all left undrawn.
So, who wants to implement this format first? If the inspiration strikes you, here are some sample files.
Posted in Game Hacking, Reverse Engineering, Vector Quantization |
1 Comment »
December 17th, 2005 by
Multimedia Mike
Since no one is quite sure when or if MPlayer’s samples archive will go back online, I am populating my own personal samples archive. I am trying to place online a decent selection of samples that are each, at most 4 megabytes. I think my bandwidth and disk capacity are a little more restricted than that of MPlayer.
Naturally, I am starting the collection with a sampling of obscure game-oriented FMV formats.
Posted in General |
No Comments »
December 15th, 2005 by
Multimedia Mike
Serge van den Boom informs me that he has written a Linux filesystem driver for the Opera filesystem. This is the filesystem that was used for CD-ROMs that played in the 3DO video game console.

I am so very jealous. I have wanted to write the filesystem driver for as long as I have been investigating old multimedia. No matter; the important thing is that the work is done. Now I have a backlog of at least 9 3DO games that I need to investigate. I am most curious to know if the 3DO port of Wing Commander III used the same custom FMV format and video codec as its PC counterpart.
Posted in Open Source Multimedia |
3 Comments »