THE XBOX HARD DRIVE


The Xbox is "compatible" with any standard computer IDE hard drive.  Compatible means just that "compatible".  For 100% functionality (For both the Microsoft O/S and Alternate Dashboard), the drive nust be LOCKABLE.  I have tested tons of HDDs, and found that anything MFGed from 2002 up should "Work", but I have found a few 10GB drives that do not lock.  The MFG date of the HDD must be at least the same period as the Xbox releace.

OK, Stock drives are 8GB (Western Digital) or 10GB (Seagate) drives, but even at 10GB, only 8GB is addressed from what I have read.  The original Segate was 10GB, only formatted to 8GB.

Note: To access the extra 2GB of space, using EvoX, using the evox.ini file:
Item "Install F drive",@215

Then add this section to the very bottom of the ini:
[Action_15]

Info "Install F_Drive HDD"
Warning "This will not format all drives, Only the F Partition."
Warning "Make sure you have a backup of C & E anyway."
Progress "Formatting drive"
ConfigSector "\backup\disk.bin"
Format f:

After you save the changes to the ini file, reboot and choose Install F drive from the menu.

This does not work with the Western Digital 8GB drives, only the SEAGATE HDDs.

As you know, F drive is not EMPTY or NULL anyway, this will get you 2GB of space for some applications.  Better than nothing, huh?


The Xbox HDD uses FATX, not FAT16 or FAT32.

FORMAT DRIVE USING RAW FTP COMMANDS:

With Evox Dash booted off CDRW/DVD-R, connect through FlashFTP (Windows) or Transmit (MacOS).

You will now need to send "Raw FTP Commands" with your FTP client. You may have to hunt through the pull down menus for an option called "send raw FTP command." Send the following "Raw FTP Command" with your FTP client:

Formatpath \Device\Harddisk0\Partition1

The FTP app will echo a hard drive key (later referred to as 'the number')
(display a long number in a dialog box). Use that key for the next command.

FormatDrive 'the number' (no quotes)

Do the same as above for the next few raw commands:

Formatpath \Device\Harddisk0\Partition2
FormatDrive 'the number'
Formatpath \Device\Harddisk0\Partition6
FormatDrive 'the number'

If you are using a +137gb drive and you flashed your xbox with a bios with LBA48 support with up to 137gb to F:  rest to G: (also called '67' or '6+7' or 'F+G'). You will also have to run this command to format your G: drive:

Formatpath \Device\Harddisk0\Partition7
FormatDrive 'the number'

Your drive is now formatted and ready to use. The X:, Y:, and Z: drives are made automagically.

Found at: http://www.xboxhackz.com/tutorials/hardware/hdd/hddftp.htm


PARTITIONS:
# C: This is the primary boot partition. The xbox dashboard & files are here.  Do not alter the files on this drive, except where applicable.

# D: This is the DVD drive.

# E: This is the drive that the xbox uses to store gamesaves, music tracks, and content download from xbox live.  There is about 5 gigs of space available on this drive. You can use some of this space to store files or apps, a FEW.   Try to make sure at least you have at least 1GB of frees space, or you might not be able to create new gamesaves.

# X: This partition is used during gameplay by the xbox. Leave it alone.
# Y: This partition is used during gameplay by the xbox. Leave it alone.
# Z: This partition is used during gameplay by the xbox. Leave it alone.


Why a hard disk?
Data Cache
Data Caching is the technique that lets the CPU/GPU to manipulate data files that are larger than the system's memory (RAM). 
By effectively streaming the level off of the hard drive and into RAM, the player is given nearly limitless levels without realizing that only a fraction of the level has been loaded at any given moment.

More Textures - Low Load Times:

The hard drive can also be used as a texture cache to store extra textures, so that games will have the most diverse and rich textures possible.

Rewritability
Rewritability is the constant exchange and saving of game data. The hard drive can do an excellent job of modifications.


Increased Replayability
With the hard drive and the LAN adaper, you can download new levels, tracks, arenas, characters, cars, weapons, costumes, spells, updated rosters, soundtracks, etc.! By allowing for software expansion, any given game can continue to grow in size and scope for as long as the developer and, possibly, the online community continue to work on it.

Create Your Game [I haven't seen this yet, personally]
More and more console games are beginning to ship with level editors. Similarly, Many Xbox games will have an editor section to let you create your own levels, tracks, and characters; then save them on the hard drive and perhaps share them with your friends or on the web.

Does the hard drive slow down when filled up with information?
No. It has been tested - there is no slowdown or loss of performance when the drive is full.

How many game save blocks does the OE hard drive actually have on the Xbox?
Just over 300,000.

Do I have to defragment the Xbox hard drive?
No. You don't need to. The Xbox hard drive has separate partitions for cache, music etc & there is no need to defragment the drive ever, period.

Failure Rate?
The Xbox HDD Failure Rate is no better or worse than a PC HDD.  As always, there will be some excaptions to that, you just get a bad one.  Power surges, and failures during HDD I/O are lead causes of HDD Failure and Data Corruption. 

What is Locking? -
Why does the HDD have to be locked?
Originally, locking was Microsoft's way of assuring you could not easily upgrade the hard disk, remove it and modify it externally.   The Xbox BIOS demands the HDD be locked in order to boot, without a modchip on.  If you boot an unlocked hard disk, you get the Error number at the top left of the screen, which means the drive us NOT locked.  You can get dashboard errors as well.  A modchip bypasses the LOCKING check, and will boot to an alternate dashboard without checking the status of the HDD.

BASIC LOCK EXPLANATION [DETAILED]
Initially the drive is unlocked. It is locked by sending a lock command followed by the key across the IDE bus. The drive then stores the KEY and lock status (locked or not) on the hard disk. This in stored in a non addressable sector on the harddisk. In other words the drive cannot be commanded to go to a particular sector and read the data to you.

Now we have a locked drive. Assuming the BIOS supports the IDE drive locking standard (not all controllers implement this) you will be prompted for an unlock code if booted in a PC. When you input the code, the BIOS sends an unlock drive command followed by the code. This code is compared to the code on the drive and if they match, the controller now allows for reads and writes to the rest of the drive.

The HDD will automatically LOCK if:
1) The power is removed from the drive, or 2) the drive is reset.  A drive is reset on any of the following conditions: the BIOS scans the drive (like at boot), the OS sends a LOCK command to the drive, or the OS installs the drivers for the IDE controller.

