The trouble with xbox is…
The XBox as an emulation platform is not without it’s problems.
While it is incredibly affordable, there are additional costs involved due to it being a game console first, and a stripped down PC second. For example, the video connector is proprietary, so if you buy a console without a video cable as I did, you’ll need to order one. The USB ports are USB1.1, but their sockets are non-standard proprietary, so to use a keyboard and mouse with it, you’ll need to order or make adapters. Then there’s the copy protection…
I’ll run down the costs involved in my project later in this post, but for now, I want to turn my attention to the technical part of modifying the XBox, which is a little hampered by it’s copy protection / anit-piracy measures. There are also legal issues regarding these measures, which I’ll omit here and cover later, please do read my page on Legal Concerns to be informed.
As I mentioned earlier in this post, the XBox is essentially a PC with a cut down version of Microsoft Windows running on it. For our purposes (making an Amiga) however, that windows operating system is useless, because we can’t simply use it as though it were full-blown windows and run an emulator on it. The reason is simple enough. Software piracy had been a huge issue on earlier games consoles, and Microsoft attempted to get ahead of the pirates with the Xbox…
When the XBox (and just about any computer) starts up, it’s processor needs instructions on what to do. The processor gets these instructions from a little program called a BIOS (basic input/output system). The BIOS doesn’t do anything that the end user might consider useful in application terms, but instead, it tells the processor how to interact with all of the components on the motherboard. For example, it contains the instructions for displaying images on the screen, connecting to a network, reading from the keyboard/controllers, and reading from the disk drives etc.
The BIOS is a relatively small piece of software which is embedded into a chip on the motherboard, connected directly to the processor. It is not, however, sufficient to make the system usable for playing games or running productivity software. For that, we need to load an operating system. The very last thing that the BIOS does, is to read the operating system from disk into memory, so that the processor can begin running it.
The XBox BIOS is stored in a chip on the motherboard called the TSOP, (not sure what that stands for, but it’s not entirely relevant here), and it loads a program called the Dashboard. The Dashboard can be seen as the menu screen that you get when the XBox starts up, and after the ‘flubber’ animation. For our purposes the Dashboard is the front-end of the operating system, and from here-in I may well refer to the operating system as “the Dashboard.”
Microsoft put several measures in place to prevent software piracy. The first, and most critical measure, is that the operating system will only load programs that have been digitally signed. Each XBOX game contains a signature which can be validated by the operating system, and must be before the operating system will run it. As we’re not licensed game vendors for the console, we have no way to sign our Amiga Emulator software, and so the XBox operating system will not run it. In order to make the Amiga Emulator run, we’ll need to replace the Dashboard with another operating system.
The technical difficulty with replacing the Dashboard is that the XBox (for obvious reasons) does not provide any software feature to do so. If we’re going to replace the XBox operating system, we’ll need to run a piece of software to do it, and as we’re already aware, the XBox will not run our software because it isn’t signed. Catch-22? Not entirely…
Every piece of software you’ve ever used has bugs in it! In only the most rare scenarios, under special engineering conditions, would you ever find software which is entirely bug free. It’s a simple fact of life in software. Sometimes however, bugs aren’t entirely a bad thing. Since we want to get a piece of software to run on our XBOX without it being signed, if we could find some bug in the XBox it’s self, or some piece of signed software, which allowed us to run our own un-signed software, we could ‘exploit’ that bug.
This is in fact how the clever reverse engineers in the early 2000’s managed to replace the XBox Dashboard with various flavors of Linux. I’ll put a page in this post about the ‘buffer overrun exploit’ used to modify the XBox for those interested (skip it if you’re not), but for now let’s just say it IS possible to get the XBox to run software that is not signed through the use of an ‘exploit’.
There are a handful of games for the XBox which have a bug that can be exploited. It’s possible to use these exploits to install something called a ‘soft-mod’ which essentially means replacing the XBox Dashboard with a custom Dashboard that will happily run un-signed code. Having used the exploit to replace the Dashboard, you’d forevermore be able to run anything you like on the XBox! Perfect right? Well, not exactly.
There are some legal issues with using a soft-mod, which I’ll look at in another page later, but there are also still some technical challenges…
One important challenge is another anti-piracy measure put in place by Microsoft. The XBox hard-disk is a ‘lockable’ hard disk, which is locked by default. While the hard disk is locked, it is not possible to read data from it, it must be unlocked first. The job of unlocking the hard disk is performed by the BIOS using a special serial number as the key.
This will not prevent you from running a Dashboard with an Amiga Emulator in it, and there are several available, but it does mean that if your hard disk ever fails (and it may well do, it’s already over 20 years old), the XBox would simply stop functioning.
It used to be that in order to circumvent this issue with soft-mod XBoxes you’d have to have a spare hard disk, already prepared with the same locking key, on stand-by in case your main disk failed. More recent soft-mods allow you to ‘null’ the locking key, which removes this problem, but would still leave you needing both a spare hard disk which is lockable as a replacement, and another computer capable of pre-locking the spare before installation into the XBox.
To make matters worse, that spare hard disk would need to use the, now greater than 20 years old technology, IDE cable connector and your computer for locking the disk would need to support the same cable interface. So, ideally for the longevity of our Amiga Emulator machine, we would like to replace this hard disk with an unlocked disk.
Another challenge with soft modified XBox consoles, also related to the hard disk, is that while they will run Linux installations, those installations do not gain native access to the hard disk. Instead, they run inside something called a ‘loopback partition’, which is essentially an emulated hard disk. This is far slower than having native access to the hard disk, and so we’d like to have that.
The third, and final challenge I’ll mention with regards to soft-modded XBoxes is that the available Dashboards are designed with the machine being a games console in mind. They are helpfully menu driven, to be operated by a game-pad controller. Unfortunately, this does make them somewhat cumbersome to use. I plan to attach a full keyboard and mouse to the Amiga Emulator machine, and so I don’t need or want these menus. In fact, at the end of the boot process, I want it to effectively be an Amiga.
Thankfully, it is possible to modify the hardware of the XBox in such a way that we can replace the BIOS. Doing so would allow us to remove the requirement for a ‘lockable’ hard disk, we could put in any hard disk we like. It also allows us to have the BIOS load the Linux operating system (rather than a Dashboard), in such a way that it would not depend on a ‘loopback partition’, improving performance. It will allow us to boot right up into Linux, which is configurable enough that we can use it to automatically start the Amiga Emulator so that at the end of our boot process, we have (effectively) an Amiga.