Breaking Eggs And Making Omelettes

Topics On Multimedia Technology and Reverse Engineering


Archives:

V.Flash Format Experiments

December 27th, 2006 by Multimedia Mike

While babysitting the tedious resurrection processes of a number of Gentoo machines on life support, I took some time to put my money where my hypotheses were regarding the recently unearthed V.Disc multimedia formats. I lost. But you might be interested to see what I came up with anyway.

You can follow along with these experiments using these samples.

First up was investigating whether the video data inside the MJP files is just stock JPEG data, but byteswapped. Using the 101kw_movie.mjp file, I extracted the first chunk using the command:

dd if=101kw_movie.mjp of=101kw_movie-bs.jpg skip=76 count=26084 bs=1

I then byteswapped the data in the file with a random GPL’d byteswap utility I found. I will save you the trouble of the foregoing steps and show you the end results:


101kw

Other movies displayed similar results upon extracting the initial frame. My best theory to explain what might be going on here is that perhaps the JPEG data is not properly escaped. I remember reading that this is the case with THP files found on the Nintendo GameCube. After escaping the JPEG data from those files, it can be decoded with stock libjpeg code. The same may hold true for these files.

About those PTX files, I did a little digging and it seems that quite a few programs claim the PTX extension for their own purpose. More than a few use it for graphical purposes. I wrote a quick C program that loads an entire PTX file, treats it as a 512×256, RGB15, little-endian bitmap beyond the 44-byte header, and outputs the data to stdout as PNM data, in the NetPBM spirit:

ptxtopnm.c:

Running this program against some of the available samples (along with the appropriate NetPBM utilities) as such:

./ptxtopnm _113kw_pic.ptx | pnmtopng > _113kw_pic.png

yields the following 512×256 images:


113kw
_113kw_pic.png

114kw
_114kw_pic.png

So, I’m not sure what to make of this format either. But just for fun, I tried treating the data as a 256×512 image, which actually makes the parts line up a little better, though the end result doesn’t make much more sense:


113kw
_113kw_pic-tall.png

Posted in Game Hacking, Reverse Engineering, VTech V.Flash | 11 Comments »

11 Responses

  1. VAG Says:

    That’s really funny.

    Save every odd and even lines into separate files and you’ll get pair of perfect 512×128 pictures.

  2. Multimedia Mike Says:

    I bet this would make a lot more sense if I bought a V.Flash console and played this game.

  3. Multimedia Mike Says:

    I have thought about this a little more. It occurred to me that PTX could be a texture format that is optimized for rendering in whatever video hardware the V.Flash happens to use. Hardware optimization accounts for a lot of peculiarities in the multimedia field.

  4. VAG Says:

    Probably textures stored that way in respect to interlaced on-screen drawing (i.e. game itself running in interlaced mode) so this kind of “packing” makes some sense…

  5. Zach Stuart Says:

    Hi

    Upon loading the file _113kw_pic.ptx into hexedit (a mac hex-editor) I tried a ppc disassemble and i was surprised on how much of the data was valid ppc commands!

  6. Zach Stuart Says:

    Another thing I noticed in the hexeditor there seems to be a repeating pattern in the data almost like header data and footer data . Could this be a multi image per file format?

  7. Mentor3 Says:

    Came across your quandry about PTX files. I’ve been on a similar search today and discovered one claimant on PTX files is the firm RealLegal (LiveNote) which produces nicely full-text-indexed transcripts of court proceedings. They provide a tiny reader which you could download and use to open any questionable PTX file and rule in/out the possibility that it’s a court proceeding. (for what that’s worth)

    –Robert

  8. matt Says:

    I just saw an add for the v. motion, i can’t find any info on it, but i noticed these things are only $26 over at amazon

    http://www.amazon.com/VTech-V-Flash-Home-Edutainment-System/dp/B000EQHK2G/ref=sr_1_2?ie=UTF8&s=toys-and-games&qid=1229059888&sr=1-2

    thinking about getting one, and i was wondering if any more progress has been made?

  9. Multimedia Mike Says:

    Thanks for the tip. That’s pretty tempting. For the… you know… video game collectors, like me. :-)

  10. topbunkbedwetter Says:

    The cartridge sensor is a physical switch on the right front inside lip of the loading tray. Audio CD’s will still play when the switch is depressed- games however won’t load.

    Copied (CD-R) games will run with a spitball lodged in the notch sensor.

    The system won’t play MPG’s, MP3’s or VCD’s in either position.

  11. topbunkbedwetter Says:

    games however won’t load
    Won’t load unless it’s down, I meant.