{"id":226,"date":"2006-03-18T15:08:18","date_gmt":"2006-03-18T23:08:18","guid":{"rendered":"http:\/\/multimedia.cx\/eggs\/?p=226"},"modified":"2006-03-18T15:20:42","modified_gmt":"2006-03-18T23:20:42","slug":"xan-binary-decoding","status":"publish","type":"post","link":"https:\/\/multimedia.cx\/eggs\/xan-binary-decoding\/","title":{"rendered":"Xan Binary Decoding"},"content":{"rendered":"<p>In the time-honored tradition of avoiding real work, I made an extension to <a href=\"http:\/\/www.xinehq.de\/\">xine<\/a> that will decode <a href=\"http:\/\/wiki.multimedia.cx\/index.php?title=Origin_Xan_Codec\">Origin&#8217;s Xan codec<\/a> (FourCC: Xxan). This is despite my long-standing policy that I will not invest any effort into making open source programs leverage closed, binary code in order to decode data.<\/p>\n<p><center><br \/>\n<img decoding=\"async\" src=\"\/eggs\/images\/wc4-title.jpg\" alt=\"Wing Commander IV Title\" \/><br \/>\n<\/center><\/p>\n<p>I have no intention of committing it to the xine codebase because, really, who cares? But let&#8217;s see <a href=\"http:\/\/www.mplayerhq.hu\/\">MPlayer<\/a> decode Xan data! Ha! <em>Oh, why do I provoke them so? They&#8217;re going to have a workable decoder 20 minutes after I post this.<\/em><\/p>\n<p>If you care, I posted the xine plugin code here: <a href=\"http:\/\/multimedia.cx\/xan\/\">http:\/\/multimedia.cx\/xan\/<\/a>. This is based on <a href=\"http:\/\/wcrevival.de\/hcl\/\">M\u00e1rio Brito&#8217;s<\/a> extensive Wing Commander research. It needs a very large table for decoding (128KB of data expressed in ASCII text) and that&#8217;s contained in xandata.h[.bz2]. Ideally, I think that table is supposed to be generated by some DLL function. Xan samples and the xanlib.dll are located at the <a href=\"http:\/\/www.mplayerhq.hu\/MPlayer\/samples\/game-formats\/wc4-xan\/\">MPlayer samples repository<\/a>.<\/p>\n<p>This particular plugin is based on one of my old <a href=\"http:\/\/multimedia.cx\/pre\/re-xan.html\">reverse engineering experiments<\/a>. The reason I took on this task is because loading xanlib.dll and calling into it isn&#8217;t especially difficult. At least, none of the relevant functions are dependent upon any external functions. Thus, I just used a few strategic mmap() functions and loaded the binary code directly into specific memory regions. Oh, the code only works on x86 architectures, of course.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Finally &#8212; watch those WC4 movies&#8230;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[3,22,4],"tags":[],"class_list":["post-226","post","type-post","status-publish","format-standard","hentry","category-open-source-multimedia","category-origin-xan","category-reverse-engineering"],"aioseo_notices":[],"aioseo_head":"\n\t\t<!-- All in One SEO 4.9.10 - aioseo.com -->\n\t<meta name=\"description\" content=\"Finally -- watch those WC4 movies...\" \/>\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\/xan-binary-decoding\/\" \/>\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=\"Xan Binary Decoding | Breaking Eggs And Making Omelettes\" \/>\n\t\t<meta property=\"og:description\" content=\"Finally -- watch those WC4 movies...\" \/>\n\t\t<meta property=\"og:url\" content=\"https:\/\/multimedia.cx\/eggs\/xan-binary-decoding\/\" \/>\n\t\t<meta property=\"article:published_time\" content=\"2006-03-18T23:08:18+00:00\" \/>\n\t\t<meta property=\"article:modified_time\" content=\"2006-03-18T23:20:42+00:00\" \/>\n\t\t<meta name=\"twitter:card\" content=\"summary\" \/>\n\t\t<meta name=\"twitter:title\" content=\"Xan Binary Decoding | Breaking Eggs And Making Omelettes\" \/>\n\t\t<meta name=\"twitter:description\" content=\"Finally -- watch those WC4 movies...\" \/>\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\\\/xan-binary-decoding\\\/#article\",\"name\":\"Xan Binary Decoding | Breaking Eggs And Making Omelettes\",\"headline\":\"Xan Binary Decoding\",\"author\":{\"@id\":\"https:\\\/\\\/multimedia.cx\\\/eggs\\\/author\\\/multimedia-mike\\\/#author\"},\"publisher\":{\"@id\":\"https:\\\/\\\/multimedia.cx\\\/eggs\\\/#organization\"},\"image\":{\"@type\":\"ImageObject\",\"url\":\"\\\/eggs\\\/images\\\/wc4-title.jpg\",\"@id\":\"https:\\\/\\\/multimedia.cx\\\/eggs\\\/xan-binary-decoding\\\/#articleImage\"},\"datePublished\":\"2006-03-18T15:08:18-08:00\",\"dateModified\":\"2006-03-18T15:20:42-08:00\",\"inLanguage\":\"en-US\",\"commentCount\":10,\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/multimedia.cx\\\/eggs\\\/xan-binary-decoding\\\/#webpage\"},\"isPartOf\":{\"@id\":\"https:\\\/\\\/multimedia.cx\\\/eggs\\\/xan-binary-decoding\\\/#webpage\"},\"articleSection\":\"Open Source Multimedia, Origin Xan, Reverse Engineering\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/multimedia.cx\\\/eggs\\\/xan-binary-decoding\\\/#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\\\/reverse-engineering\\\/#listItem\",\"name\":\"Reverse Engineering\"}},{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/multimedia.cx\\\/eggs\\\/category\\\/reverse-engineering\\\/#listItem\",\"position\":2,\"name\":\"Reverse Engineering\",\"item\":\"https:\\\/\\\/multimedia.cx\\\/eggs\\\/category\\\/reverse-engineering\\\/\",\"nextItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/multimedia.cx\\\/eggs\\\/category\\\/reverse-engineering\\\/origin-xan\\\/#listItem\",\"name\":\"Origin Xan\"},\"previousItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/multimedia.cx\\\/eggs#listItem\",\"name\":\"Home\"}},{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/multimedia.cx\\\/eggs\\\/category\\\/reverse-engineering\\\/origin-xan\\\/#listItem\",\"position\":3,\"name\":\"Origin Xan\",\"item\":\"https:\\\/\\\/multimedia.cx\\\/eggs\\\/category\\\/reverse-engineering\\\/origin-xan\\\/\",\"nextItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/multimedia.cx\\\/eggs\\\/xan-binary-decoding\\\/#listItem\",\"name\":\"Xan Binary Decoding\"},\"previousItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/multimedia.cx\\\/eggs\\\/category\\\/reverse-engineering\\\/#listItem\",\"name\":\"Reverse Engineering\"}},{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/multimedia.cx\\\/eggs\\\/xan-binary-decoding\\\/#listItem\",\"position\":4,\"name\":\"Xan Binary Decoding\",\"previousItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/multimedia.cx\\\/eggs\\\/category\\\/reverse-engineering\\\/origin-xan\\\/#listItem\",\"name\":\"Origin Xan\"}}]},{\"@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\\\/xan-binary-decoding\\\/#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\\\/xan-binary-decoding\\\/#webpage\",\"url\":\"https:\\\/\\\/multimedia.cx\\\/eggs\\\/xan-binary-decoding\\\/\",\"name\":\"Xan Binary Decoding | Breaking Eggs And Making Omelettes\",\"description\":\"Finally -- watch those WC4 movies...\",\"inLanguage\":\"en-US\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/multimedia.cx\\\/eggs\\\/#website\"},\"breadcrumb\":{\"@id\":\"https:\\\/\\\/multimedia.cx\\\/eggs\\\/xan-binary-decoding\\\/#breadcrumblist\"},\"author\":{\"@id\":\"https:\\\/\\\/multimedia.cx\\\/eggs\\\/author\\\/multimedia-mike\\\/#author\"},\"creator\":{\"@id\":\"https:\\\/\\\/multimedia.cx\\\/eggs\\\/author\\\/multimedia-mike\\\/#author\"},\"datePublished\":\"2006-03-18T15:08:18-08:00\",\"dateModified\":\"2006-03-18T15:20:42-08: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":"Xan Binary Decoding | Breaking Eggs And Making Omelettes","description":"Finally -- watch those WC4 movies...","canonical_url":"https:\/\/multimedia.cx\/eggs\/xan-binary-decoding\/","robots":"max-image-preview:large","keywords":"","webmasterTools":{"miscellaneous":""},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/multimedia.cx\/eggs\/xan-binary-decoding\/#article","name":"Xan Binary Decoding | Breaking Eggs And Making Omelettes","headline":"Xan Binary Decoding","author":{"@id":"https:\/\/multimedia.cx\/eggs\/author\/multimedia-mike\/#author"},"publisher":{"@id":"https:\/\/multimedia.cx\/eggs\/#organization"},"image":{"@type":"ImageObject","url":"\/eggs\/images\/wc4-title.jpg","@id":"https:\/\/multimedia.cx\/eggs\/xan-binary-decoding\/#articleImage"},"datePublished":"2006-03-18T15:08:18-08:00","dateModified":"2006-03-18T15:20:42-08:00","inLanguage":"en-US","commentCount":10,"mainEntityOfPage":{"@id":"https:\/\/multimedia.cx\/eggs\/xan-binary-decoding\/#webpage"},"isPartOf":{"@id":"https:\/\/multimedia.cx\/eggs\/xan-binary-decoding\/#webpage"},"articleSection":"Open Source Multimedia, Origin Xan, Reverse Engineering"},{"@type":"BreadcrumbList","@id":"https:\/\/multimedia.cx\/eggs\/xan-binary-decoding\/#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\/reverse-engineering\/#listItem","name":"Reverse Engineering"}},{"@type":"ListItem","@id":"https:\/\/multimedia.cx\/eggs\/category\/reverse-engineering\/#listItem","position":2,"name":"Reverse Engineering","item":"https:\/\/multimedia.cx\/eggs\/category\/reverse-engineering\/","nextItem":{"@type":"ListItem","@id":"https:\/\/multimedia.cx\/eggs\/category\/reverse-engineering\/origin-xan\/#listItem","name":"Origin Xan"},"previousItem":{"@type":"ListItem","@id":"https:\/\/multimedia.cx\/eggs#listItem","name":"Home"}},{"@type":"ListItem","@id":"https:\/\/multimedia.cx\/eggs\/category\/reverse-engineering\/origin-xan\/#listItem","position":3,"name":"Origin Xan","item":"https:\/\/multimedia.cx\/eggs\/category\/reverse-engineering\/origin-xan\/","nextItem":{"@type":"ListItem","@id":"https:\/\/multimedia.cx\/eggs\/xan-binary-decoding\/#listItem","name":"Xan Binary Decoding"},"previousItem":{"@type":"ListItem","@id":"https:\/\/multimedia.cx\/eggs\/category\/reverse-engineering\/#listItem","name":"Reverse Engineering"}},{"@type":"ListItem","@id":"https:\/\/multimedia.cx\/eggs\/xan-binary-decoding\/#listItem","position":4,"name":"Xan Binary Decoding","previousItem":{"@type":"ListItem","@id":"https:\/\/multimedia.cx\/eggs\/category\/reverse-engineering\/origin-xan\/#listItem","name":"Origin Xan"}}]},{"@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\/xan-binary-decoding\/#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\/xan-binary-decoding\/#webpage","url":"https:\/\/multimedia.cx\/eggs\/xan-binary-decoding\/","name":"Xan Binary Decoding | Breaking Eggs And Making Omelettes","description":"Finally -- watch those WC4 movies...","inLanguage":"en-US","isPartOf":{"@id":"https:\/\/multimedia.cx\/eggs\/#website"},"breadcrumb":{"@id":"https:\/\/multimedia.cx\/eggs\/xan-binary-decoding\/#breadcrumblist"},"author":{"@id":"https:\/\/multimedia.cx\/eggs\/author\/multimedia-mike\/#author"},"creator":{"@id":"https:\/\/multimedia.cx\/eggs\/author\/multimedia-mike\/#author"},"datePublished":"2006-03-18T15:08:18-08:00","dateModified":"2006-03-18T15:20:42-08: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":"Xan Binary Decoding | Breaking Eggs And Making Omelettes","og:description":"Finally -- watch those WC4 movies...","og:url":"https:\/\/multimedia.cx\/eggs\/xan-binary-decoding\/","article:published_time":"2006-03-18T23:08:18+00:00","article:modified_time":"2006-03-18T23:20:42+00:00","twitter:card":"summary","twitter:title":"Xan Binary Decoding | Breaking Eggs And Making Omelettes","twitter:description":"Finally -- watch those WC4 movies..."},"aioseo_meta_data":{"post_id":"226","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:48:37","updated":"2025-12-31 18:27:28","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\/reverse-engineering\/\" title=\"Reverse Engineering\">Reverse Engineering<\/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\/reverse-engineering\/origin-xan\/\" title=\"Origin Xan\">Origin Xan<\/a>\n\t\t<\/span><span class=\"aioseo-breadcrumb-separator\">&raquo;<\/span><span class=\"aioseo-breadcrumb\">\n\t\t\tXan Binary Decoding\n\t\t<\/span><\/div>","aioseo_breadcrumb_json":[{"label":"Home","link":"https:\/\/multimedia.cx\/eggs"},{"label":"Reverse Engineering","link":"https:\/\/multimedia.cx\/eggs\/category\/reverse-engineering\/"},{"label":"Origin Xan","link":"https:\/\/multimedia.cx\/eggs\/category\/reverse-engineering\/origin-xan\/"},{"label":"Xan Binary Decoding","link":"https:\/\/multimedia.cx\/eggs\/xan-binary-decoding\/"}],"_links":{"self":[{"href":"https:\/\/multimedia.cx\/eggs\/wp-json\/wp\/v2\/posts\/226","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=226"}],"version-history":[{"count":0,"href":"https:\/\/multimedia.cx\/eggs\/wp-json\/wp\/v2\/posts\/226\/revisions"}],"wp:attachment":[{"href":"https:\/\/multimedia.cx\/eggs\/wp-json\/wp\/v2\/media?parent=226"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/multimedia.cx\/eggs\/wp-json\/wp\/v2\/categories?post=226"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/multimedia.cx\/eggs\/wp-json\/wp\/v2\/tags?post=226"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}