{"id":4177,"date":"2013-09-30T21:25:14","date_gmt":"2013-10-01T04:25:14","guid":{"rendered":"http:\/\/multimedia.cx\/eggs\/?p=4177"},"modified":"2013-09-30T23:19:43","modified_gmt":"2013-10-01T06:19:43","slug":"interfacing-to-an-xbox-optical-drive","status":"publish","type":"post","link":"https:\/\/multimedia.cx\/eggs\/interfacing-to-an-xbox-optical-drive\/","title":{"rendered":"Interfacing to an Xbox Optical Drive"},"content":{"rendered":"<p><a href=\"http:\/\/en.wikipedia.org\/wiki\/Xbox_One\">The next generation Xbox<\/a> is going to hit the streets soon. But for some reason, I&#8217;m still interested in the previous generation&#8217;s unit (i.e., the original Xbox). Specifically, I&#8217;ve always wondered if it&#8217;s possible to use the original Xbox&#8217;s optical drive in order to read Xbox discs from Linux. I was never curious enough to actually buy an Xbox just to find out but <a href=\"http:\/\/games.multimedia.cx\/acquisition-log-microsoft-xbox\/\">I eventually came across a cast-off console on a recycle pile<\/a>.<\/p>\n<p>I have long known that the Xbox has what appears to be a more or less standard optical drive with a 40-pin IDE connector. The only difference is the power adapter which I surmise is probably the easiest way to turn a bit of standardized hardware into a bit of proprietary hardware. The IDE and power connectors look like this:<\/p>\n<p><center><br \/>\n<img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/multimedia.cx\/eggs\/wp-content\/uploads\/2013\/09\/xbox-optical-drive-power-cable.jpg\" alt=\"Xbox optical drive connections\" width=\"400\" height=\"291\" class=\"aligncenter size-full wp-image-4181\" srcset=\"https:\/\/multimedia.cx\/eggs\/wp-content\/uploads\/2013\/09\/xbox-optical-drive-power-cable.jpg 400w, https:\/\/multimedia.cx\/eggs\/wp-content\/uploads\/2013\/09\/xbox-optical-drive-power-cable-300x218.jpg 300w\" sizes=\"auto, (max-width: 400px) 100vw, 400px\" \/><br \/>\n<\/center><\/p>\n<p>Thus, I wanted to try opening an Xbox and plugging the optical drive into a regular PC, albeit one that supports IDE cables, and allow the Xbox to supply power to the drive. Do <em>you<\/em> still have hardware laying around that has 40-pin IDE connectors? I guess <a href=\"http:\/\/www.everymac.com\/systems\/apple\/mac_mini\/specs\/mac_mini_g4_1.25.html\">my Mac Mini PPC<\/a> fits the bill, but I&#8217;ll be darned if I&#8217;m going to pry that thing open again. I have another IDE-capable machine buried in my closet, last called into service when <a href=\"http:\/\/multimedia.cx\/eggs\/dreamcast-anniversary-programming\/\">I needed a computer with a native RS-232 port<\/a> 3 years ago. The ordeal surrounding making this old computer useful right now can be another post entirely.<\/p>\n<p>Here&#8217;s what the monstrosity looks like thanks to characteristically short IDE cable lengths:<\/p>\n<p><center><br \/>\n<div id=\"attachment_4178\" style=\"width: 310px\" class=\"wp-caption aligncenter\"><a href=\"http:\/\/multimedia.cx\/eggs\/wp-content\/uploads\/2013\/09\/xbox-ide-pc.jpg\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-4178\" src=\"http:\/\/multimedia.cx\/eggs\/wp-content\/uploads\/2013\/09\/xbox-ide-pc-300x151.jpg\" alt=\"Xbox optical drive connected directly to PC\" width=\"300\" height=\"151\" class=\"size-medium wp-image-4178\" srcset=\"https:\/\/multimedia.cx\/eggs\/wp-content\/uploads\/2013\/09\/xbox-ide-pc-300x151.jpg 300w, https:\/\/multimedia.cx\/eggs\/wp-content\/uploads\/2013\/09\/xbox-ide-pc-1024x517.jpg 1024w, https:\/\/multimedia.cx\/eggs\/wp-content\/uploads\/2013\/09\/xbox-ide-pc.jpg 1200w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/a><p id=\"caption-attachment-4178\" class=\"wp-caption-text\"><em>Click for larger image<\/em><\/p><\/div><br \/>\n<\/center><\/p>\n<p>Process:<\/p>\n<ol>\n<li>Turn on Xbox first<\/li>\n<li>Turn on PC<\/li>\n<\/ol>\n<p>Doing these things in the opposite order won&#8217;t work since the kernel really wants to see the drive when booting up. Inspecting the <code>'dmesg'<\/code> log afterward reveals interesting items:<br \/>\n<code><br \/>\nhdd: PHILIPS XBOX DVD DRIVE, ATAPI CD\/DVD-ROM drive<br \/>\nhdd: host max PIO5 wanted PIO255(auto-tune) selected PIO4<br \/>\nhdd: UDMA\/33 mode selected<br \/>\n[...]<br \/>\nhdd: ATAPI DVD-ROM drive, 128kB Cache<br \/>\n<\/code><\/p>\n<p>Why is that interesting? When is the last time to saw disk devices prefixed by &#8216;hd&#8217; rather than &#8216;sd&#8217;? Blast from the past. Oh, and the optical drive&#8217;s vendor string clearly indicates that this is an Xbox drive saying &#8216;hi!&#8217;.<\/p>\n<p><strong>Time To Read<\/strong><br \/>\n<a href=\"http:\/\/multimedia.cx\/eggs\/studying-xbox-multimedia\/\">When I first studied an Xbox disc<\/a> in a normal optical drive, I noticed that I was able to read 6992 2048-byte sectors &#8212; about 14 MB of data &#8212; as reported by the disc table of contents (TOC). This is just enough data to play a standard DVD video animation that kindly instructs the viewer to please use a proper Xbox. At this point, I estimated that there must be something special about Xbox optical drive firmware that knows how to read alternate information on these discs and access further sectors.<\/p>\n<p>I ran my TOC query tool with an Xbox Magazine demo disc in the optical drive and it reported substantially more than 6992 sectors, enough to account for more than 2 GB of data. That&#8217;s promising. I then tried running <code>'dd'<\/code> against the device and it was able to read&#8230; about 14 MB, an exact quantity of bytes that, when divided by 2048 bytes\/sector, yields 6992 sectors.<\/p>\n<p><strong>Future (Past?) Work<\/strong><br \/>\nAssuming Google is your primary window into the broader internet, the world is beginning to lose its memory of things pertaining to the original Xbox (Microsoft&#8217;s naming scheme certainly doesn&#8217;t help searches). What I&#8217;m saying is that it can be difficult to find information about this stuff now. However, I was able to learn that a host needs to perform a sort of cryptographic handshake with the drive at the SCSI level before it is allowed to access the forbidden areas of the disc. <em>I think.<\/em> I&#8217;m still investigating this and will hopefully post more soon.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>It is possible to hook an Xbox optical drive directly to a PC; but how can you read it?<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[79],"tags":[],"class_list":["post-4177","post","type-post","status-publish","format-standard","hentry","category-xbox"],"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/multimedia.cx\/eggs\/wp-json\/wp\/v2\/posts\/4177","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=4177"}],"version-history":[{"count":12,"href":"https:\/\/multimedia.cx\/eggs\/wp-json\/wp\/v2\/posts\/4177\/revisions"}],"predecessor-version":[{"id":4191,"href":"https:\/\/multimedia.cx\/eggs\/wp-json\/wp\/v2\/posts\/4177\/revisions\/4191"}],"wp:attachment":[{"href":"https:\/\/multimedia.cx\/eggs\/wp-json\/wp\/v2\/media?parent=4177"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/multimedia.cx\/eggs\/wp-json\/wp\/v2\/categories?post=4177"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/multimedia.cx\/eggs\/wp-json\/wp\/v2\/tags?post=4177"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}