!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!!!!!!!!!!                 WARNING               !!!!!!!!!!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

Don't use this tool if you have no way to recover from a 
bad flash! I have tested it, but not every possible BIOS 
patch. A bogus profile entry will either cause the 
patcher to fail, or hose the BIOS file.

Use this software at your own risk.
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

Thanks to Paul Bartholomew for xbflash, to superfro for 
his BIOS mods, and to k3rn3l and MomDad for ideas, 
info and support. Thanks to SantMat for his ultra-smooth
no-animation patch. Without these people, XBtool would, at 
best, be much less functional than it is, and, at worst, 
nonexistent.
============================================================

Extracts, compiles, and patches XBOX BIOS/kernel files.

You'll need to supply your own RC4 key for older BIOSes. If 
you are working with a BIOS which works with both the old 
xbox and the "1.1" xbox then you don't need an RC4 key.

The DVD checkbox is used to disable the DVD check so that 
the Xbox will boot with no DVD drive installed. This might 
be useful if your DVD drive is dead.

===========================================================
About the Boot Options

X2 BIOSes have 3 partions options. It'll try to boot the
top one first and then go on to the next one if the dash
isn't found on that partition. The same goes for the names.
The first to dash names can be 12 characters, including the
extension (don't forget the extension!). The third is 10
characters.

Evox is the same but with two partition choices. The second
dash name can be 18 characters long.

I tested using a backslash in the name on an evox dash and
was able to boot a dashboard in a subfolder. I haven't
tested this on an X2 BIOS, but I assume it will work.

===========================================================
This is a beta. Expect bugs. If you 
don't like bug then don't use beta software.

Things to do:

-Better documentation.

-Some docs for developers

-Release the source code
 (after final 1.0 version release)

==========================================================
Bug reports to xbtool@alltel.net

Feature set final. Source code will be released if no bugs
are reported in this release.

I need good feedback if anyone suspects a bug. Bug reports
like, "Sometimes xbtool makes bad bioses," are not
helpful. If you suspect XBtool made a bad BIOS, reload
that BIOS into XBtool and see if it reads ok. Then note
the settings and include them in your report. If possible,
try to see if the bug is repeatable. I may ask to see a bad
BIOS file, but please don't send any unless I ask. 
==========================================================
History:

1.0 RC5 Dammit!--

-Crash on load abort fixed.

-Preset load/save fixed.

-NghShd spanks himself for making so many changed in a
 release candidtate.

1.0 RC4--

-Sorry, I was hoping the next release would be a final, but
 some things broke in the last release-nothing patch
 related.

-Fixed log file (and enhanced log file output handling
 while I was at it).

1.0 RC3--

-Dynamically finds kernel RC4 (thanks stealth).*

-Source code for the xbflash code and patchers released.

 *This is not the main key used for opening a BIOS.


1.0 RC2--

-Error notification dialogs fixed.

-Default color for inner glow really fixed (I hope).

1.0 RC1--

-Log file output.

-Code cleanup.

-Default color for inner glow fixed.

0.9.10 --

-Variable length main RC4 support (for > 1.0 BIOSes).

-Changed config code (don't use old multi config).

0.9.9 --

Fix: Bug in new LED patch code.

0.9.8 --

-Scale the X.

-Reworked patch code somewhat so that it will be easier to
 understand when the source code is released.

-Fix: dash boot order was wrong (thanks KanandaKid).

-Fix: Default color for the lip was wrong (thanks Morglum).

-Fix: not loading LED presets (thanks MomDad).

0.9.7 --

-Added option to change the DVD default xbe filename.

-You can now use 14 characters in the first two dashboard
 names in X2 BIOSes.

-Patch code tweaks.

-Fix: temp files not deleted on click close box instead of
 quit button.

0.9.6 --

-Enhanced boot options allow separate choice of partions
 and dashboard names. Up to 3 of each. Dashboard in a
 subfolder works.

-Presets changed slightly. DVD check and boot options
 not saved. Not much point really, and it's better not to
 have those things change when you probably just wanted to
 change colors. (If everyone thinks I'm wrong on this I'll
 fix it).

-File path finder changes should help on wide character
 set systems where config files weren't opening properly.
 (Thanks Myria.)

0.9.5 --

-Some people seemed to be having trouble with the archive
 on the prior release, so maybe this one will work better.

-Added filesize button. Now files can be resized without
 having to be modified--saving a file with the Save button
 always modifies colors slightly due to rounding errors.
 Plus it's quicker and works with any BIOS.

-Bugfix: LED timings reversed.

0.9.4.2 --

-Important Bugfix in all but 4977 patcher. Don't use
 0.9.4+ on anything but 4977 (0.9.4.2 and up okay.) Sorry,
 it's hard to keep supporting so many older BIOSes.

0.9.4.1 --

-Bugfix: LED saving codes wrong (e.g. choosing orange
 resulted in blinking green).

-Sorry. I really really really meant to not release another
 version for a couple of days (at least).

-uses a tmp directory for working files

-temp files deleted on exit.

0.9.4 --

-Flashing LED options. (Annoying, but some people like to
 be annoyed--who am I to argue?)

-Due to the new LED options the way the LED preset data
 is stored has changed. Rather than support another
 format, 0.9.4 simply loads the preset as is. I could have
 coded around this, but it's harmless. After loading an
 older preset you'll just have to set the LEDs manually
 (then you can save it again to fix it).

-Some minor reworking of the patcher code.

-Fix: commented out code writing out an MD5.txt file

0.9.3 --

-Replaced RC4 popup with BIOS type popup (better suited
 for handling MS debug BIOSes). RC4.ini no longer used.

-Xbtool.ini no longer used. Config files go in the Config
 folder and are selectable from the BIOS type popup.

-Should work with "boot from media 4977" using the
 correct config file (not tested but looks good in the
 hex editor).

-Misc. internal reworkings.

0.9.2 --

-Can now extract debug BIOSes.

-Bugfix: DVD check option enabling on preset load (thanks
 Arcann)

0.9 --

-Completely rewrote the patch engine.

-Completely rewrote the BIOS recognition routines.

-Profiles no longer needed (due to the changes mentioned
 above)

-Removed the function for manually choosing the base BIOS
 type (no longer needed as per above).

-Fixed what was probably a long standing bug in the 4975
 patch profile (I never was able to test 4975 because it
 hung my machine).

-Fixed broken terminology. What was the lip spot color is
 now correctly (I think) termed the lip color. What was
 the lip color is now termed the lip highlights. I think
 it's a more accurate terminolgy. (Preset files not
 affected by the change.)


0.8.52 --

-Yet another preset bug. (Thanks MomDad)

0.8.51 --

-Bugfix: version 1 presets weren't being read properly.

0.8.50 --

-SantMat's power LED color patches.
-Base profile types wrapped into the exe.
-Added menu command to allow manual choice of the base 
 profile type for an unknown BIOS.
-Bug fix: RC4Processing was broken.
-Bugfix: BIOS extraction was broken.
-Bugfix: display bugs.

-Major internal code overhaul. (Watch out for bugs!)
-Warning: LED color patches not fully tested on all
 supported BIOS types.

-Warning! I'm too tired/lazy to test all possible options
 and BIOS types so don't flash if you can't fix it!

0.8.27 --

-Bad news: the preset format changed. I didn't plan to make
 another release so soon, but I figured since the preset
 format changed and people will lose their old presets,
 sooner was better than later.

-Preset format changed. I really didn't want to
 do it, but it was needed for a bug that could cause
 problems later. Sorry, but that's beta for you. I hope the
 formats for presets and profiles won't change again, but
 no guarantees. I've provisioned for backward
 compatiblity for non buggy formats.

-Delete preset button.

-Fixed BIOS MD5 to match Evox (I broke it somewhere along
 the line)

-Much code cleanup. I may be able to do a 1.0 final soon
 and release the source.

0.8.25 --

-Presets (stored in individual files so they can be
 exchanged with other users).

0.8.20 --

-Profiles in individual files.

-Saves profile when BIOS is saved.

-Profile saving allows modded BIOS files to be loaded.

-Reads BIOS features from the kernel.

-DVD check checkbox disabled on x2 BIOS's (It's always
 disabled).

