Xbox Image Grabber 2 (XIG2)
---------------------------

Warning:

XIG2 comes with no guarantee of workmanship and none of the contributing developers accept any responsibility for any damages
incurred by its use or misuse.  XIG2 is a hobbyist project and use of any of our developments/experiments is purely at your
own risk.  

Preamble:

Please take a few moments to read the following because a brief understanding of how XIG2 works will likely make using it
clearer and easier. 

A proper debug Xbox has a debug bios that allows it to run two programs in parallel.  The first program an Xbox with a debug
bios runs is e:\xbdm.dll.  When this file loads, it connects to the Xbox network adapter and listens on TCP port 731 for
remote commands.  The second program it loads is a dashboard.  This dashboard, in turn, can load other apps or games.  When
you choose a game or app and load it, it actually overwrites the memory space used by the dashboard and executes.  The
xbdm.dll file, however, remains in memory and continues to run as a separate process.  In short, a debug Xbox has two
separate processes (programs) running at one time: the actual debug programming and whatever game/app/dashboard you’ve
started.

Some games, however (Halo 2, for example), are problematic in that when they start up, they actually overwrite the memory
space used by the xbdm.dll file.  This causes your Xbox to freeze or sit at a black screen.   That is why some games appear
to not work on a debug bios.

Now, if you connect to TCP port 731 on your debug Xbox, you can send some commands that make it do different things.  One of
these commands is “screenshot” which causes the debug Xbox to reply with a dump of the screen buffer (DirectX).  You can try
this yourself by telneting into port 731 of your Xbox.  Now if you can capture this screen dump data and convert from DirectX
to, say, a bitmap, you will see a snapshot of the Xbox screen.  The program xbcapture.exe that is included in the XDK does
just that; it connects to TCP port 731 of the debug Xbox, sends the command “screenshot”, grabs the raw DirectX data sent
back, and converts it to a bitmap (.bmp) image.   Although this is quite handy, running xbcapture.exe from the command line,
converting the resulting bitmap image to a web friendly format and then uploading to a web server is unnecessarily tedious
and time consuming.  Wouldn’t it be nice if there was an app that would automate executing xbcapture.exe and then convert the
files to jpg and upload them for you?  Well, that’s what XIG does.  

Xbcapture.exe and the corresponding .dll files are part of the Xbox Developer Kit and not publicly available.  It would be
nice if some kind soul would make an app that does the same thing so that it could be included in the XIG package.  Such a
program would need to connect to TCP port 731 on a debug Xbox, send the command “screenshot”, and then grab the raw DirectX
(DDS format) data and convert it to a usable image format.  Well, the name of this kind soul is Magus.   Magus has written an
app called dds2.exe which, among other things, retrieves and converts images off a debug Xbox.  Thanks to him, XIG2 no longer
requires any XDK files whatsoever.  Of course, this presupposes that you have a debug Xbox (ie: an Xbox that is running a
debug bios).   The XIG2 pc application, however, is free of any XDK software.



Acknowledgements

The dds2.exe program is written in Delphi (http://www.delphi.com) and uses the DevIL image library to handle the DirectX to
bmp (and other) conversion (http://openil.sourceforge.net/)

The XIG2 User Interface is written in Delphi7.
- Uses IndyFTP
- Uses Devil image library
- Uses PNGlib


Special Thanks

Magus and Prestige would like to thank the users of XIG for your invaluable feedback, unending encouragement, and ongoing
support for the project. 






