{"id":481,"date":"2007-11-11T13:04:09","date_gmt":"2007-11-11T21:04:09","guid":{"rendered":"http:\/\/multimedia.cx\/eggs\/xbfuse\/"},"modified":"2007-11-12T19:06:14","modified_gmt":"2007-11-13T03:06:14","slug":"xbfuse","status":"publish","type":"post","link":"https:\/\/multimedia.cx\/eggs\/xbfuse\/","title":{"rendered":"xbfuse"},"content":{"rendered":"<p>Well, you knew this was coming&#8211; <a href=\"http:\/\/multimedia.cx\/xbfuse\/\">xbfuse<\/a>. This is a program that leverages the wonderful <a href=\"http:\/\/fuse.sf.net\/\">FUSE<\/a> paradigm to mount a Microsoft Xbox disc filesystem &#8212; the so-called <a href=\"http:\/\/www.xbox-linux.org\/docs\/gdfs.html\">XDVD filesystem<\/a> &#8212; under Linux. I hammered out the bug mentioned in <a href=\"http:\/\/multimedia.cx\/eggs\/xbox-multimedia-finally\/\">yesterday&#8217;s post<\/a> (sure enough, a 64-bit offset was being demoted to a signed 32-bit quantity at one point, and that matters for filesystems this large). This is what the program looks like in action:<\/p>\n<pre>\r\n$ xbfuse Halo-3.iso mnt\/\r\n\r\n$ ls -al mnt\/\r\ntotal 4\r\ndr-xr-xr-x  6 melanson melanson       0 2007-11-07 20:00 .\r\ndrwxr-xr-x 47 melanson melanson    4096 2007-11-10 17:31 ..\r\ndr-xr-xr-x  2 melanson melanson       0 2007-11-07 20:00 bink\r\n-r--r--r--  1 melanson melanson 8929280 2007-11-07 20:00 default.xex\r\ndr-xr-xr-x  5 melanson melanson       0 2007-11-07 20:00 maps\r\ndr-xr-xr-x  2 melanson melanson       0 2007-11-07 20:00 $SystemUpdate\r\ndr-xr-xr-x  2 melanson melanson       0 2007-11-07 20:00 waves\r\n-r--r--r--  1 melanson melanson  561152 2007-11-07 20:00 WaveShell-Xbox.dll\r\n-r--r--r--  1 melanson melanson  724992 2007-11-07 20:00 WavesLibDLL.dll\r\n\r\n$ ls -al mnt\/bink\/\r\ntotal 0\r\ndr-xr-xr-x 2 melanson melanson        0 2007-11-07 20:00 .\r\ndr-xr-xr-x 6 melanson melanson        0 2007-11-07 20:00 ..\r\n-r--r--r-- 1 melanson melanson 77940860 2007-11-07 20:00 attract_1_60.bik\r\n-r--r--r-- 1 melanson melanson 61324440 2007-11-07 20:00 attract_2_60.bik\r\n-r--r--r-- 1 melanson melanson 72829508 2007-11-07 20:00 attract_3_60.bik\r\n-r--r--r-- 1 melanson melanson 69631000 2007-11-07 20:00 credits_60.bik\r\n-r--r--r-- 1 melanson melanson 21163412 2007-11-07 20:00 intro_60.bik\r\n\r\n$ fusermount -u mnt\/\r\n<\/pre>\n<p>So <a href=\"http:\/\/www.mobygames.com\/game\/xbox360\/halo-3\"><em>Halo 3<\/em><\/a> uses <a href=\"http:\/\/wiki.multimedia.cx\/index.php?title=Bink_Container\">Bink<\/a> files, some very high resolution ones, rather than any Xbox-specific multimedia formats, like <a href=\"http:\/\/wiki.multimedia.cx\/index.php?title=XMV\">XMV<\/a>. Actually, Bungie (the company behind <em>Halo<\/em>) may have a history with Bink, as I seem to recall that the FMV for the PC demo version of <em>Halo<\/em> was also Bink (or at least one promotional file).<\/p>\n<p>I actually just thought to look up whether there are other options for mounting Xbox filesystem images under Linux. The format certainly seems to be of much greater interest than, say, <a href=\"http:\/\/multimedia.cx\/gcfuse\/\">GameCube filesystem images<\/a>. I did find a project called <a href=\"http:\/\/freshmeat.net\/projects\/mount-iso-image\/\">Mount ISO Image<\/a> that is supposed to be able to handle XDVD filesystems. Though I can&#8217;t really figure out if it&#8217;s a KDE application, a script, or a KDE script.<\/p>\n<p>I took a slightly different approach to writing this one. All in all, I suppose the result is much simpler than gcfuse. The GameCube filesystem is an odd beast and required a lot of custom hacks to parse all of the data structures. However, writing xbfuse scared me more because I had to write 2 mutually recursive functions: After loading the volume descriptor, call xbfs_recurse_directory(), which then calls xbfs_recurse_file_subtree(), which calls not only itself, but also xbfs_recurse_directory() when a file entry happens to be a directory. I thought about writing xbfuse in such a way that it would traverse the data structures on demand when loading a file, since the data structures are laid out to be conducive to binary searching. I also thought about only loading the first level of the directory tree, and loading other levels on demand. But in the end, I just went with the full tree load at the outset and finally squashed the 64 -> 32-bit bug and the program seems to work quite well.<\/p>\n<p>What next? Wii discs seem to use a different format than the GameCube discs and I would like to find out what that is. Plus, I am still dogged by the slightly custom Dreamcast ISO-9660-style format. There is a lot of interesting Sofdec media on those Dreamcast games. And it only takes about 26 hours to rip the contents of a Dreamcast disc onto your PC, provided that you have the right serial cable.<\/p>\n<p><strong>Related Posts:<\/strong><\/p>\n<ul>\n<li><a href=\"http:\/\/multimedia.cx\/eggs\/gcfuse\/\">gcfuse<\/a><\/li>\n<li><a href=\"http:\/\/multimedia.cx\/eggs\/xbox-multimedia-finally\/\">Xbox Multimedia, Finally!<\/a><\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>Well, you knew this was coming&#8211; xbfuse. This is a program that leverages the wonderful FUSE paradigm to mount a Microsoft Xbox disc filesystem &#8212; the so-called XDVD filesystem &#8212; under Linux. I hammered out the bug mentioned in yesterday&#8217;s post (sure enough, a 64-bit offset was being demoted to a signed 32-bit quantity at [&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,79],"tags":[82,73,81,83,286,80],"class_list":["post-481","post","type-post","status-publish","format-standard","hentry","category-game-hacking","category-xbox","tag-bungie","tag-filesystems","tag-fuse","tag-microsoft","tag-xbox","tag-xbox-360"],"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/multimedia.cx\/eggs\/wp-json\/wp\/v2\/posts\/481","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=481"}],"version-history":[{"count":0,"href":"https:\/\/multimedia.cx\/eggs\/wp-json\/wp\/v2\/posts\/481\/revisions"}],"wp:attachment":[{"href":"https:\/\/multimedia.cx\/eggs\/wp-json\/wp\/v2\/media?parent=481"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/multimedia.cx\/eggs\/wp-json\/wp\/v2\/categories?post=481"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/multimedia.cx\/eggs\/wp-json\/wp\/v2\/tags?post=481"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}