0.8.11 --

-Added back the no splash logo patch which I (wrongly) 
 thought didn't work. (thanks MomDad)

0.8.10 --

-SantMat's no logo patch.

-SantMat's no dvd drive check patch.

-Color pickers for full control of the two inner X colors.

-Fixed: bug in profiles.ini made the TM symbol off when 
 the option was checked.

0.8.9.1 --

-Protection from patching an unknown BIOS.

0.8.9 --

-New, totally silent noani patch

0.8.8 --

-Color picker for lip spotlight.

-Two-color X logo system. 

0.8.7 --

-fixed multimonitor issue with the color popup

-text error in the color popup

0.8.6 --

-Color picker for X edge

-Purple option

-Automatically sets appropriate edge and "XBOX" colors 
 when a color radio button is clicked, so you don't have to 
 go through the color pickers if you just want a matching 
 motif (you can then change these if you like).

-Profiles.ini changed again. I didn't have time to do a D.6
 profile, due to the many changes in the way the 
 profiles.ini works.

-Various internal reworkings.

0.8.5 --

-Color picker for setting the color of the word XBOX

0.8.4 --

-Better error messages

-Fixed Profiles.ini for D.6

0.8.2 --

-BIOS sizing.

-Separate settings for X logo color and XBOX color.

-Changed Profiles.ini for seperate color patching.

-Lots of internal reworkings (possibly added bugs).

-Fixed bug where .bin was being added to bios files even 
 when they already had a .bin extension. 

0.8 --

-MD5 for ID of BIOS files and kernel versions.

-Patches BIOS if a BIOS profile is available.

-Patching of for color/animation/logo/boot-drive.

-User editable profiles in "Profiles.ini" allows for 
 support of any BIOS.

-RC4.ini allow up to 9 users supplied RC4 keys.

-Copy MD5 to clipboard.

-Numerous other internel changed.

0.2 --

-Initial release.

-------------------------------------------------------------
The flash packing/unpacking code is based on 
Paul Bartholomew's xbflash util.
-------------------------------------------------------------

-NghtShd