xboxscene.org forums

OG Xbox Forums => Software Forums => Xbox Bioses => Topic started by: halfelite on April 11, 2004, 10:22:00 PM

Title: Character Limit
Post by: halfelite on April 11, 2004, 10:22:00 PM
Just looking for some knowledge is the character limit in the bios or somewhere else and since you can now have lba48 why cant there be longer file names?
Title: Character Limit
Post by: heinrich on April 11, 2004, 10:42:00 PM
QUOTE
is the character limit in the bios

yes
QUOTE
why cant there be longer file names?

because no one has released a bios to do so?
Title: Character Limit
Post by: heinrich on April 11, 2004, 10:59:00 PM
Just to clarify what I meant by 'yes', 42 is defined in the bios as the max char length.  I have no idea if simply changing this value would work.  I would assume that 42 wasnt just some random number, and is what it is for a reason.  Maybe someone from team xecuter can comment on if they have played around with this value.
Title: Character Limit
Post by: halfelite on April 11, 2004, 11:19:00 PM
Hope someone looks into it.

heinrich where is the 42 character length set in the bios what offset?
Title: Character Limit
Post by: derived on April 12, 2004, 01:19:00 AM
42 is an odd number, it could be they allocated a certain number of bytes per file and the left over went to the filename.

If you want to maintain any compatibility, you are going to have to work out a solution for how to store those extra bytes. FAT16's new long-filename compatibility was something of a lucky hack type deal. IIRC, they added a pointer in some unsed space in the file entry that referenced the rest of the filename.

Requiring a special BIOS and special formatting tools to create an otherwise incompatible HDD format probably wouldn't be the most popular hack. Also, those auto-renaming tools are useful.
Title: Character Limit
Post by: halfelite on April 12, 2004, 06:27:00 AM
derived are you sure 100% the hd would be in incompatible?
lba16 has a character file limit of a very low number lba48 does not so maybe they only changed the way it handles space not file names?

And for anyone who uses one xbox for just a media center would find this usefull.
Title: Character Limit
Post by: heinrich on April 12, 2004, 12:19:00 PM
QUOTE (halfelite @ Apr 12 2004, 03:19 AM)
Hope someone looks into it.

heinrich where is the 42 character length set in the bios what offset?

I dont know what offset is it at in any compiled bios.

And I agree that the hard drive would have to formatted again, and any changes to the filesystem would almost certainly cause incompatibility problems, including with the MS bios.
Title: Character Limit
Post by: halfelite on April 12, 2004, 02:53:00 PM
How would the hd be not usable with msbios couldnt it probbaly be made like the lba48 patch where if its not retail it work but retial can not use it?
Title: Character Limit
Post by: lookformeb on April 12, 2004, 06:25:00 PM
I'm pretty sure it's more then BIOS dependent... the FatX structure seems to only allow 42 characters.  I believe to allow more, you would actually ahve to covert the partition completely (for example to Fat32).

QUOTE
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 (Scratch A, B, C and System) 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
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).

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.
Title: Character Limit
Post by: lookformeb on April 12, 2004, 08:51:00 PM
Not sure... just though I'd post for a read...

I do believe, that linux partitions, Fat32, NTFS, etc, are not controlled by the BIOS...
Title: Character Limit
Post by: halfelite on April 12, 2004, 10:01:00 PM
i thought it was all bios dependent and it shows how to read it. Didn't the matrix game contain files over 42 characters on the dvd and it read fine just couldnt be copied to hd.
Title: Character Limit
Post by: cool_guy on April 12, 2004, 10:55:00 PM
QUOTE (lookformeb @ Apr 13 2004, 05:51 AM)
Not sure... just though I'd post for a read...

I do believe, that linux partitions, Fat32, NTFS, etc, are not controlled by the BIOS...

I don't use linux much, but I am pretty sure that you must have support in the kernel for whatever filesystem you are trying to use (or load a module).  It seems that if someone (like xecuter) has access to the source code for the bios, they would everything they needed to make any changes to the filesystem structure.  Maybe instead of trying to hack up fatx, they could, like you suggested, find a way to support fat32, or create an 'extended fatx' for partitions 6-7.
Title: Character Limit
Post by: halfelite on April 12, 2004, 11:49:00 PM
i hope one of the groups could comment on this or someone who is more knowledgible then me on a positive answer and if someone could help me find the offset for the 42 character limit im goign to change it and see if all data is lost or if anything all all happens
Title: Character Limit
Post by: lookformeb on April 13, 2004, 07:51:00 AM
Interesting observations.  Again, I don't know the answer, just posting up whats already been written.  I am just as interested as you all are...
Title: Character Limit
Post by: halfelite on April 14, 2004, 12:14:00 AM
Bump bump
Title: Character Limit
Post by: halfelite on April 14, 2004, 10:02:00 PM
Guess not many poeple need this after all. wish someone would have given an answer on why it cant be done for sure
Title: Character Limit
Post by: heinrich on April 14, 2004, 11:07:00 PM
wink.gif
Title: Character Limit
Post by: heinrich on April 15, 2004, 12:17:00 PM
wink.gif
Title: Character Limit
Post by: halfelite on April 15, 2004, 12:55:00 PM
I want to work on this to not sure how much help i can be as i havent messed much with the xbox bios but i will test anything poeple want to try i got a spare box to kill.

Heinrich what is some of your ideas? if you dont mind

  thanks
Title: Character Limit
Post by: heinrich on April 20, 2004, 05:28:00 PM
QUOTE
STOR testing-max-char-length-for-the-xbox-bios-lets-see-how-long-it-can-be-why-hasnt-xecuter-changed-this-yet-lol.mpg
150 Opening BINARY data connection for X:\testing-max-char-length-for-the-xbox-bios-lets-see-how-long-it-can-be-why-hasnt-xecuter-changed-this-yet-lol.mpg
226 Transfer finished successfully. Data connection closed.


I don't know how well this will hold up with writing many files - at all.  Anyone want to do some crazy testing with the very good chance of corrupting data? smile.gif

Also, I did not have to format to do the above, but switching back to a bios with the 42 char limit prevented the xbox from doing a directory listing.  So it seems that switching to bios which support longer filenames would work w/o problem, but going back would require that you at least remove all offending files.
Most of this is all speculation of course.
Title: Character Limit
Post by: heinrich on April 20, 2004, 06:01:00 PM
QUOTE (heinrich @ Apr 20 2004, 10:28 PM)
Also, I did not have to format to do the above

dont get your hopes up there, I think that was some bad stuff I was smoking.
Title: Character Limit
Post by: halfelite on April 20, 2004, 08:37:00 PM
so it was succseful lol got the bios i will throw it on a machine and test it will
Title: Character Limit
Post by: heinrich on April 21, 2004, 05:23:00 AM
wink.gif
Title: Character Limit
Post by: halfelite on April 21, 2004, 08:42:00 AM
I thought more of the community would want this but i guess people either worried about compatbility with running games or just dont need it. i personally just want it for media files.

Good work heinrich keep it up
Title: Character Limit
Post by: EmperorPsiblade on April 21, 2004, 02:38:00 PM
hmmm sounds like a good idea but i don't see too much concern for it...... not many ppl need 42+ characters in filenames....
Title: Character Limit
Post by: halfelite on April 22, 2004, 07:18:00 AM
If the drive structure does not change i think almost all apps would work with it. xbmp/xbmc can play files over 42 characters from smb and so can most emu's with smb support
Title: Character Limit
Post by: halfelite on April 25, 2004, 09:56:00 PM
just seeing if anymore progress on it.