{"id":2599,"date":"2010-07-14T20:55:55","date_gmt":"2010-07-15T03:55:55","guid":{"rendered":"http:\/\/multimedia.cx\/eggs\/?p=2599"},"modified":"2020-07-25T22:53:11","modified_gmt":"2020-07-26T05:53:11","slug":"brute-force-dimensional-analysis","status":"publish","type":"post","link":"https:\/\/multimedia.cx\/eggs\/brute-force-dimensional-analysis\/","title":{"rendered":"Brute Force Dimensional Analysis"},"content":{"rendered":"<p>I was poking at the data files of a really bad <em>(is there any other kind?)<\/em> interactive movie video game known simply by one letter: <a href=\"http:\/\/games.multimedia.cx\/d-the-game\/\"><em>D<\/em><\/a>. The Sega Saturn version of the game is comprised primarily of Sega FILM\/CPK files, <a href=\"http:\/\/wiki.multimedia.cx\/index.php?title=Sega_FILM\">about which I wrote the book<\/a>. The second most prolific file type bears the extension &#8216;.dg2&#8217;. Cursory examination of sample files revealed an apparently headerless format. Many of the video files are 288&#215;144 in resolution. Multiplying that width by that height and then doubling it (as in, 2 bytes\/pixel) yields 82944, which happens to be the size of a number of these DG2 files. Now, if only I had a tool that could take a suspected raw RGB file and convert it to a more standard image format.<\/p>\n<p>Here&#8217;s the <a href=\"http:\/\/ffmpeg.org\/\">FFmpeg<\/a> conversion recipe I used:<\/p>\n<pre>\r\n ffmpeg -f rawvideo -pix_fmt rgb555 -s 288x144 -i raw_file -y output.png\r\n<\/pre>\n<p>So that covers the files that are suspected to be 288&#215;144 in dimension. But what about other file sizes? My brute force approach was to try all possible dimensions that would yield a particular file size. The Python code for performing this operation is listed at the end of this post.<\/p>\n<p>It&#8217;s interesting to view the progression as the script compresses to different sizes:<\/p>\n<p><center><br \/>\n<img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/multimedia.cx\/eggs\/wp-content\/uploads\/2010\/07\/d-progression.png\" alt=\"\" title=\"D: The progression\" width=\"297\" height=\"355\" class=\"aligncenter size-full wp-image-2600\" srcset=\"https:\/\/multimedia.cx\/eggs\/wp-content\/uploads\/2010\/07\/d-progression.png 297w, https:\/\/multimedia.cx\/eggs\/wp-content\/uploads\/2010\/07\/d-progression-250x300.png 250w\" sizes=\"auto, (max-width: 297px) 100vw, 297px\" \/><br \/>\n<\/center><\/p>\n<p><a href=\"http:\/\/www.mobygames.com\/game\/d\">That &#8216;D&#8217; is supposed to be red<\/a>. So right away, we see that rgb555(le) is not the correct input format. Annoyingly, FFmpeg cannot handle rgb5[5|6]5be as a raw input format. But this little project worked well enough as a proof of concept.<\/p>\n<p>If you want to toy around with these files (and I know you do), I have uploaded a selection at: <a href=\"http:\/\/multimedia.cx\/dg2\/\">http:\/\/multimedia.cx\/dg2\/<\/a>.<\/p>\n<p>Here is my quick Python script for converting one of these files to every acceptable resolution.<\/p>\n<p>work-out-resolution.py:<br \/>\n<!--more--><br \/>\n<script src=\"https:\/\/gist.github.com\/multimediamike\/aee35eb93e3c014d4c5a67d2e23a90a7.js\"><\/script><\/p>\n","protected":false},"excerpt":{"rendered":"<p>I was poking at the data files of a really bad (is there any other kind?) interactive movie video game known simply by one letter: D. The Sega Saturn version of the game is comprised primarily of Sega FILM\/CPK files, about which I wrote the book. The second most prolific file type bears the extension [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[29,55],"tags":[],"class_list":["post-2599","post","type-post","status-publish","format-standard","hentry","category-game-hacking","category-python"],"aioseo_notices":[],"aioseo_head":"\n\t\t<!-- All in One SEO 4.9.10 - aioseo.com -->\n\t<meta name=\"description\" content=\"I was poking at the data files of a really bad (is there any other kind?) interactive movie video game known simply by one letter: D. The Sega Saturn version of the game is comprised primarily of Sega FILM\/CPK files, about which I wrote the book. The second most prolific file type bears the extension\" \/>\n\t<meta name=\"robots\" content=\"max-image-preview:large\" \/>\n\t<meta name=\"author\" content=\"Multimedia Mike\"\/>\n\t<link rel=\"canonical\" href=\"https:\/\/multimedia.cx\/eggs\/brute-force-dimensional-analysis\/\" \/>\n\t<meta name=\"generator\" content=\"All in One SEO (AIOSEO) 4.9.10\" \/>\n\t\t<meta property=\"og:locale\" content=\"en_US\" \/>\n\t\t<meta property=\"og:site_name\" content=\"Breaking Eggs And Making Omelettes | Topics On Multimedia Technology and Reverse Engineering\" \/>\n\t\t<meta property=\"og:type\" content=\"article\" \/>\n\t\t<meta property=\"og:title\" content=\"Brute Force Dimensional Analysis | Breaking Eggs And Making Omelettes\" \/>\n\t\t<meta property=\"og:description\" content=\"I was poking at the data files of a really bad (is there any other kind?) interactive movie video game known simply by one letter: D. The Sega Saturn version of the game is comprised primarily of Sega FILM\/CPK files, about which I wrote the book. The second most prolific file type bears the extension\" \/>\n\t\t<meta property=\"og:url\" content=\"https:\/\/multimedia.cx\/eggs\/brute-force-dimensional-analysis\/\" \/>\n\t\t<meta property=\"article:published_time\" content=\"2010-07-15T03:55:55+00:00\" \/>\n\t\t<meta property=\"article:modified_time\" content=\"2020-07-26T05:53:11+00:00\" \/>\n\t\t<meta name=\"twitter:card\" content=\"summary\" \/>\n\t\t<meta name=\"twitter:title\" content=\"Brute Force Dimensional Analysis | Breaking Eggs And Making Omelettes\" \/>\n\t\t<meta name=\"twitter:description\" content=\"I was poking at the data files of a really bad (is there any other kind?) interactive movie video game known simply by one letter: D. The Sega Saturn version of the game is comprised primarily of Sega FILM\/CPK files, about which I wrote the book. The second most prolific file type bears the extension\" \/>\n\t\t<script type=\"application\/ld+json\" class=\"aioseo-schema\">\n\t\t\t{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/multimedia.cx\\\/eggs\\\/brute-force-dimensional-analysis\\\/#article\",\"name\":\"Brute Force Dimensional Analysis | Breaking Eggs And Making Omelettes\",\"headline\":\"Brute Force Dimensional Analysis\",\"author\":{\"@id\":\"https:\\\/\\\/multimedia.cx\\\/eggs\\\/author\\\/multimedia-mike\\\/#author\"},\"publisher\":{\"@id\":\"https:\\\/\\\/multimedia.cx\\\/eggs\\\/#organization\"},\"image\":{\"@type\":\"ImageObject\",\"url\":\"https:\\\/\\\/multimedia.cx\\\/eggs\\\/wp-content\\\/uploads\\\/2010\\\/07\\\/d-progression.png\",\"@id\":\"https:\\\/\\\/multimedia.cx\\\/eggs\\\/brute-force-dimensional-analysis\\\/#articleImage\",\"width\":297,\"height\":355},\"datePublished\":\"2010-07-14T20:55:55-07:00\",\"dateModified\":\"2020-07-25T22:53:11-07:00\",\"inLanguage\":\"en-US\",\"commentCount\":13,\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/multimedia.cx\\\/eggs\\\/brute-force-dimensional-analysis\\\/#webpage\"},\"isPartOf\":{\"@id\":\"https:\\\/\\\/multimedia.cx\\\/eggs\\\/brute-force-dimensional-analysis\\\/#webpage\"},\"articleSection\":\"Game Hacking, Python\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/multimedia.cx\\\/eggs\\\/brute-force-dimensional-analysis\\\/#breadcrumblist\",\"itemListElement\":[{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/multimedia.cx\\\/eggs#listItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/multimedia.cx\\\/eggs\",\"nextItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/multimedia.cx\\\/eggs\\\/category\\\/game-hacking\\\/#listItem\",\"name\":\"Game Hacking\"}},{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/multimedia.cx\\\/eggs\\\/category\\\/game-hacking\\\/#listItem\",\"position\":2,\"name\":\"Game Hacking\",\"item\":\"https:\\\/\\\/multimedia.cx\\\/eggs\\\/category\\\/game-hacking\\\/\",\"nextItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/multimedia.cx\\\/eggs\\\/brute-force-dimensional-analysis\\\/#listItem\",\"name\":\"Brute Force Dimensional Analysis\"},\"previousItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/multimedia.cx\\\/eggs#listItem\",\"name\":\"Home\"}},{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/multimedia.cx\\\/eggs\\\/brute-force-dimensional-analysis\\\/#listItem\",\"position\":3,\"name\":\"Brute Force Dimensional Analysis\",\"previousItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/multimedia.cx\\\/eggs\\\/category\\\/game-hacking\\\/#listItem\",\"name\":\"Game Hacking\"}}]},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/multimedia.cx\\\/eggs\\\/#organization\",\"name\":\"Breaking Eggs And Making Omelettes\",\"description\":\"Topics On Multimedia Technology and Reverse Engineering\",\"url\":\"https:\\\/\\\/multimedia.cx\\\/eggs\\\/\"},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/multimedia.cx\\\/eggs\\\/author\\\/multimedia-mike\\\/#author\",\"url\":\"https:\\\/\\\/multimedia.cx\\\/eggs\\\/author\\\/multimedia-mike\\\/\",\"name\":\"Multimedia Mike\",\"image\":{\"@type\":\"ImageObject\",\"@id\":\"https:\\\/\\\/multimedia.cx\\\/eggs\\\/brute-force-dimensional-analysis\\\/#authorImage\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/2eb93f7cada658f7986b5092062849fa255779eada3342c8f6b9a40764b95fdd?s=96&d=identicon&r=g\",\"width\":96,\"height\":96,\"caption\":\"Multimedia Mike\"}},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/multimedia.cx\\\/eggs\\\/brute-force-dimensional-analysis\\\/#webpage\",\"url\":\"https:\\\/\\\/multimedia.cx\\\/eggs\\\/brute-force-dimensional-analysis\\\/\",\"name\":\"Brute Force Dimensional Analysis | Breaking Eggs And Making Omelettes\",\"description\":\"I was poking at the data files of a really bad (is there any other kind?) interactive movie video game known simply by one letter: D. The Sega Saturn version of the game is comprised primarily of Sega FILM\\\/CPK files, about which I wrote the book. The second most prolific file type bears the extension\",\"inLanguage\":\"en-US\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/multimedia.cx\\\/eggs\\\/#website\"},\"breadcrumb\":{\"@id\":\"https:\\\/\\\/multimedia.cx\\\/eggs\\\/brute-force-dimensional-analysis\\\/#breadcrumblist\"},\"author\":{\"@id\":\"https:\\\/\\\/multimedia.cx\\\/eggs\\\/author\\\/multimedia-mike\\\/#author\"},\"creator\":{\"@id\":\"https:\\\/\\\/multimedia.cx\\\/eggs\\\/author\\\/multimedia-mike\\\/#author\"},\"datePublished\":\"2010-07-14T20:55:55-07:00\",\"dateModified\":\"2020-07-25T22:53:11-07:00\"},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/multimedia.cx\\\/eggs\\\/#website\",\"url\":\"https:\\\/\\\/multimedia.cx\\\/eggs\\\/\",\"name\":\"Breaking Eggs And Making Omelettes\",\"description\":\"Topics On Multimedia Technology and Reverse Engineering\",\"inLanguage\":\"en-US\",\"publisher\":{\"@id\":\"https:\\\/\\\/multimedia.cx\\\/eggs\\\/#organization\"}}]}\n\t\t<\/script>\n\t\t<!-- All in One SEO -->\n\n","aioseo_head_json":{"title":"Brute Force Dimensional Analysis | Breaking Eggs And Making Omelettes","description":"I was poking at the data files of a really bad (is there any other kind?) interactive movie video game known simply by one letter: D. The Sega Saturn version of the game is comprised primarily of Sega FILM\/CPK files, about which I wrote the book. The second most prolific file type bears the extension","canonical_url":"https:\/\/multimedia.cx\/eggs\/brute-force-dimensional-analysis\/","robots":"max-image-preview:large","keywords":"","webmasterTools":{"miscellaneous":""},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/multimedia.cx\/eggs\/brute-force-dimensional-analysis\/#article","name":"Brute Force Dimensional Analysis | Breaking Eggs And Making Omelettes","headline":"Brute Force Dimensional Analysis","author":{"@id":"https:\/\/multimedia.cx\/eggs\/author\/multimedia-mike\/#author"},"publisher":{"@id":"https:\/\/multimedia.cx\/eggs\/#organization"},"image":{"@type":"ImageObject","url":"https:\/\/multimedia.cx\/eggs\/wp-content\/uploads\/2010\/07\/d-progression.png","@id":"https:\/\/multimedia.cx\/eggs\/brute-force-dimensional-analysis\/#articleImage","width":297,"height":355},"datePublished":"2010-07-14T20:55:55-07:00","dateModified":"2020-07-25T22:53:11-07:00","inLanguage":"en-US","commentCount":13,"mainEntityOfPage":{"@id":"https:\/\/multimedia.cx\/eggs\/brute-force-dimensional-analysis\/#webpage"},"isPartOf":{"@id":"https:\/\/multimedia.cx\/eggs\/brute-force-dimensional-analysis\/#webpage"},"articleSection":"Game Hacking, Python"},{"@type":"BreadcrumbList","@id":"https:\/\/multimedia.cx\/eggs\/brute-force-dimensional-analysis\/#breadcrumblist","itemListElement":[{"@type":"ListItem","@id":"https:\/\/multimedia.cx\/eggs#listItem","position":1,"name":"Home","item":"https:\/\/multimedia.cx\/eggs","nextItem":{"@type":"ListItem","@id":"https:\/\/multimedia.cx\/eggs\/category\/game-hacking\/#listItem","name":"Game Hacking"}},{"@type":"ListItem","@id":"https:\/\/multimedia.cx\/eggs\/category\/game-hacking\/#listItem","position":2,"name":"Game Hacking","item":"https:\/\/multimedia.cx\/eggs\/category\/game-hacking\/","nextItem":{"@type":"ListItem","@id":"https:\/\/multimedia.cx\/eggs\/brute-force-dimensional-analysis\/#listItem","name":"Brute Force Dimensional Analysis"},"previousItem":{"@type":"ListItem","@id":"https:\/\/multimedia.cx\/eggs#listItem","name":"Home"}},{"@type":"ListItem","@id":"https:\/\/multimedia.cx\/eggs\/brute-force-dimensional-analysis\/#listItem","position":3,"name":"Brute Force Dimensional Analysis","previousItem":{"@type":"ListItem","@id":"https:\/\/multimedia.cx\/eggs\/category\/game-hacking\/#listItem","name":"Game Hacking"}}]},{"@type":"Organization","@id":"https:\/\/multimedia.cx\/eggs\/#organization","name":"Breaking Eggs And Making Omelettes","description":"Topics On Multimedia Technology and Reverse Engineering","url":"https:\/\/multimedia.cx\/eggs\/"},{"@type":"Person","@id":"https:\/\/multimedia.cx\/eggs\/author\/multimedia-mike\/#author","url":"https:\/\/multimedia.cx\/eggs\/author\/multimedia-mike\/","name":"Multimedia Mike","image":{"@type":"ImageObject","@id":"https:\/\/multimedia.cx\/eggs\/brute-force-dimensional-analysis\/#authorImage","url":"https:\/\/secure.gravatar.com\/avatar\/2eb93f7cada658f7986b5092062849fa255779eada3342c8f6b9a40764b95fdd?s=96&d=identicon&r=g","width":96,"height":96,"caption":"Multimedia Mike"}},{"@type":"WebPage","@id":"https:\/\/multimedia.cx\/eggs\/brute-force-dimensional-analysis\/#webpage","url":"https:\/\/multimedia.cx\/eggs\/brute-force-dimensional-analysis\/","name":"Brute Force Dimensional Analysis | Breaking Eggs And Making Omelettes","description":"I was poking at the data files of a really bad (is there any other kind?) interactive movie video game known simply by one letter: D. The Sega Saturn version of the game is comprised primarily of Sega FILM\/CPK files, about which I wrote the book. The second most prolific file type bears the extension","inLanguage":"en-US","isPartOf":{"@id":"https:\/\/multimedia.cx\/eggs\/#website"},"breadcrumb":{"@id":"https:\/\/multimedia.cx\/eggs\/brute-force-dimensional-analysis\/#breadcrumblist"},"author":{"@id":"https:\/\/multimedia.cx\/eggs\/author\/multimedia-mike\/#author"},"creator":{"@id":"https:\/\/multimedia.cx\/eggs\/author\/multimedia-mike\/#author"},"datePublished":"2010-07-14T20:55:55-07:00","dateModified":"2020-07-25T22:53:11-07:00"},{"@type":"WebSite","@id":"https:\/\/multimedia.cx\/eggs\/#website","url":"https:\/\/multimedia.cx\/eggs\/","name":"Breaking Eggs And Making Omelettes","description":"Topics On Multimedia Technology and Reverse Engineering","inLanguage":"en-US","publisher":{"@id":"https:\/\/multimedia.cx\/eggs\/#organization"}}]},"og:locale":"en_US","og:site_name":"Breaking Eggs And Making Omelettes | Topics On Multimedia Technology and Reverse Engineering","og:type":"article","og:title":"Brute Force Dimensional Analysis | Breaking Eggs And Making Omelettes","og:description":"I was poking at the data files of a really bad (is there any other kind?) interactive movie video game known simply by one letter: D. The Sega Saturn version of the game is comprised primarily of Sega FILM\/CPK files, about which I wrote the book. The second most prolific file type bears the extension","og:url":"https:\/\/multimedia.cx\/eggs\/brute-force-dimensional-analysis\/","article:published_time":"2010-07-15T03:55:55+00:00","article:modified_time":"2020-07-26T05:53:11+00:00","twitter:card":"summary","twitter:title":"Brute Force Dimensional Analysis | Breaking Eggs And Making Omelettes","twitter:description":"I was poking at the data files of a really bad (is there any other kind?) interactive movie video game known simply by one letter: D. The Sega Saturn version of the game is comprised primarily of Sega FILM\/CPK files, about which I wrote the book. The second most prolific file type bears the extension"},"aioseo_meta_data":{"post_id":"2599","title":null,"description":null,"keywords":null,"keyphrases":null,"primary_term":null,"canonical_url":null,"og_title":null,"og_description":null,"og_object_type":"default","og_image_type":"default","og_image_url":null,"og_image_width":null,"og_image_height":null,"og_image_custom_url":null,"og_image_custom_fields":null,"og_video":null,"og_custom_url":null,"og_article_section":null,"og_article_tags":null,"twitter_use_og":false,"twitter_card":"default","twitter_image_type":"default","twitter_image_url":null,"twitter_image_custom_url":null,"twitter_image_custom_fields":null,"twitter_title":null,"twitter_description":null,"schema":{"blockGraphs":[],"customGraphs":[],"default":{"data":{"Article":[],"Course":[],"Dataset":[],"FAQPage":[],"Movie":[],"Person":[],"Product":[],"ProductReview":[],"Car":[],"Recipe":[],"Service":[],"SoftwareApplication":[],"WebPage":[]},"graphName":"","isEnabled":true},"graphs":[]},"schema_type":null,"schema_type_options":null,"pillar_content":false,"robots_default":true,"robots_noindex":false,"robots_noarchive":false,"robots_nosnippet":false,"robots_nofollow":false,"robots_noimageindex":false,"robots_noodp":false,"robots_notranslate":false,"robots_max_snippet":null,"robots_max_videopreview":null,"robots_max_imagepreview":"large","priority":null,"frequency":null,"location":null,"local_seo":null,"breadcrumb_settings":null,"limit_modified_date":false,"ai":null,"created":"2020-12-31 21:55:31","updated":"2025-12-31 19:32:03","seo_analyzer_scan_date":null},"aioseo_breadcrumb":"<div class=\"aioseo-breadcrumbs\"><span class=\"aioseo-breadcrumb\">\n\t\t\t<a href=\"https:\/\/multimedia.cx\/eggs\" title=\"Home\">Home<\/a>\n\t\t<\/span><span class=\"aioseo-breadcrumb-separator\">&raquo;<\/span><span class=\"aioseo-breadcrumb\">\n\t\t\t<a href=\"https:\/\/multimedia.cx\/eggs\/category\/game-hacking\/\" title=\"Game Hacking\">Game Hacking<\/a>\n\t\t<\/span><span class=\"aioseo-breadcrumb-separator\">&raquo;<\/span><span class=\"aioseo-breadcrumb\">\n\t\t\tBrute Force Dimensional Analysis\n\t\t<\/span><\/div>","aioseo_breadcrumb_json":[{"label":"Home","link":"https:\/\/multimedia.cx\/eggs"},{"label":"Game Hacking","link":"https:\/\/multimedia.cx\/eggs\/category\/game-hacking\/"},{"label":"Brute Force Dimensional Analysis","link":"https:\/\/multimedia.cx\/eggs\/brute-force-dimensional-analysis\/"}],"_links":{"self":[{"href":"https:\/\/multimedia.cx\/eggs\/wp-json\/wp\/v2\/posts\/2599","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=2599"}],"version-history":[{"count":8,"href":"https:\/\/multimedia.cx\/eggs\/wp-json\/wp\/v2\/posts\/2599\/revisions"}],"predecessor-version":[{"id":4604,"href":"https:\/\/multimedia.cx\/eggs\/wp-json\/wp\/v2\/posts\/2599\/revisions\/4604"}],"wp:attachment":[{"href":"https:\/\/multimedia.cx\/eggs\/wp-json\/wp\/v2\/media?parent=2599"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/multimedia.cx\/eggs\/wp-json\/wp\/v2\/categories?post=2599"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/multimedia.cx\/eggs\/wp-json\/wp\/v2\/tags?post=2599"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}