Using an Xbox as a MythTV Frontend
Or how to put Linux where Microsoft never intended it to go
Allan Cecil
Welcome!
- This presentation was given at NBLUG.org on 3-14-2006.
- Since you're viewing this online, you'll probably want to swith to Outline mode, which will show you a large number of notes and hyperlinks that are not visible in Presentation mode.
- To switch viewing modes at any time, Press "T" or move your mouse to the lower right corner and click on the "
0
" button.
Covered in this talk:
- (original) Xbox hardware and software overview
- Legal questions
- Xbox modification methods
- Live demonstration of software modification
- Linux distributions and installation
- MythTV frontend configuration and use
- Other homebrew software
Notes:
Sections that are only visible in this outline / handout mode will have Notes: as the first line. As noted, these sections contain additional information, hyperlinks, and commentary that isn't viewable in presentation mode.
What is an Xbox?
- 733 MHz Intel Pentium III (128k L2 cache)
- 64 MB RAM, shared with video
- nVidia GeForce 3 MX
- 8 or 10 GB hard drive, 5 FATX partitions
- 10/100 network adapter
- DVD-ROM drive (various models)
- Controller Ports: 4 proprietary USB ports
Notes:
- The processor has an 8-way associative cache like P-III E (better than Celeron's 4-way)
- The nVidia graphics chipset is really an NV2A chipset at 233 MHz (2 vertex shaders)
- Other info: 133 MHz FSB, 200 MHz memory
What can I do with an Xbox?
Unmodded:
- Run the Microsoft Dashboard
- the dashboard is essentially the console's GUI
- Play signed Xbox games
- restricted to original media
- Play on Xbox live
- requires a subscription
- may change or update files without your permission
- Run arbitrary code using a software exploit
- returns to normal after reboot
- not effective for long-term use
Notes:
The dashboard is what you see when you boot up an Xbox without a disc in the drive. It's usually replaced with a different non-Microsoft dashboard when modding an Xbox to allow for more features. A few mods simply augment the standard menu or replace the Xbox Live menu item with something else.
Regarding Xbox live: Microsoft has been known to upgrade files in the past to break and/or prevent software exploits. The current batch of software exploits work just fine and cannot be prevented by Microsoft at this time (more information on why is available
here).
If you do happen to log in to Xbox live with a modded Xbox, your Xbox will be banned based on the hard drive and the serial number, and your account will be banned with your remaining subscription revoked.
What can I do with an Xbox?
Fully Modded:
- Run signed or unsigned Xbox .XBE applications, like:
- Dashboard replacements
- Original (backup) games from any source
- Linux distributions
- Homebrew software
- An Xbox is an x86 PC - the possibilities are endless
- May not have access to Xbox live depending on mod used, but free alternatives exist:
Notes:
An .XBE file is, in essence, an XBox Executable (hence, .XBE). You can read about the
technical specifications of .XBE files if you want, but in general just think of .XBE files as .EXE files for the Xbox.
On Microsoft games, signing happens under Microsoft's strict control, with each game signed with a 2048-bit private key. An unmodded Xbox will not run content that is not signed. Jumping ahead a bit, the xbox-linux.org MechInstaller will only run .XBE files that have been signed by either Microsoft or by a specific private key, as described in the middle of
this article. Other Xbox modification methods allow for execution of any code, be it signed or unsigned - i.e. "fully modded".
Both
Xlink Kai and
XBConnect have similar features, with Xlink Kai covering a few more platforms. At this time, neither of them charge a subscription fee, so there are other reasons to consider using one of these services (which can work even without using a modded Xbox).
So, is this legal?
- Yes, but keep the following in mind:
- It's your Xbox - you can do what you like with it per sect. 1201(f) of the DMCA
- Microsoft licenses their Xbox Dev Kit - they can do what they like with it per their license agreement
- What does this mean?
- Running an unsigned .XBE file is legal
- Creating an unsigned .XBE file with OpenXDK is legal
- Creating an unsigned .XBE file with the MS XDK probably isn't
- For this reason, distribution of unsigned .XBE files is problematic
Primary online resources
- http://xbox-linux.org
- Lots of information on Xbox-specific distributions
- Articles on Xbox design choices, including how MS introduced 3 security flaws into 512 bytes of code
- http://xbox-scene.org
- One of the most active Xbox modding sites
- Contains information on locating homebrew software and
dashboards
- http://xbins.org
- Full list of homebrew software
- Hosts fabled xbins FTP server
Notes:
A quick summary of links are listed at the end of this presentation.
The article about the 512-byte hidden boot code that contained three separate bugs can be found
here.
If you have any problems connecting to the Xbins FTP server, take a look at
the Xbins guide over at xbox-scene.org or at any of the other
guides on the
subject.
What mod methods exist?
Hardware:
- Pros:
- Wide variety of physical modchips
- Some come in solderless packages
- Can come with on/off switches to turn off mod
- Drive management - HD does not have to be locked
- Cons:
- Requires opening case, voids warranty
- Solder-based modchips may not be for the faint of heart
- Modchips must be purchased and shipped
- Onboard TSOP flashing is possible but risky
What mod methods exist?
Software:
- Pros:
- Free
- Does not require opening case
- Functionally identical to a hardware mod
- Can be reverted, does not void warranty
- xboxhdm can be used to create and lock a larger HD
- Cons:
- Have to obtain specific game title, exploit package
- Copying savegame exploit to Xbox may be difficult
- HD has to be locked, but there's no size limit
- Xbox live support varies by mod used, arms race
Notes:
You can find out more information about hard drive locking and compatibility at the
Xbox Hard Drive Compatibility Chart site.
Xboxhdm is one very cool piece of software made by ldots. After modding an Xbox, an eeprom.bin file is usually generated. You can copy this file into a folder and then use a Linux script (or a batch file) to create an .ISO file that's specific to that Xbox. After booting from the disc, you'll find yourself in Linux along with a very nice script that automates creating a drive from scratch, including using any space larger than 8 GB as an extra user data partition. The drive can then locked (or unlocked) based on information from the eeprom.bin file you included when you made the disc. There are a
wide variety of
guides on using xboxhdm available online.
Softmodding 101
OK, softmod it is. Which savegame exploit should I use?
- xbox-linux.org Mechinstaller
- Not made with MS XDK, can use clean BIOS
- Only launches specific signed Linux .XBE files
- Outdated, removes Xbox live, has clock-loop problem
- ldots UDE / UXE installer
- Works on all Xbox versions (v1.0 - v1.6)
- Boots to a recovery dashboard if tray is open
- Allows execution of signed and unsigned .XBE files
- Easy to install, but requires disc to reapply
- Other installers exist, newest ones support Xbox live
- Ndure XBE Exploit - open tray suppresses mod
Notes:
Despite being very outdated and harder than newer mods to use, the
MechInstaller software mod from
xbox-linux.org may be more appropriate (for distribution reasons) if all you intend to do is run Linux on your Xbox and you're not interested in any other software. There are also ways to
remove gaming abilities completely, although I'm not sure why you would want to do that.
While there are newer softmod packages out there, I still like the
ldots softmod package. This is mostly because I've come to trust it and it's really easy to install. There are a few other
guides out there for this particular method, too.
That being said, newer softmods come out from time to time - use whatever softmod you want.
The
Ndure exploit is a bit more difficult to install, but it has the advantage that it includes code to automatically swap out the exploited files with the real ones to allow access to Xbox live without getting banned. So far, Microsoft has not detected or blocked this, but as noted, there has been a continuing arms race between Microsoft and softmod developers. I still suggest avoiding the mess entirely by using either
Xlink Kai or
XBConnect.
Softmodding 101
- After picking a softmod exploit, you will need:
- MechAssault, 007, or Splinter Cell depending on mod
- Can be borrowed / rented if you don't intend to revert mod or if you use a newer exploit
- A memory unit or supported USB key to copy the savegame
- Savegame can be copied from:
- A friend's modded Xbox via a memory unit
- A USB key connected to the Xbox using a modified USB cable
- A computer using a controller cable adapter and ActionReplay
Notes:
Obviously, the easiest way to copy a savegame exploit is to find someone nearby who has a modded Xbox that you can copy it from.
Your other two options involve buying or hacking together a cable to either get an Xbox controller on your PC or a USB key on your Xbox. If you're going the controller-connected-to-the-computer method, you can buy one of
several models available or you can
roll your own.
If you want to go the other way around and connect USB devices to your Xbox, there are (you guessed it)
several standard
guides as well as a couple more that take this method in an
interesting direction.
The controller-connected-to-the-computer method is described
here, but keep in mind it requires Windows (although it may be possible to run the Action Replay software required for this method using newer versions of Wine).
If that doesn't suit your needs, you can go with the USB key method described on
this xbox-linux.org page. Keep in mind that not all keys can be recognized by an Xbox - check out the
USB key compatibility list to see what works and what doesn't. The tool itself only supports specific sizes of USB keys, so you may find a barrier there as well. I'd suggest only trying this method if nothing else works for you.
Softmodding 101
OK, let's mod it! Stable MechAssault-based ldots mod:
- Get ldots 1.7 (or 1.8) + ltools dashes savegame packages
- After copying savegame packages to Xbox, launch MechAssault, open campaigns and select Run Linux
- To make permanent, select UDE / UXE install and choose:
- PBL Metoo patcher, Evox M8 BIOS, Avalaunch dashboard, generic fonts, enable tray-state
- Mod is complete once power light flashes green
- Remove the disc and reboot to your new dashboard
Notes:
As noted previously, you can find more information on
the ldots savegame package at
xbox-scene.org. You may also want to search around there for more information on all this "PBL Metoo" Phoenix BIOS Loader stuff.
On version 1.6 Xbox units, the screen will end up turning completely green as soon as you start the modding process. This is because of a problem with the graphics chip used in the 1.6 Xbox units (previous Xbox versions do not suffer from this problem). The light on the front flashes green when the mod is done so you know it's safe to turn off the Xbox. It could take several minutes to back up your system files and perform the mod, so be patient.
Post-mod layout
It's modded! Here's what to look at next:
- Configure network, update dashboard as needed
- FTP Server is now live: User xbox, password xbox
- Xbox DVD-ROM and HD FATX partition letters are:
- C: = System, 500 MB
- D: = DVD-ROM
- E: = User data, 4.8 GB - bigger HD's span to F:
- Installing software is as easy as copying it (via FTP) to a folder on either E: or F:
- Apps to \Apps, Emulators to \Emulators, Games to \Games
- X:, Y:, Z: = swap, 700 MB each
Notes:
Copying applications is easy - if you have, say, an Amiga emulator for the Xbox, all you need to do is copy the folder using FTP to the \Emulators folder (on either the E: or the F: drive) and reboot the Xbox. Avalaunch should display the emulator in the Emulators folder.
Speaking of games, if you do manage to put a bigger hard drive in your Xbox, you can back up your games to the hard drive. This is nice for a couple of reasons - namely, you don't have to lug a bunch of discs around that can get scratched up and stop working, but also of note is the faster loading times when playing games stored on the hard drive. In general,
DVD2Xbox is the utility of choice for this kind of thing. In the US, you may be allowed to make a backup of a title you legally own but as always do a quick search if you have any legality questions.
Post-mod layout
Many options in Avalaunch can be edited in settings, or:
- Open FTP session, copy e:\dashboard\avalaunch.xml
- Launch your favorite text editor and read the comments
- Menu items can be added to a list and look like:
<item name="Microsoft Dashboard" path="C:\msdash.xbe"/>
- When done, FTP the file back to the Xbox and reboot
Pick a Linux distro
Many exist, but these are the most popular:
- Xebian
- Straight Xbox version of Debian Unstable
- Very good install scripts, well supported
- Gentoox
- Based on Gentoo distribution and mentality
- Magic package management system eases maintenance
- Newcomer: xUbuntu
- Ubuntu 5.10 with Xfce4 (xUbuntu name may change)
Notes:
For a full list of available Xbox-specific Linux distributions, have a look at the
Downloads page at xbox-linux.org.
Install a Linux distro
Each one installs differently. In Xebian:
- Read xbox-linux.org's Xebian install HOWTO
- Burn the correct .ISO to DVD media, load, and boot
- Default root password is "xebian"
- Use virtual keyboard or SSH to run XBOXLinuxInstall
- Best target is probably E: "game partition" loopback file
- Once installed, run from HD by launching E:\debian\default.xbe
Notes:
The
Xebian installation HOWTO is really the best document to read when attempting to install Xebian on an Xbox.
Because the ldots savegame exploit was used in this mod example, a replacement dashboard in the form of Avalaunch was installed. You'll probably want to edit avalaunch.xbe to create a menu item for e:\debian\default.xbe so you don't have to go through the file manager to launch it. If you run the MechInstaller softmod, Linux will be your only option - it should show up in the Microsoft Dashboard as Run Linux in the spot normally reserved for Xbox live.
Install MythTV-frontend
Again, each distro is different. In Xebian:
- Read xbox-linux.org's MythTV on Xebian HOWTO
- add listed repositories to /etc/apt/sources.list:
deb http://alexfisher.me.uk/debian sarge main
deb ftp://ftp.nerim.net/debian-marillat/ sarge main
- run apt-get update & apt-get install mythtv-frontend
- Set up remote with lirc - HOWTO has sample config
- Launch mythtv-frontend to see initial configuration
Notes:
As with the Xebian install, I highly advise looking at the
MythTV on Xebian HOWTO for full instructions on getting the MythTV frontend installed in Xebian. In particular, you'll probably want to install and configure lirc for remote control support using the sample lirc configuration file listed in the HOWTO.
Using MythTV-frontend
Now that everything's installed, have a look around!
- The frontend generally works like a normal PC frontend, so check out mythtv.org for usage info (or if you still need to configure a MythTV backend)
- Change settings to enable LED light status (red = recording)
- Consider adding other modules, like MythWeather or MythBrowser (use apt-get)
- With the proper decoders installed, playing DVD's is possible
Notes:
Speaking of the MythTV backend, you'll note I didn't include much information about installing it here. That's mostly because it can be a bit daunting and would be hard to cover adequately here. As noted, check out the
MythTV homepage as a starting point on getting the MythTV backend installed. I found the guide for
installing MythTV on Ubuntu 5.10 very helpful, especially since I had a PVR-150 capture card. A quick search with the name of your distribution plus the word MythTV using your favorite search engine should provide a link to a useful HOWTO. If you don't have a distribution of choice or if you plan on using a different computer for your MythTV backend, you may want to look into using
KnoppMyth to make the installation and configuration process easier.
Other Linux usage ideas
- Xebian = Debian Unstable - do anything you would do on a 733 MHz PC with 64 MB RAM
- Buy a VGA adapter, hack together a USB adapter cable, connect a USB keyboard with a USB port for a mouse, and use it as a desktop PC
- Low power consumption - use as a light-duty server?
- Beowulf cluster?
- Probably impractical, but fun!
Notes:
If you do want a VGA adapter,
these guys seem to have one of the better models available.
Impractical or not, AnandTech did make a
Beowulf cluster using 8 Xbox units. At the very least, the article makes for an interesting read.
Other Homebrew software
There are a lot of great apps out there!
- Have a look around xbox-scene.org or xbins.org
- Tools exist for backing up original games
- Many emulators exist, including Amiga and C-64
- Homebrew games and classics, like DoomX and QuakeX
- Xbox Media Center - the killer homebrew app
- Plays and streams anyting MPlayer can handle
- Uses Python, has extensive scripting support
- A MythTV-frontend Python script exists
- Look at the feature list at xboxmediacenter.com
Notes:
The part about there being quite a few Emulators out there isn't a joke - take a quick look at the
Xport project hosted at xbox-scene.org to get a good idea of what's out there.
MythTV in Xbox Media Center
- Installing and using XBMCMythTV:
- get from xbmcmythtv.sf.net and copy to \XBMC\Scripts
- Share MythTV capture directory with Samba so xbmcmythtv can see programs, live TV feed
- Script provides most of the features of the full client but with a shorter boot time
- Works by accessing MPEG files directly and using XBMC's built-in file playing capabilities
- XBMC can throttle case fan, power down HD for quiet viewing
Notes:
XBMC is interesting for a large number of reasons, most of which involve the fact that it has quite a few more features than
Microsoft's offering, as the previous link shows in a side-by-side comparison. There's a
feature list at the
XBMC homepage that should give you an idea of what file formats are supported and what features are implemented.
XBMC is still a very active project. Binary CVS versions of XBMC pop out all the time, so keep an eye out for them. The CVS releases usually contain a decent number of features that aren't yet included in the most recent stable release (which, of course, has the benefit of being more stable, but there's a trade-off to everything).
Speaking of CVS, the CVS versions of
XBMCMythTV have a few more features than the stable release. You may need to use the CVS version if you're using a very recent version of the MythTV backend that the released versions of XMBCMythTV hasn't fully caught up with yet. XBMCMythTV is still in a beta state, but it's very interesting in what it can do and how it manages to do it.
Summary
- An Xbox is a PC that, when modded, can run arbitrary x86 code
- Both Hardware and Software mods exist, each with their own pros and cons
- Several Xbox-specific Linux distributions are available with different benefits and disadvantages
- An Xbox can be used to connect to a MythTV backend from inside Linux and in XBMC via scripts
- All of it can be done without ever opening the case
Notes:
The sections above are littered with links, so feel free to navigate to those areas or search this document for the subject you need more information on. As always, if you get stuck, a good search engine is your friend.
Happy hacking,
A.C.
******