xboxscene.org forums

Pages: [1] 2

Author Topic: Character Limit  (Read 212 times)

halfelite

  • Archived User
  • Jr. Member
  • *
  • Posts: 96
Character Limit
« 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?
Logged

heinrich

  • Archived User
  • Hero Member
  • *
  • Posts: 2274
Character Limit
« Reply #1 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?
Logged

heinrich

  • Archived User
  • Hero Member
  • *
  • Posts: 2274
Character Limit
« Reply #2 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.
Logged

halfelite

  • Archived User
  • Jr. Member
  • *
  • Posts: 96
Character Limit
« Reply #3 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?
Logged

derived

  • Archived User
  • Newbie
  • *
  • Posts: 32
Character Limit
« Reply #4 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.
Logged

halfelite

  • Archived User
  • Jr. Member
  • *
  • Posts: 96
Character Limit
« Reply #5 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.
Logged

heinrich

  • Archived User
  • Hero Member
  • *
  • Posts: 2274
Character Limit
« Reply #6 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.
Logged

halfelite

  • Archived User
  • Jr. Member
  • *
  • Posts: 96
Character Limit
« Reply #7 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?
Logged

lookformeb

  • Archived User
  • Hero Member
  • *
  • Posts: 1442
Character Limit
« Reply #8 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.
Logged

lookformeb

  • Archived User
  • Hero Member
  • *
  • Posts: 1442
Character Limit
« Reply #9 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...
Logged

halfelite

  • Archived User
  • Jr. Member
  • *
  • Posts: 96
Character Limit
« Reply #10 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.
Logged

cool_guy

  • Archived User
  • Newbie
  • *
  • Posts: 24
Character Limit
« Reply #11 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.
Logged

halfelite

  • Archived User
  • Jr. Member
  • *
  • Posts: 96
Character Limit
« Reply #12 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
Logged

lookformeb

  • Archived User
  • Hero Member
  • *
  • Posts: 1442
Character Limit
« Reply #13 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...
Logged

halfelite

  • Archived User
  • Jr. Member
  • *
  • Posts: 96
Character Limit
« Reply #14 on: April 14, 2004, 12:14:00 AM »

Bump bump
Logged
Pages: [1] 2