{"id":372,"date":"2006-12-27T15:24:20","date_gmt":"2006-12-27T23:24:20","guid":{"rendered":"http:\/\/multimedia.cx\/eggs\/vflash-format-experiments\/"},"modified":"2020-07-25T23:38:37","modified_gmt":"2020-07-26T06:38:37","slug":"vflash-format-experiments","status":"publish","type":"post","link":"https:\/\/multimedia.cx\/eggs\/vflash-format-experiments\/","title":{"rendered":"V.Flash Format Experiments"},"content":{"rendered":"<p>While babysitting the tedious resurrection processes of a number of <a href=\"http:\/\/multimedia.cx\/eggs\/youre-dead-to-me-gentoo\/\">Gentoo machines on life support<\/a>, I took some time to put my money where my hypotheses were regarding the recently unearthed <a href=\"http:\/\/multimedia.cx\/eggs\/vdisc-analysis\/\">V.Disc multimedia formats<\/a>. I lost. But you might be interested to see what I came up with anyway.<\/p>\n<p><!--more--><\/p>\n<p>You can follow along with these experiments using <a href=\"http:\/\/samples.mplayerhq.hu\/game-formats\/vdisc\/\">these samples<\/a>.<\/p>\n<p>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:<\/p>\n<blockquote><p>\ndd if=101kw_movie.mjp of=101kw_movie-bs.jpg skip=76 count=26084 bs=1\n<\/p><\/blockquote>\n<p>I then byteswapped the data in the file with a random GPL&#8217;d byteswap utility I found. I will save you the trouble of the foregoing steps and show you the end results:<\/p>\n<p><center><br \/>\n<img decoding=\"async\" src=\"\/eggs\/images\/101kw_movie.jpg\" alt=\"101kw\" \/><br \/>\n<\/center><\/p>\n<p>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 <a href=\"http:\/\/wiki.multimedia.cx\/index.php?title=THP\">THP files<\/a> 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.<\/p>\n<p>About those PTX files, I did a little digging and it seems that <a href=\"http:\/\/filext.com\/detaillist.php?extdetail=PTX\">quite a few programs claim the PTX extension<\/a> 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&#215;256, RGB15, little-endian bitmap beyond the 44-byte header, and outputs the data to stdout as PNM data, in <a href=\"http:\/\/netpbm.sourceforge.net\/\">the NetPBM spirit<\/a>:<\/p>\n<p>ptxtopnm.c:<br \/>\n<script src=\"https:\/\/gist.github.com\/multimediamike\/350ad7674e3e1378b5906d86f37ceda9.js\"><\/script><\/p>\n<p>Running this program against some of the available samples (along with the appropriate NetPBM utilities) as such:<\/p>\n<p>.\/ptxtopnm _113kw_pic.ptx | pnmtopng > _113kw_pic.png<\/p>\n<p>yields the following 512&#215;256 images:<\/p>\n<p><center><br \/>\n<img decoding=\"async\" src=\"\/eggs\/images\/_113kw_pic.png\" alt=\"113kw\" \/><br \/>\n<em>_113kw_pic.png<\/em><\/p>\n<p><img decoding=\"async\" src=\"\/eggs\/images\/_114kw_pic.png\" alt=\"114kw\" \/><br \/>\n<em>_114kw_pic.png<\/em><br \/>\n<\/center><\/p>\n<p>So, I&#8217;m not sure what to make of this format either. But just for fun, I tried treating the data as a 256&#215;512 image, which actually makes the parts line up a little better, though the end result doesn&#8217;t make much more sense:<\/p>\n<p><center><br \/>\n<img decoding=\"async\" src=\"\/eggs\/images\/_113kw_pic-tall.png\" alt=\"113kw\" \/><br \/>\n<em>_113kw_pic-tall.png<\/em><br \/>\n<\/center><\/p>\n","protected":false},"excerpt":{"rendered":"<p>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.<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[29,4,31],"tags":[],"class_list":["post-372","post","type-post","status-publish","format-standard","hentry","category-game-hacking","category-reverse-engineering","category-vtech-vflash"],"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/multimedia.cx\/eggs\/wp-json\/wp\/v2\/posts\/372","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/multimedia.cx\/eggs\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/multimedia.cx\/eggs\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/multimedia.cx\/eggs\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/multimedia.cx\/eggs\/wp-json\/wp\/v2\/comments?post=372"}],"version-history":[{"count":2,"href":"https:\/\/multimedia.cx\/eggs\/wp-json\/wp\/v2\/posts\/372\/revisions"}],"predecessor-version":[{"id":4633,"href":"https:\/\/multimedia.cx\/eggs\/wp-json\/wp\/v2\/posts\/372\/revisions\/4633"}],"wp:attachment":[{"href":"https:\/\/multimedia.cx\/eggs\/wp-json\/wp\/v2\/media?parent=372"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/multimedia.cx\/eggs\/wp-json\/wp\/v2\/categories?post=372"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/multimedia.cx\/eggs\/wp-json\/wp\/v2\/tags?post=372"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}