Memory Card File System

Discussion in 'General PS2 Discussion' started by Berion, Dec 9, 2019.

  1. 2,418
    2,405
    372
    Berion

    Berion Developer

    Joined:
    Feb 3, 2015
    Messages:
    2,418
    Likes Received:
    2,405
    Trophy Points:
    372
    Gender:
    Male
    Location:
    Poland
    Does anyone have detailed specification of mcfs? I hear that there is a way to make "save" protected from been deleted, is this true? Because I assumed it is somewhere in file attributes, but where? @TnA made some tests and none of them making the save impossible to delete from OSDSYS.

    @krHACKen @sp193 ^^

    0001read
    0002write
    0004execute (for osd upd stuff?)
    0008copy protected
    0010file
    0020folder
    0040?
    0080preserved (what does it means?)
    0100?
    0200?
    0400?
    0800PDA (what is pda? pocket station save?)
    1000PSX save
    2000?
    4000hidden (does it even work?)
    8000PS2 save
     
    TnA likes this.
  2. 82
    234
    57
    krHACKen

    krHACKen Developer

    Joined:
    Nov 2, 2014
    Messages:
    82
    Likes Received:
    234
    Trophy Points:
    57
    If my memory serves me right, the above attr can also be set in icon.sys (only handled by OSDSYS tho). If not, sorry for bringing more confusion.
     
    TnA likes this.
  3. 2,418
    2,405
    372
    Berion

    Berion Developer

    Joined:
    Feb 3, 2015
    Messages:
    2,418
    Likes Received:
    2,405
    Trophy Points:
    372
    Gender:
    Male
    Location:
    Poland
    Yes, for folder and every file separately inside it. We have tests so far only on folder. So the icon.sys is important here? But why, isn't it's purpose is only to tell OSD what to display (what icons, what named and in what lighting?.
     
  4. 82
    234
    57
    krHACKen

    krHACKen Developer

    Joined:
    Nov 2, 2014
    Messages:
    82
    Likes Received:
    234
    Trophy Points:
    57
    It's not, sorry. I hadn't read that the topic is about the MCFS specs (possibly CST_MODE):oops:.
     
    TnA likes this.
  5. 7,646
    5,857
    872
    kozarovv

    kozarovv Developer

    Joined:
    Nov 8, 2014
    Messages:
    7,646
    Likes Received:
    5,857
    Trophy Points:
    872
    Home Page:
    Code:
    Directory Entry Mode Flags
    
    Mask  | Name         | Description
    
    0x0001| DF_READ      | Read permission.
    0x0002| DF_WRITE     | Write permission.
    0x0004| DF_EXECUTE   | Execute permission.
    0x0008| DF_PROTECTED | Directory is copy protected. Meaningful only to the browser.
    0x0010| DF_FILE      | Regular file.
    0x0020| DF_DIRECTORY | Directory.
    0x0040| DF_O_DCREAT  | Used internally to create directories.
    0x0080| -            | Copied/preserved?
    0x0100| -            | -
    0x0200| O_CREAT      | Used to create files.
    0x0400| DF_0400      | Set when files and directories are created, otherwise ignored.
    0x0800| DF_POCKETSTN | PocketStation application save file.
    0x1000| DF_PSX       | PlayStation save file.
    0x2000| DF_HIDDEN    | File is hidden.
    0x4000| -            | -
    0x8000| DF_EXISTS    | This entry is in use. If this flag is clear, then the file or directory has been deleted.
    edit:
    Best bet is to not enable 0x02, but that will also make it impossible to update.
    Docs about MCFS can be found here: https://www.ps2savetools.com/ps2memcardformat.html
     
    Last edited: Dec 9, 2019
    akuhak, jolek and Berion like this.
  6. 769
    1,383
    222
    sp193

    sp193 Developer

    Joined:
    Oct 13, 2014
    Messages:
    769
    Likes Received:
    1,383
    Trophy Points:
    222
    Location:
    Singapore
    Home Page:
    If you make a directory read-only, I think you can still update any existing files within.

    Execute doesn't really determine executability of files here, since the file can be read into memory and executed. I have doubts that the browser would only execute files with the execute bit set.

    The differences between the two are that he cleared write and set the copy-protection bit, to protect the save from deletion. You will need some testing to determine what is really required.

    From what I do remember, setting the copy-protect bit alone does not prevent the browser from allowing the user to delete the file.
     
    kozarovv, Berion and TnA like this.
Tags:

Share This Page