PCSX2 is a PS2 emulator, it features memory card support and produces .ps2 files which are a raw image of the memory card, here’s what I had to say about them last time:

  • The file is a raw image of a PS2 memory card.
  • I believe it’s a similar system to FAT12/16, it’s got a similar FAT usage from my quick scan.
  • Every 512 bytes is a 16 byte footer, I assume it’s some sort of checksum

Spurred on by an email I recieved earlier I decided to do some more digging, here’s some prelimerary findings:

(all addresses include the 16 byte footers)

  • .PS2 file always has Sony PS2 Memory Card Format 1.2.0.0 as it’s header.
  • The FAT table starts at 0x2520 , uses word(tbc?) for each entry
  • Clusters start at: 0xA920
  • Clusters are 0x200 in size.
  • First cluster is file entry for . (2E in hex), an entry for .. also exists
  • A file/directory entry occupies an entire 0x200 byte cluster and is broken down as such:
    The first int is the file/folder attribute
    second int is the file size.
    I belive the datetime is next.
    I belive the fat entry (word or int?) to be located 0x10 bytes in.
    The filename is 0x40 bytes in and 0 terminated.
  • The first cluster I found containing the file data was always located at 0xB9A0 in the files I looked at.
  • As with other FAT implementations 0xFFFF appears to be used to indicate end of chain (EOC) in the FAT table

Using the above information it should be possible to construct a basic tool to extract files from the .ps2 file.

I’ve been thinking about the 16 byte footer and believe it may be the attributes of the preceeding sector rather than a checksum. a sector contain all 00’s and a sector containing all FF’s both have the same footer…

Please note all information above is based on a 10 minute poke around the file in a hex editor, corrections and updates are welcome!