Home MagiCMagiC MagiC's XFS-conceptMagiC's XFS-concept Shared librariesShared libraries

11.22 VFAT-XFS in MagiC

As of Version 5.0 MagiC supports a VFAT-XFS, with whose help long filenames in Windows95 format can be used on the Atari.

Advantages of this concept:

Disadvantages of this concept:

Technical description of the VFAT system:

typedef struct
{
    BYTE   head;       /* Bit 0..4: Number, Bit 6: Endofname */
    UBYTE  name1[10];  /* 5 Unicode characters               */
    BYTE   attr;       /* Attribute (0x0f)                   */
    BYTE   unused;     /* Unused at present                  */
    BYTE   chksum;     /* Checksum of the short name         */
    UBYTE  name2[12];  /* 6 Unicode characters               */
    WORD   stcl;       /* First cluster (0)                  */
    UBYTE  name3[4];   /* 2 Unicode characters               */
} LDIR;

Note: Here head is for the first entry e.g 0x01, for the second 0x02 and for the third 0x43, if the name requires three entries.

One can store 13 characters for each entry. The entries with the long filename always lie immediately before the main (8+3) entry. The Unicode characters are in the Intel format. In the last entry, any unused characters after the NULL-byte are filled with 0xff, 0xff. The order of the entries is reversed, i.e. the last 13 characters of the long name lie physically in the first position. The last directory entry, which is flagged by a set bit 6 in the head field, lies physically in the first position.

The component stcl is always zero; chksum is calculated from the short name (in an internal format) through right-rotation in turn of the previous result and addition of the 11 characters. Linux uses the field unused to store flags for upper/lowercase. The current Windows version however always writes zeros to this field, and MagiC behaves in the same way. Further notes:

See also: MagiC's XFS-concept   VFATCONF


Home MagiCMagiC MagiC's XFS-conceptMagiC's XFS-concept Shared librariesShared libraries