This forum uses cookies
This forum makes use of cookies to store your login information if you are registered, and your last visit if you are not. Cookies are small text documents stored on your computer; the cookies set by this forum can only be used on this website and pose no security risk. Cookies on this forum also track the specific topics you have read and when you last read them. Please confirm whether you accept or reject these cookies being set.

A cookie will be stored in your browser regardless of choice to prevent you being asked this question again. You will be able to change your cookie settings at any time using the link in the footer.

Thread Rating:
  • 1 Vote(s) - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Savedata Encryption/Decryption
#71
bah... as I said before, my test environment is poor...

so, basically, should I clear SAVEDATA_PARAMS and generate hash of PARAM.SFO (after clearing)?

I have tried but the hash computed doesn't get the same as original's.
https://github.com/cielavenir/psp-saveda...9eaedef46f
Reply
#72
(10-28-2013, 08:48 AM)popsdeco Wrote: bah... as I said before, my test environment is poor...

so, basically, should I clear SAVEDATA_PARAMS and generate hash of PARAM.SFO (after clearing)?

I have tried but the hash computed doesn't get the same as original's.
https://github.com/cielavenir/psp-saveda...9eaedef46f

The hashing process should go like this:
1 - Generate a plain unencrypted PARAM.SFO. For example, if you're using a PARAM.SFO from PSP SAVEDATA (e.g.: from gamefaqs.com), all you have to do is clear the SAVEDATA_PARAMS field.
2 - Write this file.
3 - Re-open this file and compute the hashes using the file data as input.
4 - Re-write the SAVEDATA_PARAMS of the file with the hashes now.

In theory, this should work and the hashes should now represent the PARAM.SFO data, but I still need to test further.
Reply
#73
Is re-opening important? I should be able to calculate hash using memory buffer (after clearing SAVEDATA_PARAMS) right?
Reply
#74
(11-02-2013, 07:04 PM)popsdeco Wrote: Is re-opening important? I should be able to calculate hash using memory buffer (after clearing SAVEDATA_PARAMS) right?

No, you may use it directly from the memory buffer.
By the way, I've applied a new batch of changes to the SAVEDATA algorithm in r3408. This time the 0x20 hash (the only one that doesn't depend on fuse ID) is matching the one from a real PSP, so I hope I finally got this right. Smile
Reply
#75
while i'm not sure about the other games, valkyria chronicles 2 finally starts fine with the crypto mode enabled in 3408 (it didn't last time i tried, though that was a while ago). it creates the savefile correctly, then loads and saves into it without getting any corruption+deletion it did before.

a savefile created on a psp works fine in jpcsp, although jpcsp's save still can't be loaded on the psp.

is it possible this game has some kind of protection from using savefiles created on other machines, which jpcsp ignores but a real psp doesn't? or maybe it's because the game splits its save data into several smaller files.
Reply
#76
serio,

Perhaps that means jpcsp's PARAM.SFO is still incorrect. Keeping C port up to date is quite hard, so maybe we need Java test app...
Reply
#77
@serio
Thanks for testing and reporting.
Unfortunately I didn't test the changes with split SAVEDATA files. If the SAVEDATA folder contains data divided into several files, the PARAM.SFO will have their names and keys. This, of course, will change the final PARAM.SFO hashes, so it's possible that there's an issue with that.

@popsdeco
Indeed. I'll see if I can write a small app to fully test all the steps of the algorithm. Wink
Reply
#78
@Hykem
Thank you
for older jpcsp(older than r3403 I thank), if I want to use PSP read jpcsp's savedata I must use magicsave and UltraEdit to fix the savedata as jpcsp's savedate is bigger or smaller than psp. but now I just need magicsave.
download MagicSave and src http://pan.baidu.com/share/link?shareid=...2282369784
abort savedata fix(Chinese) http://blog.sina.com.cn/s/blog_91c98ddb0101q73c.html

Test jpcsp 3408, Sword Art Online [NPJH-50701]
I have check the "Handle SAVEDATA in crypto mode" and then jpcsp can save savedata but can not read the savedata, PPSSPP can read it , psp can read it also (need MagicSave fix it)
Reply
#79
(11-16-2013, 01:39 AM)onelight Wrote: @Hykem
Thank you
for older jpcsp(older than r3403 I thank), if I want to use PSP read jpcsp's savedata I must use magicsave and UltraEdit to fix the savedata as jpcsp's savedate is bigger or smaller than psp. but now I just need magicsave.
download MagicSave and src http://pan.baidu.com/share/link?shareid=...2282369784
abort savedata fix(Chinese) http://blog.sina.com.cn/s/blog_91c98ddb0101q73c.html

Test jpcsp 3408, Sword Art Online [NPJH-50701]
I have check the "Handle SAVEDATA in crypto mode" and then jpcsp can save savedata but can not read the savedata, PPSSPP can read it , psp can read it also (need MagicSave fix it)

Could you please check if Sword Art Online is saving and loading with crypto mode in r3410? Thanks! Smile
Reply
#80
[/quote]
Could you please check if Sword Art Online is saving and loading with crypto mode in r3410? Thanks! Smile
[/quote]

Test r3412 Sword Art Online is saving and loading with crypto mode in r3412. But not all the game can saving and loading with crypto mode

Test Monster Hunter Portable 3rd , jpcsp r3412 can loading with crypto mode but can't loading with crypto mode (Eorror 0x80110385)
I try to use Decryption mode to save but get Eorror "ゲームデータが壊れています。" and the game ask me delete the save , after I pressing the O button to delete save JPCSP stop there. yet JPCSP had delete the file ICON0.PNG, PIC1.PNG and PARAM.SFO but not MHP3RD.BIN and ULJM05800 folder. I try to delete MHP3RD.BIN myself but failed as JPCSP is already use it. I need delete the save when JPCSP is runing .

In PSP , if the game ask you delete the save ,and you pressing the O button , you can see all the PSP game save in you PSP and you can chose which save to delete.

JPCSP can delete save but can't delete the game save which is running and it will not ask you " do you want to delete this save " before you delete the save.
Reply


Forum Jump:


Users browsing this thread: 6 Guest(s)