================================================================================
 \ \  / (____  \                   _   (_)_   (_)                        
  \ \/ / ____)  )____   ____  ____| |_  _| |_  _  ___  ____   ____  ____ 
   )  ( |  __  (|  _ \ / _  |/ ___)  _)| |  _)| |/ _ \|  _ \ / _  )/ ___)
  / /\ \| |__)  ) | | ( ( | | |   | |__| | |__| | |_| | | | ( (/ /| |    
 /_/  \_\______/| ||_/ \_||_|_|    \___)_|\___)_|\___/|_| |_|\____)_|    
================| |=============================================================
                |_|                   Xbox Hard Drive Partitioner and Formatter

Version 0.8

 Can now edit partitions 0-5.
 Partitions can be enabled out of order.
 Start button action selection.
 Added button combo for undo.
 More UI tweaks and bug fixes.

Version 0.7

 UI updated.
 Help screen updated.
 Fixed failure to format some partitions.
 UI and input fixes and tweaks.
 Thanks to kl0wn (DIE! Mr. kl0wn!) for graphics help.

Version 0.6

 UI updated.
 Allows custom sizes for partitions 6-14.
 Function to distribute space equally among enabled partitions.
 Enabled partition table writing on version 2 LBA48 patch.
 Drawing code updated.
 
Version 0.5

 Added drive formatting toggle (thanks to h3inrich for help).
 Big warning before formatting.
 No longer uses font files (thanks to h3inrich for making me do that =).
 No longer needs to reboot after changing partitions.

Version 0.4

 Only adds display of the LBA48 version. I know that's a minor change
 for an update, but if anyone reports a problem getting it to work this info
 will be important.

================================================================================
This is NOT partition magic. If you change a partition it should be formatted.
If you format a partition all data will be lost on that partition. The built-in
formatter will not format unchanged partitions*, but be aware that XBpartitioner
fixes partitions with sizes which are not multiples of 32 sectors so a
partition's size may change when you think it didn't. However, as long as you
don't use the quick setup buttons or directly manupulate a partition its size
shouldn't change even if the size is not a multiple of 32 sectors.

* The single partition format action doesn't check whether the partition has
changed.
================================================================================
Limitations:

 - Doesn't allow changing of partition's start address.
 - Partitions must be created in order.

================================================================================
Keys:

 A = No LBA48 partitions
 B = F gets remainder, no G
 X = F up to 137GB, G gets the remainder
 Y = F & G split remainder
 L-Trigger = increase partition size (if disabled, partition will be enabled)
 R-Trigger = decrease partition size
 D-Pad-Left = increase partition size by 1GB
 D-Pad-Right = decrease partition size by 1GB
 R-Thumb = enable\disable current partition
 L-Thumb = distribute allocated and free space among extended partitions
 L-Thumb + R-Thumb = undo all changes since last write
 Black = erase partition table
 White = select Start Button action
 Start = write & format changed partitions\write only\format selected partition
 Back = help
 
 Pressing the Y button will allocted all space above the standard
 partitions and equally distribute it among all enabled extended partititions.
================================================================================
XBpartitioner should run under most any BIOS, but it only supports those with
LBA48 code which follows Paul Bartholomew's standard (introduced with the
original LBA48 patches used by XBtool). LBA48 patch version 2 is supported, but
it is recommended that you update to version 3 if you are using a patched
kernel.

Changing partitions 2, 3, 4, and 5 is not recommended.

Changing partition 1 should be safe, but you shouldn't use a BIOS which doesn't
read the partition table from the disk if you do this. That means all non LBA48
BIOS's and X2 4979 and up should NOT be used with a modified partition 1.

The LBA48 info checking code in XBpartitioner is mostly copied from a post made
by Paul Bartholomew on xbox-scene.com.

Feel free to beautify this thing if you have DX skills!
================================================================================
-NghtShd