What you should know about a LOCKED Drive:
Known Drives Used:
Seagate 10GB                                                           DRIVE    LOGIC BOARD
Model number ST310014ACE
P/N: 9W1001--280
This is the Thin HDD.


Seagate 10GB
U Series 5                                       DRIVE     LOGIC BOARD
Model number ST310211A
P/N: 9R4005-279
This is the Full Size HDD, not the "Thin" Model.

Western Digital 8GB (Protege' Drives Used)      DRIVE   LOGIC BOARD
Model number WD80EB-00CGH0
WD P/N: WD80EB-00CGH0 

Western Digital 8GB
Model Number WD80EB-28CGH2
WD P/N: WD80EB-28CGH2
Date: 11-OCT-2004
           25-OCT-2001
          
12-APR-2002

Western Digital 8GB
Model Number WD80EB-28CGH1
WD P/N: WD80EB-28CGH1

Western Digital 8GB
WD P/N: WD80EB-28CFH2

FATX

The Xbox hard drive file system is known as "FATX".  It is basically a FAT derivative that dropped some legacy fields as well as redundant information that could lead to inconsistencies, creating possible security problems.

The FAT filesystem consists of the boot block (or superblock in Unix jargon), the File Allocation Table(s), the directory entries and the actual file data. The File Allocation Table format and the file data layout on disk are actually identical on FAT and FATX.

The Superblock

The DOS boot block is partially defined by the IBM-PC hard disk layout (boot program, OEM string, ...). FATX has a very different boot block. The actual data is 18 bytes long, but the complete boot block always occupies 4 KB.

Offset Size Description



0 4 "FATX" string (ASCII)
4 4 Volume ID (int)
8 4 Cluster size in (512 byte) sectors
12 2 Number of FAT copies
14 4 Unknown (always 0?)
18 4078 Unused

On the Xbox, the cluster size is always set to 32 sectors (that's 16 KB) and the number of FATs is always 1. With conventional methods, there are always TWO "FATs", one is a backup.

As you can see, the FATX boot block lacks some fields the PC formatted FATs use:

Field FAT Version Comment
Bytes per sector all Always 512 on FATX
Reserved clusters all no reserved clusters on FATX
Number of root directory entries all Always 256 (one cluster) on FATX
Number of sectors all Redundant, definied by partitioning
Media code all Legacy
Number of sectors the FAT occupies all Redundant, can be calculated with volume size
Sectors per track all Legacy
Heads all Legacy
Flags ("Fat Mirroring", "Active FAT") FAT32 only Not supported on FATX
Filesystem version FAT32 only There will never be more than one version of FATX.
First cluster in root directory FAT32 only ???
Filesystem info sector FAT32 only Not supported on FATX
Backup boot sector FAT32 only Not supported on FATX

The File Allocation Table

The (single) File Allocation Table always starts at position 4 KB of the filesystem. Its format is identical to the FAT16/32 formats. Partitions with less than 65525 clusters (smaller than about 1GB) will be FATX16, else FATX32. Just as FAT16/FAT32, FATX16 has 16 bit FAT entries and FATX32 has 32 bit FAT entries.

On the Xbox, partitions 0, 1, 2 and 3 (A0, B1, C2 and System3) are FATX16, partition 4 (Data) is FATX32.

The size of the FAT can be calculated like this (cluster map size entry being 16 or 32): 

FAT size in bytes = ((partition size in bytes / cluster size) * cluster map entry size) rounded up to the nearest 4096 byte boundary.

The Directory Entries

Standard PC FAT directory entries are quite complicated because of their ancient original design and the downwards-compatible extension to long file names.  FATX has directory entries similar to the orginal FAT ones, but with long filenames (up to 42 characters).  Any directory entry longer that 42 characters is ignored, and not written, or are truncated, not exactly sure.

A directory entry is 64 bytes long, thus a cluster can contain up to 256 directory entries. Subdirectories can contain more than 256 entries, since they may consist of more than one cluster, as on FAT.

A directory entry looks like this:

Offset Size Description
0 1 Size of filename (max. 42)
1 1 Attribute as on FAT
2 42 Filename in ASCII, padded with 0xff (not zero-terminated)
44 4 First cluster
48 4 File size in bytes
52 2 Modification time
54 2 Modification date
56 2 Creation time
58 2 Creation date
60 2 Last access time
62 2 Last access date

The order of the three time stamps has not yet been verified, the order in the table corresponds to the order in VFAT directory entries. The format of the timestamps looks a lot like the DOS one, but this has not been fully confirmed yet.

Note that FATX doesn't support Unicode filenames. The file names are case insensitive but case preserving, as on FAT.

Deleted files are marked with a value of 0xe5 in the filename size field. (FAT marks deleted files with a first filename character of 0xe5.) A directory entry with a filename size of 0xff marks the end of the directory.