[ Bjarni R. Einarsson / blog: IS EN ]


Xbox hackery

2007-06-10 12:04

I like taking things apart and putting them back together again. I realize this isn't always an efficient use of my time, but I do it all the same. It's a game.

This weekend I decided to do that to the old used Xbox I bought last summer. I carried it to Ireland with me after the last trip to Iceland and have since (finally!) managed to finish Halo. Seeing as that's the only game I have and they don't even sell games for the platform anymore (any hints on where I might find some are welcome), I figured it was high time to take the sucker apart.

Never mind the fact that modding Xboxes is so last year. Or last century, maybe. I figured it'd be good fun.

...

The other day I managed to install the Xebian Linux distribution, and have been reading documentation about how the machine works.

Yesterday I ripped the box open and happily soldered a USB cable to the wires leading to one of the ports on the front of the box (instructions here). So now my Xbox has a tail and I can, with the help of a USB hub, plug all sorts of normal USB hardware into it.

Then I cloned the interesting bits from the built-in 10GB hard disk to a 250GB Western Digital USB myBook, which just happened to be the cheapest hard drive I could buy the other day.

(The myBook was perfect for this because it's both cheap, and because in order for me to take the disk out of it and put in my Xbox, I had to spend quite a while ripping open the USB enclosure! Getting that sucker open without destroying it was surprisingly tricky. Fun!)

Surprisingly enough, the system worked with the new drive on the first try. So now I had hacked my Xbox to support standard USB devices and contain a nice big hard drive, the next step was to make use of the extra space.

This was nontrivial because Xbox hard drives don't actually have partition tables. If I created one, the machine would no longer boot and wouldn't be usable for games. So I had to somehow convince Linux to mount the extra space on the drive without actually having any mountable device. I didn't want to follow the normal modding instructions for creating an "F:" or "G:" drive, as that would require using the Microsoft FATX filesystem for my Linux stuff. Ick!

The solution: the loopback device. The losetup tool has a -o argument which specifies an offset into the disk or file it's attaching to. So with "losetup -o 10737418240 /dev/hda /dev/loop/1" I created a loopback device which covered the entire disk except the first 10GB. This device I could then format using whatever filesystem I liked (ext3) without ruining the machine's gaming capabilities.

I should probably go add this trick to the Xbox-Linux wiki.

...

My USB hack was also backwards compatible - but possibly not as reliably so. Perhaps someone who knows more about electronics can comment? I didn't disconnect the wires from the original Microsoft USB port, thus disabling it. Instead I made little "T" solders to each of the four wires, essentially making that single logical port go to two physical ones. The idea is that if I never plug devices into both at once, Nothing Bad(tm) will happen.

I don't know if this is a safe assumption, but it appears to work!

Again, the beauty of this hack is that I haven't lost any of the original functionality. If I for some reason want to play games with four controllers, I still can as long as I disconnect the hacked-on USB hub first.

Pretty cool!

     Re: Xbox hackery (mary)
     Re: Xbox hackery (Borgar)
     Actually, I can buy games! (Bjarni Rúnar)
     And partitioning is possib.. (Bjarni Rúnar)
         Re: And partitioning is po.. (Hrafnkell)
             Re: Re: And partitioning i.. (Bjarni Rúnar)
                 Re: Re: Re: And partitioni.. (Einar Jón)
     Re: Xbox hackery (jimmy2142)

   
Name:
Subject:

Note: If all you want to do is correct grammar or spelling, please send me e-mail instead of cluttering up the diary. Thank you!

Yes! I will write my own HTML!    

Valid HTML: <P>, <BR>, <A HREF="...">...</A>, <UL>, <OL>, <LI>, <I>, <B>
Blockquote and image tags don't work!

Please leave these blank:

Nýtt í dagbókinni