Open GerbilSoft opened 7 years ago
There's now a 1:1 dump format available: http://gbatemp.net/threads/release-psvgamesd-by-motoharu-gosuto.484324/
Slightly annoyingly, they chose the file extension ".psv". This conflicts with PS1 on PS3 save files. Of course, we determine file type by checking the magic number, not the file extension (in most cases), so this shouldn't be a problem.
Partition format for PSV dumps: https://vitadevwiki.com/vita/Partitions
The first sector has an empty PC-compatible MBR and a proprietary partition table, similar to 3DS eMMC. (3DS eMMC does have a valid MBR, but it's encrypted and used for TWL mode.)
...it's exFAT! https://vitadevwiki.com/vita/Game_Card
Brilliant! We can use FatFS to read it: http://elm-chan.org/fsw/ff/00index_e.html
Add support for PS Vita VPKs. A VPK is basically a ZIP file containing an eboot.bin and an sce_sys/ directory.
Useful resources:
sce_sys/icon0.png is a 128x128 CI8 PNG image, so we can read that directly and use it as-is. (Note that it might not necessarily be 128x128, but we'll assume it is because anything else would break on the PS Vita.)
sce_sys/param.sfo is a System File Object that describes the program. Similar files are present on PSP, PS2, and PS3 games, so support for those could be added later.