Sounds good there sith. Haven't really looked into psx memcard file types yet.
Do all these always have the same, raw format? I mean same length, headers, etc. If I'm not mistaken, there should be encrypted/compressed types as well.
there a few main types but not are encrypted just the newer formats have huge checksums as part of the header
the "Standard" memcard its just a raw image of a psx mem card (type 3)
the "vgs /mem type" thats a 0x40byte header then the standard format. (type_6)
the "dex-drive" a header of 0xF40 followed by the standard format(type_7)
the "PSP's vmp file" a header of 0x80 followed by the standard format (in the header is a checksum)(type_5)
and "PSV format" a header of 0x84 followed the save and a footer. (checksum and a short version of the memcard index )(type_4)
you might wish to consult the source for black chocobo as it will explain in better detail first you might want to look at FF7SAVE.h
- The first bit of the file sets const ints for each types size, header , etc.
and also you might want to look at mainwindow.cpp
- starting on line 167 is loadFullFile this functions does the loading then later on line 478 there is a save function it does stuff based on the format (types 3,5,6,7 are what ur looking at) after you
look there next you will want to look at globals.cpp
-fix_vmc_header() it starts on line 93 . this function ensures that any virtual memory card format get its header data updated (both region and times in the psx header) this is of course important because other wise the system won't reconize the game's save
hope this helps.