Retail To Debug – Convert your normal XBox into a development machine

Tutorial written by Hydra – Last Updated: 8/July/2003

The aim of this tutorial is to allow you to convert your normal retail XBox machine into an XBox that can additionally behave as development XBox machine.

  1. 1. Developing your own XBox software and being able to use full remote debugging facilities
  2. 2. Screen grabbing and movie grabbing
  3. 3. Reverse engineering software (for making game trainers, etc)

There are plenty of other uses too, but those are the main three.

This tutorial is not aimed at beginners, it’s assumed the read has a good understanding of computers, consoles, programming and hardware. However, it is reasonably easy to do and plenty of screenshots have been provided so that you can see the outcome of this tutorial

Install A Mod chip

Note: These are just the basic steps, there are other tutorials on how to install mod chips and flash them with bios files

Install a mod-chip that has a 1MB bios, I highly recommend the Xecuter2:Pro 2.2 mod-chip as it’s got a 1MB bios and you can re-program it from your PC via the parallel port.

I installed an X2:Pro 2.1 in my system (the 2.2 wasn’t out until, typically, the week after I bought my 2.1), easy enough to install, just the d0 point (small grey wire in photo below) that you have to be careful with, get a good soldering iron like the Antex SK25 and a small tip (i used a 0.5mm tip as they were out of 0.12mm tips, do not use the one that comes with the iron (normally as 3mm tip) as it’s way to big for the d0 point.

Note: in the photo above I’d not yet connected the grounding strap to the motherboard!

Obtain some BIOS ROM images

Use IRC (HydraIRC) or a file sharing application (DCPlusPlus) to obtain some BIOS ROM images

On my v1.2 XBox console i used the following bios files:

X2_4977.bin EvoX V3.6_EjectFix – V1.1.bin TATX_Debug_Dual_VGA_LameOne_beta.bin

Flash the modchip with the bioses using XBM (X2BM – XECUTER2 BIOS MANAGER v1.1), I used the following locations:

Bank1: X2_4977.bin [256kb] Bank2: EvoX V3.6_EjectFix – V1.1.bin [256kb] Bank3 and 4: TATX_Debug_Dual_VGA_LameOne_beta.bin [512kb]

Like this:

Enable the modchip and use Bank 1 (the X2 bios) (Dip switches 3 & 4 up on an X2:Pro 2.1)

Turn the XBox on, if you see the normal MS Dashboard screen (and an X2 logo on the screen before it) you’re in business!

Setting up your XBox

Get hold of Slayer’s installer, I suggest installing HydraIRC and run it, then click the following url: irc://snoop.burghcom.com/SlaYerS and read the messages when you join the channel. (basically, join the channel and type in ”!installer”, without the quotes, into the channel window, and this will start a download)

Burn the Slayer Installer ISO to a CDRW – not CDR (most XBoxes won’t read CDR discs without some jiggery-pokery)

Configure your machine to run a DHCP server (e.g enable internet connection sharing)

Connect your XBox to your network (either via a crossover cable or use 2 normal cables and a hub/switch)

Boot the Xbox from the CDRW

Select the backup option (this backs up your EEPROM data and stores some important info in C\Backup on the XBox’s HD

You should see that your XBox has a valid IP address if your DHCP server is working, if not fix the problem and reboot the XBox until you get a valid IP address.

You can now connect to your Xbox via ftp (default EvoX setting for username is “xbox” and password is “xbox”)

For example, ftp://xbox:xbox@ ftp://xbox:xbox@192.168.0.200

Recursively backup the C E and F folders on your xbox’s HD via ftp to somewhere on your pc. e.g. create “d:\xboxbackup” so it has C E F folders after the backup. then zip up “d:\xboxbackup” so you have xboxbackup.zip and burn it to a cd or something so that you always have a copy of the files that were on your XBox’s HD when you bought it.

Now use the Install New HD option from the XBox slayer installer menu, this will format your XBox HD (don’t worry!) and install EvoX dashboard and some basic apps.

Take the CDRW out and reboot the XBox , you should now have EvoX running on your XBox .

ftp to the xbox as before, this time backup all the files as before to a different folder, e.g. “d:\My XBox”

Your xbox is now setup and ready for us to put the XBox SDK stuff on, so let’s get started.

Install PC development applications

Install Visual Studio.NET (you don’t need anything except Visual C and everything under the visual c folder)

Install MSDN if you feel like it, though note that the XDK comes with most of the information you’re going to need for actual xbox coding.

Make sure Visual Studio.NET is not running.

Now install the XBox SDK: run “xdksetup5558.exe” from the XBOX_SDK_5558_June_2003_XBOX-COMPLEX release (cpx-5558.*)

Now if you fire up VS.NET you’ll see a little xBox logo on the splash screen, cool ;)

Close VS.NET again.

Extracting the required files from the XDKRecovery tool

Install WinRAR (I used v3.0) and start it up.

In WinRAR go to the location that you extracted the XBOX SDK to (i.e. the place that had xdksetup5558.exe in it) and double click (open) XDKRecovery5558.exe (yes, open, not run the .exe)

In it you’ll find lots of files, most of which sit on the XBox.

Using WinRAR, extract all the files somewhere, e.g. d:\extractedxboxfiles, overwrite all files in destination folder (there are different versions of the same file in the XDKRecovery5558.exe file)

Installing XDK files to your XBox

Now we need add some files from the extracted XDK files to your current XBox backup folder (e.g. copy the following files from “d:\extractedxboxfiles” to “d:\My XBox”)

Source (e.g. d:\extractedxboxfiles) Destination (e.g. d:\My XBox) Files to copy / Notes
\XDASH \C\ xshell.xbe only
\XDASH\data \C\data All files, recursive
\XDASH\images \C\images All files, recursive
\XDASH\media \C\media All files, recursive
\XDASH\sounds \C\sounds All files, recursive
\XDKSAMPLES \C\XDKSAMPLES All files, recursive
\XBOX \E\ dashboard.xbx and xbdm.dll
\DEVKIT \E\DEVKIT All files, recursive
\TDATA \E\TDATA All files, recursive

Now recursively upload all the files from your current XBox backup folder (d:\My XBox) to the XBox itself.

After you’ve done it, your folder structure should look something like this:

Right, that’s everything installed on the xbox, not if you were to just reboot you wouldn’t see anything different, that’s because the debug bios isn’t being used yet. Debug bioses look for ”\E\dashboard.xbx” when you turn your machine on, this file tells the xbox what program to load first, in the case of a debug machine it needs to load ”\C\xshell.xbe” instead of ”\C\xboxdash.xbe”.

Note: I wanted to use EvoX to launch XShell, but it appears that when “xbdm.dll” is present on the xbox’s E\ drive and the ”\E\dashboard.xbx” is pointing to ”\C\evoxdash.xbe” the XBox won’t reboot correctly. If anyone knows of a fix for this let me know.

Turn your machine of and switch your modchip over to use the debug bios that you installed earlier, then turn it back on, you should now be looking at the XDK Launcher application, follow on-screen prompts until you’re looking at the main screen of it:

Ok, that’s the hard part done!

Note the IP address is displayed on the screenshot above, this tells us that DHCP is working still.

From the start menu, fire up All Programs\Microsoft Xbox SDK\Setup Microsoft Windows Explorer Shell Extension for Xbox

Run through the wizard until it completes.

On your desktop you should see an “Xbox Neighborhood” icon:

Double click, then select “Add Box” and type in the IP address of your XBox (on my example above, i would have typed in 192.168.0.68), when it asks if you want to use this as the default XBox, select “Yes” and continue.

Your window should now look similar to this:

If you right click the XBox and select properties from the menu you get a dialog box which also has these options, neato!

If you want to screen capture, click “Capture” and a screenshot should be captured, the images are stores in your “My Pictures” folder (e.g. C:\Documents and Settings\User\My Documents\My Pictures”) (or you can use “xbcapture” from the command line)

Now, we want to test remote debugging:

Fire up VS.NET and open the solution: C:\Program Files\Microsoft Xbox SDK\Samples\Xbox\Graphics\Tutorials\Tut03_Matrices\matrices.sln

Use the Solution Explorer in VS.NET to open Matrices.cpp, scroll down to line 192 and click in the grey are to the left of the line, this places a breakpoint there, illustrated by a red dot, as seen here:

Now, press F5 to automatically compile, build, copy over and start debugging (press “Yes” when prompted to build), after a few moments you should see something like this on your PC:

This shows you that the program has started to run on the XBox, and that the PC has stopped the XBox on the line we selected! Awesome!

If you press F10 you can step through line by line, pressing F11 enters into the function on that line, so press F10 once, and then press F11 when the arrow is on same line as the call to Render().

Then press F10 until you’re on a line that reads SetupMatricies() and press F11 again, note how the callstack changes to show you what functions have been called, you can also examine the contents of local and global variables.

Additionally, and this is cool, you can make changes to the program while it’s running and then press F5 to continue executing the program.

If you remove the breakpoint and press F5 the program will run on your XBox and will look like this:

Exciting huh, a spinning triangle, woooooo!

Anyway, you get the idea. Enjoy!

Notes:

You can still switch back and forth between the Debug BIOS and the normal X2 bios after doing all this and you’ll still be able to play all your games. If you disable your mod-chip you should still be able to use XBox Live (although using XBox Live is untested).

Do not ask me or anyone else where to get BIOS or SDK files from, given the amount of information out there on the net you should be able to figure this much out for yourself.

Programming XBoxes is not for beginners, a firm grasp of C/C++ is required, however it’s a great place to learn about programming consoles.

Thanks:

All XBox mod-chip makers

All XBos BIOS makers

All XBox hackers and fiddlers out there

Everyone from #xbins-chat on EFNet

Greets:

Inertia, Shinbone, Zann, Rovastar

- Hydra