!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!!!!!!!!!!                 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.

I have included profiles for the basic X2 4974 Multiver 
BIOS, and EvolutionX D.6. More will be added later.

Note: the profiles.ini file format is still changing. The 
basic principles are the same, but keywords and key formats
have changed.

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.

The x logo checkbox is used to disable the big 'X' logo. 
Unchecking this automatically disables animation, otherwise
you get a blank screen but still hear the animation sounds.
When the logo is off, don't panic when the screen remains
black for a few seconds after booting. This is normal.

The splash logo is that little graphic that fades in right 
before the dash appears.

Some things NOT to do with this:

-Don't encrypt a BIOS that was originally unencrypted. 
 (I've added *some* protection against doing so.)

-Don't add your own BIOS profile if you don't fully 
 understand what you're doing.


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

The ini files are probably not very fault tolerant at this
stage.

The profiles.ini format may change in the future. For now, 
it works like this:

This kernel ID string:
[5B5CCA0FECE1A5EDEFC26C3655DC1747]

Identifies the base type of BIOS. If you start with a basic
BIOS and patch it for new option, then a new profile will 
be added and the patched BIOS will be recognized if loaded 
later.

The following items should be mostly self-explanatory:

Name=X2 4974 Multi   --- base BIOS name
Color=1              --- X logo color
Animation=1          --- boot animation
Logo=1               --- splash logo
Boot=C               --- boot partition

Next come the patch lines:

RedPatch=05:0005C0BD:08:00:00:FF:FF:68:00:00:01:0005CA4F:04:FF:FF:FF:FF:0005CA62:04:24:97:7F:3B:0005CB0D:01:20:0005CC0F:03:00:00:CA
GrnPatch=05:0005C0BD:08:4B:9B:4B:FF:68:00:01:00:0005CA4F:04:A8:C6:4B:3F:0005CA62:04:24:97:7F:3B:0005CB0D:01:18:0005CC0F:03:13:CA:62
BluPatch=05:0005C0BD:08:FF:00:00:FF:68:01:00:00:0005CA4F:04:A8:C6:4B:3F:0005CA62:04:FF:FF:FF:FF:0005CB0D:01:20:0005CC0F:03:CA:00:00
AnimPatch=01:000574AC:02:90:90!74:09
LogoPatch=01:00056AA6:02:90:90!75:0B
BootPatch=03:00002A17:00002A43:00002A6F

The first two digits represent the number of non-contiguous 
patches. Next comes the address of the first patch, then 
the length of the patch, then the patch data. Repeat...

The logo and animation patches are similar, but the off/on 
patch data is seperated by a '!' character.

The boot partion patch data simply contains the addresses.
The data is stored internally.

Things to do:

-Include more predefined profiles.

-More boot partition options.

-Better documentation.

-Lots of code clean up and error control/notification.

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

==========================================================

Supported BIOSes:
Xecuter2 4976.02
Xecuter2 4976
Xecuter2 4975
Xecuter2 4974 Multi
EvoX D.6
EvoX D.6 Eject Fix

History ( No changes to the app since 8.11.1-- just added new profiles):

0.8.11.5:

Added a profile for Added a profile for Evox D.6 Eject Fix. 

0.8.11.4:

Added a profile for x2 4976.02. 

0.8.11.3:

Added a profile for x2 4976. 

0.8.11.2:

Added a profile for x2 4975. 

0.8.11.1:

Added a profile for Evox D.6. 
Only one file selection dialog can be opened at a time. 

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:

SantMat's 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 filenames 
even when they already had a .bin extension. 

0.8.0:

MD5 for ID of BIOS files and kernel versions. 
Patches BIOS if a BIOS profile is available. 
Patching for color/animation/logo/boot-drive. 
User editable profiles in "Profiles.ini" allows for 
support of any BIOS. 
RC4.ini allows up to 9 users supplied RC4 keys. 
Copy MD5 to clipboard. 
Numerous other internal changed. 

0.2.0:

Initial release. 


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

-NghtShd