PDA

View Full Version : 8.3 File System Names



Kye
12-15-2009, 12:48 PM
Hey guys,

Since the school semester is over I'll be going back to work on the full featured FAT32/16 file system I was making.

Anyway, there are a few things I would like to ask of the forums about·perfered functionality.

The first is, what is perfered, raw 8.3 file system names or slightly formated file system names when "listName" is returning (the basic listing function).

The differences would be:

(RAW)

FOOBAR··C
FOO······ MP3
..etc

(Slightly Formated)

FOOBAR.C
FOO.MP3

The advantages of using RAW names is that it requires alot less code, about 50 - 70 longs, and that the formating always comes out at 11 characters.

Slightly formated names use alot more space because I have to play arround with the names alot to communicate between various functions and keep everything right with the FAT. This also will implicitly slow down the code ever so slightly.

Any thoughts?

Thanks,
··

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Nyamekye,

Post Edited (Kye) : 12/15/2009 4:53:21 AM GMT

Dr_Acula
12-15-2009, 04:46 PM
Hmm - I'm working on similar things in CP/M to move files in and out of CP/M. You probably have to go for the harder one - for someone typing a filename they will type MYFILE.TXT, not MYFILE space space.TXT

Though it still would be stored in a standard 11 byte array. CP/M has multiple routines to handle this sort of thing and I guess it is fairly fundamental to an operating system. I wrote some assembly routines in Z80 to handle the conversions. Just some fairly standard string stuff. Search for the . Pad it out with spaces behind the scenes but only show the user the name without the padding. Except when you want to do a directory listing - then you do want the padding so the names all line up nicely.

Is this in spin or pasm? If spin, I think there are string routines around somewhere. Search for a character like a dot. In Basic I used to cheat and add 8 spaces then take the left 8 characters.

Am I on the right wavelength here?

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
www.smarthome.viviti.com/propeller (http://www.smarthome.viviti.com/propeller)

Post Edited (Dr_Acula) : 12/15/2009 9:30:25 AM GMT

RossH
12-15-2009, 05:01 PM
@Kye,

Dr_Acula is right - you should only translate at the edges, never internally - i.e. all user accessible/visible file names should be in the "name.ext" format (both for entry or display) but internally all filenames should be in the standard 11 byte format.

Normally you would leave it up to the user to do any further formatting (e.g. for listings) - but if you are producing a formatted listing yourself you may want to offer both a bare option that returns just "name.ext"(check the dos "dir /b" cmd) as well as a formatted option that returns "name .ext" so that the columns align nicely.

Ross.

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Catalina - a FREE C compiler for the Propeller - see Catalina (http://forums.parallax.com/showthread.php?p=844004)

Cluso99
12-15-2009, 06:25 PM
Kye, I agree w Drac & Ross.

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Links to other interesting threads:

· Home of the MultiBladeProps: TriBlade (http://forums.parallax.com/showthread.php?p=786418),·RamBlade (http://forums.parallax.com/showthread.php?p=849265),·SixBlade (http://forums.parallax.com/showthread.php?p=780033), website (http://bluemagic.biz/cluso.htm)
· Single Board Computer:·3 Propeller ICs·and a·TriBladeProp board (ZiCog Z80 Emulator) (http://forums.parallax.com/showthread.php?p=790917)
· Prop Tools under Development or Completed (Index) (http://forums.parallax.com/showthread.php?p=753439)
· Emulators: CPUs Z80 etc; Micros Altair etc;· Terminals·VT100 etc; (Index) (http://forums.parallax.com/showthread.php?p=778427) ZiCog (Z80) (http://forums.parallax.com/showthread.php?p=788511) , MoCog (6809) (http://forums.parallax.com/showthread.php?p=811043)
· Search the Propeller forums (http://search.parallax.com/search?site=parallax&client=parallax&output=xml_no_dtd&proxystylesheet=parallax&proxycustom=<HOME/>&ie=&oe=&lr=)·(uses advanced Google search)
My cruising website is: ·www.bluemagic.biz (http://www.bluemagic.biz)·· MultiBladeProp is: www.bluemagic.biz/cluso.htm (http://www.bluemagic.biz/cluso.htm)

Kye
12-16-2009, 07:02 AM
Okay, thanks guys, I just wanted to see if anyone wanted to see raw file names.

I have a function that lets you type ANYTHING in and it will convert it into a standard 8.3 file name. However, I believe Jazzed noticed when he tried my beta out that the list function prints out the raw names, so I'm looking into making it friendlier. I'll also make sure that all names come out padded.

Also, should I just format the names as FOOBAR.TXT or Foobar.txt, etc. As in should I change the case?

Anyway, thanks for the input, I'm going to get everything working before the end of the holidays.

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Nyamekye,

RossH
12-16-2009, 07:42 AM
Hi Kye,

I don't think 8.3 filenames should ever have lower case letters (the standards say they had to be uppercase, but since DOS was generally case insensitive some systems may have allowed lower case characters to be used and it made no real difference). But for the best commpatibility you should probably report all file/directory names as upper case even if you find they are lower case on the disk. True lower case (or mixed case) name support required the addition of an LFN - the 8.3 filename should still have been upper case.

See http://en.wikipedia.org/wiki/8.3_filename

Ross.

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Catalina - a FREE C compiler for the Propeller - see Catalina (http://forums.parallax.com/showthread.php?p=844004)

kuroneko
12-16-2009, 08:06 AM
RossH said...
True lower case (or mixed case) name support required the addition of an LFN - the 8.3 filename should still have been upper case.

There is an inofficial shortcut (2 undocumented flags) which swaps the case for base name and/or extension. Mixed case within a name component still requires LFN support.

Just checked some very old FS code of mine, byte 12 and 13 of a normal directory entry are marked as reserved. Byte 12 bit 3 controls the base name, bit 4 the extension. The name itself stays stored in uppercase to keep DOS & Co happy. If the bit is set, the relevant name part has its case toggled (application visibility).

Post Edited (kuroneko) : 12/16/2009 12:49:47 AM GMT