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

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 and 
EvolutionX D.6 BIOSes.

Bugs:

-The no logo option doesn't work on D.6 and X2 4974.

-Miscleaneous cosmetic stuff.

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)

==========================================================
History:

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 "Profile.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
