Shop OBEX P1 Docs P2 Docs Learn Events
Is anyone working on FSRW? — Parallax Forums

Is anyone working on FSRW?

computer guycomputer guy Posts: 1,113
edited 2008-11-30 05:06 in Propeller 1
Hi there,

I need a version of FSRW (the sd card object) that supports long file names.
I don't have the smarts to do this myself so I was wondering if anyone is still developing it.



Thank you smile.gif

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Building Blocks To The Propeller Chip A web site designed to help people who are new to the propeller chip.

Guitar Hero controller using the prop (WIP) --> HERE

Comments

  • tpw_mantpw_man Posts: 276
    edited 2008-10-21 11:48
    I think people would if they could, but I believe that long file names are patented.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    I am 1011, so be surprised!


    Advertisement sponsored by dfletch:
    Come and join us on the Propeller IRC channel for fast and easy help!
    Channel: #propeller
    Server: irc.freenode.net or freenode.net
    If you don't want to bother installing an IRC client, use Mibbit. www.mibbit.com
  • computer guycomputer guy Posts: 1,113
    edited 2008-10-21 11:50
    Are short file names a limitation programmed in or is it just easier?

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Building Blocks To The Propeller Chip A web site designed to help people who are new to the propeller chip.

    Guitar Hero controller using the prop (WIP) --> HERE
  • hippyhippy Posts: 1,981
    edited 2008-10-21 13:25
    I'm no expert but I thought Microsoft's patents related to the way long filenames were used with FAT itself so would not preclude alternative, proprietary mechanisms for relating long to short names; eg a LFNAMES.TXT list in each directory.

    That would allow FSRW and others to use long filenames with the existing FAT format but would not give a PC OS automatic access to the same long filenames used, only the mapped short names. A specific application ( even a suitable disk/file driver ) could use the same trick to make long file names accessible. How useful that approach is depends upon application.

    In 2004 the USPTO rejected Microsoft's FAT patents after a re-examination but then turned tail and upheld them in 2006. Germany held the patent(s) invalid in 2007. Last time I looked the EU had rejected the notion of software patents outright. I don't know of what else has happened since or elsewhere.

    It would be interesting to know what an expert in patent law's opinion was on -

    1) Developing and publishing long filename FAT code under a non-restrictive license in USA, Germany, Europe or elsewhere.

    2) Use of such code from USA, Germany, Europe or elsewhere in the USA or elsewhere.

    Fundamental to the issue seems to be where and when a breach of patent would occur. In Germany it would appear to be absolutely acceptable to develop, publish and use such code without fear of patent infringement. That would seem to extend across all EU members.

    If the code can be developed and published in Germany, Europe or elsewhere where the patent is not valid, it then becomes a much simpler issue of whether that code can be published or made available in the USA or used in the USA.

    Has anyone thought of simply writing to Microsoft to ask if they will permit the necessary code to be written ? Obviously best if someone who wasn't going to actually write the code asks !
  • Paul BakerPaul Baker Posts: 6,351
    edited 2008-10-21 17:14
    Sure it's possible to create an alternative, but windows wouldn't recognize it. Depends on what computer guy is looking for.

    At least with the US Patent system, it was held long ago that data structures and software are different animals, and the physical embodiment of data structures have always been protected under US Patent law. This permits things such as RAID formating, file systems and logging delta structures (used in revision control systems)·to be patented.

    I don't want to get into a debate, but if you objectively look at the divide between EU and the US, one is left scratching thier head on how the EU derived thier interpretation. I can create a logic chip that takes A inputs to produce B outputs, and obtain a patent on it (Invention 1). I can make a programmable chip that has A inputs and B outputs and obtain a patent on it (Invention 2). But if I·take my Invention 2 and program it to behave identical to Invention 1,·the EU says this isn't patentable, huh? Now I understand thier rationale, and I'm not saying that I disagree with their intentions, but it just doesn't pass the objective legal analysis test.

    Something which hasn't been tested yet of the EU system, but I expect it will (because there are enough devious people in the world) is using software means to replicate patented hardware to legally infringe a patent·. According to a strict interpretation of EU Patent laws, this isn't infringment (if something can't be patented, how could it possibly infringe on a patent) and is a huge loophole. Thats the thing with legal systems, unintented consequences lead to a patchwork of exceptional cases and leads to rule books that rival the NYC phone book in size (the US patent laws and associated legal interpretations of the laws now occupy ~ 2 NYC phone books worth of pages)

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Paul Baker
    Propeller Applications Engineer

    Parallax, Inc.

    Post Edited (Paul Baker (Parallax)) : 10/21/2008 5:57:54 PM GMT
  • StefanL38StefanL38 Posts: 2,292
    edited 2008-10-21 18:09
    hellocomputerguy

    it's always the same

    give DETAILED description of what you want to do and I'm sure there
    will be more than one solution to the problem

    best regards

    Stefan
  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2008-10-21 18:15
    An alternative to FAT16 and FAT32 for SD cards is the Linux EXT2 filesystem. Here is some software for Windows that allows it to handle EXT2. I couldn't find anything in the docs suggesting it is capable of creating an EXT2 filesystem on the SD card, though. So it might be necessary to do that under Linux. (Windows users can do this using a live Linux CD, such as Knoppix.)

    Of course, someone then has to write the Propeller code to support EXT2. Here is the place to get started. Good luck!

    -Phil

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    'Just a few PropSTICK Kit bare PCBs left!

    Post Edited (Phil Pilgrim (PhiPi)) : 10/21/2008 6:23:53 PM GMT
  • tpw_mantpw_man Posts: 276
    edited 2008-10-21 19:52
    I meant that FAT long file names are patented. Sorry for the confusion.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    I am 1011, so be surprised!


    Advertisement sponsored by dfletch:
    Come and join us on the Propeller IRC channel for fast and easy help!
    Channel: #propeller
    Server: irc.freenode.net or freenode.net
    If you don't want to bother installing an IRC client, use Mibbit. www.mibbit.com
  • hippyhippy Posts: 1,981
    edited 2008-10-21 22:10
    @ Paul : I believe you know a lot more about patent law than I do so I won't argue specifics with you but I think there is a difference in US and EU attitudes as to who and what patents are there to protect, with a slant in the EU against patents which are perceived to restrict invention and development, a slant towards "Public Interest" over "Business Interests". I think the closest parallel are in "Fair Use" or perhaps "Anti-Trust" ( I say that colloquially rather than with knowledge of US Law ).

    On the specific Microsoft FAT patent it is interesting that Germany rejected it as "not based on inventive activity" and decided there was prior art, whereas the USPTO decided there wasn't.
  • Paul BakerPaul Baker Posts: 6,351
    edited 2008-10-21 22:37
    Americans seem to have a natural predeliction towards wanting things black-and-white, cut-and-dry, and our legal system tends to follow in this tradition. Our patent system has increasingly moved from a subjective expert system to a formulaic system. Back in the 60's and early seventies our patent system was very much like the current EU system. But there was an outcry from industry that the process was too arbitrary, so the system was reformed to where most of the subjectiveness of the process was removed. The only basis of rejecting an application is a) has it been done before (shown through documentation) or b) represents a change over what has been done before that would be obvious to anyone familiar with the subject (again shown through documentation, both of the base, the improvement, and a 3rd party argument why the improvement would be benificial to a class of systems the base system exists within).

    This leaves a very narrow path in which an examiner can reject an application, and frequently what happens is the examiner gets the applicant to remove the egregious "shoot for the moon" claims, but the applicant get the patent (just of a more limited scope than they were originally trying to obtain).

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Paul Baker
    Propeller Applications Engineer

    Parallax, Inc.

    Post Edited (Paul Baker (Parallax)) : 10/21/2008 11:02:02 PM GMT
  • computer guycomputer guy Posts: 1,113
    edited 2008-10-22 05:54
    Hello all.

    The legal system can be a pain at times.

    Here is what I want to do.
    I have the following files:
    Arterial_Black.medium.AGH
    Arterial_Black.lead.medium.AGH
    Arterial_Black.lead.hard.AGH
    Arterial_Black.lead.expert.AGH
    Arterial_Black.lead.easy.AGH
    Arterial_Black.hard.AGH
    Arterial_Black.expert.AGH
    Arterial_Black.easy.AGH
    etc...
    
    



    I want to be able to select the file based on its name.
    This is difficult when all I see is.
    arteri~1.AGH
    arteri~2.AGH
    arteri~3.AGH
    etc...
    
    




    Thank you smile.gif

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Building Blocks To The Propeller Chip A web site designed to help people who are new to the propeller chip.

    Guitar Hero controller using the prop (WIP) --> HERE
  • computer guycomputer guy Posts: 1,113
    edited 2008-10-22 07:00
    Perhaps updating the FSRW code to read the 255 character name that is already contained in the file attributes.
    I have been reading up and it would appear that because I can have long file names on my SD card in Windows, the SD card must be using VFAT.
    Therefore having a 8.3 name and LFN name contained in the files attributes.
    The 8.3 name is stored in the usual place and the LFN is stored in another location that has to be read differently.


    If the data is already contained in the attributes, it can't be hard to read it (right?).


    Thank you smile.gif

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Building Blocks To The Propeller Chip A web site designed to help people who are new to the propeller chip.

    Guitar Hero controller using the prop (WIP) --> HERE

    Post Edited (computer guy) : 10/22/2008 7:16:11 AM GMT
  • AleAle Posts: 2,363
    edited 2008-10-22 07:38
    Computer guy:

    The long file name is stored in previous directory entries as the file it refers to. Not at another arbitrary position. Example look at the image. The long file name is This_is_a_silly_long_name.text, and the short is: THIS_I~1.TEX.

    I wanted to write an ext2 fs for the propeller. I did not yet find the time but I di put some thought into it: It will be a LMM-enabled driver. No spin beyond a simple wrapper.

    Any more questions ? (here is how I created it under linux):

    ale@orgpc043:~/tmp$ dd if=/dev/zero of=vfat.img bs=16777216 count=1
    1+0 records in
    1+0 records out
    16777216 bytes (17 MB) copied, 0.104609 seconds, 160 MB/s
    ale@orgpc043:~/tmp$ sudo mkfs.vfat ./vfat.img
    Password:
    mkfs.vfat 2.11 (12 Mar 2005)
    ale@orgpc043:~/tmp$ sudo mount ./vfat.img /mnt -o loop
    ale@orgpc043:~/tmp$ cd /mnt
    ale@orgpc043:/mnt$ sudo touch This_is_a_silly_long_name.text
    ale@orgpc043:~/tmp$ cd ~/tmp
    ale@orgpc043:~/tmp$ sudo umount /mnt


    Edit: *** The first char of every entry has a lower than 32 char indicating the order at which such entry should be read, and the last one an upper case letter (A 'C' in this case). Thos symbols and the distribution is there not to break old code. That well was actually not true, they just disabled writing directly to the disk (using int13). what a hack, a crappy hack. In the first days of winblows 95 the disk used to break quite a bit. well you know the rest.

    Post Edited (Ale) : 10/22/2008 7:45:27 AM GMT
    878 x 194 - 31K
  • computer guycomputer guy Posts: 1,113
    edited 2008-10-22 08:02
    Thank you Ale.

    Is it possible to get the FSRW object to read this?
    I am not very good at spin and know very little ASM.


    Thank you smile.gif

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Building Blocks To The Propeller Chip A web site designed to help people who are new to the propeller chip.

    Guitar Hero controller using the prop (WIP) --> HERE
  • hippyhippy Posts: 1,981
    edited 2008-10-22 11:58
    @ computer guy : One possibility may be to put your files into a directory structure ... ?

    Arterial_Black.lead.easy.AGH

    becomes something like

    .\Arterial\Black\lead\easy.AGH
  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2008-10-22 17:13
    Another option would be to create an index file that relates each long name to a short one. The short name could just be a number that gets incremented each time a new file is created.

    -Phil

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    'Just a few PropSTICK Kit bare PCBs left!
  • computer guycomputer guy Posts: 1,113
    edited 2008-10-23 04:41
    @Hippy
    The FSRW object only supports the root directory.

    @Phil
    I thought of this but I want to keep it as simple as possible.
    I already have software for copying the files from PC to SD so I could always get that to write the index file.
    If I was to read in the values from such an index file, could I store the information in a lookup table?
    Therefore I could reference the long name and it would load the short name.


    Thank you smile.gif

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Building Blocks To The Propeller Chip A web site designed to help people who are new to the propeller chip.

    Guitar Hero controller using the prop (WIP) --> HERE
  • PyrotomPyrotom Posts: 84
    edited 2008-10-23 12:56
    The Microsoft patent covers the directory structure that supports long file names, and therefore I cannot release code that creates such a file structure. But it would seem to me that releasing code that can read the file structure should be OK. If this is so, a version of FSRW that can read a Windows created long name should be fine, we just can't write long file names. Or is our patent law even more screwed up than I think?
  • computer guycomputer guy Posts: 1,113
    edited 2008-10-30 05:02
    That's good to hear. Pyrotom, I look forward to the long file name support.


    Thank you smile.gif

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Building Blocks To The Propeller Chip A web site designed to help people who are new to the propeller chip.

    Guitar Hero controller using the prop (WIP) --> HERE
  • computer guycomputer guy Posts: 1,113
    edited 2008-11-06 05:19
    Pyrotom, how is it going?

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Building Blocks To The Propeller Chip A web site designed to help people who are new to the propeller chip.

    Guitar Hero controller using the prop (WIP) --> HERE
  • PyrotomPyrotom Posts: 84
    edited 2008-11-07 01:39
    Well, I just said that I thought it should be legal, not that I was going to do it.......
  • OwenSOwenS Posts: 173
    edited 2008-11-07 16:40
    I know that Linux contains code for reading and writing FAT LFNs. I also know that even vendors like Red Hat knowingly ship said code, as do millions of MP3 players and other devices which implement FAT32, without paying for patent licensing.

    It seems that a very large number of companies class the FAT LFN patent as unenforcible, and, the fact that Microsoft has not gone after any of these high value targets with litigation seems to indicate that they feel the same.
  • lonesocklonesock Posts: 917
    edited 2008-11-07 17:22
    If anyone wants a great starting point, I suggest here:

    elm-chan.org/fsw/ff/00index_e.html

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    lonesock
    Piranha are people too.
  • computer guycomputer guy Posts: 1,113
    edited 2008-11-30 00:51
    Sorry Pyrotom, I got a bit confused by what you said.
    Pyrotom said...

    I cannot release code that creates such a file structure. But it would seem to me that releasing code that can read the file structure should be OK

    @lonesock
    Thank you. I found that site some time ago however the download links didn't work. They are working now and should prove to be useful.

    @everyone
    If there is anyone interested in working on Fat32 support. The community would appreciate it.


    Thank you smile.gif

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Building Blocks To The Propeller Chip A web site designed to help people who are new to the propeller chip.

    Guitar Hero controller using the prop (WIP) --> HERE
  • BradCBradC Posts: 2,601
    edited 2008-11-30 03:44
    computer guy said...

    @everyone
    If there is anyone interested in working on Fat32 support. The community would appreciate it.

    Why? What advantage is FAT32 going to buy "The community" on the commonly available card sizes?
    It just consumes more of the available card space and will cost slightly more ram at runtime.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Cardinal Fang! Fetch the comfy chair.
  • computer guycomputer guy Posts: 1,113
    edited 2008-11-30 04:08
    Having long file names built into the file system code saves on having to code some form of index file to keep track of what short file name matches a readable name.
    BradC, you can stuff around with loading 100's of files with an identical name if you want but I'm sure most people in the community would want to be able to load one file and know they have the right one.

    Short file names = hours of sorting through 100's of files.
    Long file names = seconds to load the file you want.

    I know what I would prefer.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Building Blocks To The Propeller Chip A web site designed to help people who are new to the propeller chip.

    Guitar Hero controller using the prop (WIP) --> HERE
  • BradCBradC Posts: 2,601
    edited 2008-11-30 05:06
    Mmm.. I can see you have several concepts confused. LFN support will work quite happily on FAT12/16/32, but having FAT32 does not imply LFN support.

    If "most people in the community" had required LFN support, then I suspect someone would have written it by now. Try looking at the problem from another angle, or better still grab yourself the LFN specifications and do it [noparse]:)[/noparse]

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Cardinal Fang! Fetch the comfy chair.
Sign In or Register to comment.