***********************************************
**                                           **
**   Savegame Deemer                         **
**                                           **
**   Save and Load of UNENCRYPTED Savedata   **
**                                           **
***********************************************

          by ---==> HELLCAT <==---

for support, questions or suggestions go here:
http://forums.qj.net/showthread.php?t=133753


OK, so what?
===============

This is a small CFW plugin that will make the PSP to save any savedata in
unencrypted form as well as the usual way.

The unencrypted savedata can then be directely edited with whatever tools
you use for tasks like that (mostly a hexeditor, I'd guess ;-) ) and on
the next load those (edited) unencrypted data is loaded and off you go :-)


How? What? Where?
===================

When saving from a game, the savedata is saved as usual.
In addition to this, there will be another set of savedata created inside
/PSP/SAVEPLAIN on your memstick.
The folders will be named much like what they are named in /PSP/SAVEDATA,
consisting mostly of the game ID.

In the folders carrying the unencrypted savedata you'll find three file:

- <gameid>.BIN
One file will have the same name as the folder (gameid) plus the .BIN suffix.
This file will be usefull for devs only in most cases, it contains a dump
of the params structure that has been passed from the game to the syscall
used for savedata access.
This also contains the unique gamekey!!! ;-D

- SDINFO.BIN
This contains the descriptive texts that are shown in the XMB and the
save/load dialogs and is usually stored inside the PARAMS.SFO on the
original savedata.

- SDDATA.BIN
THIS IS WHAT YOU ARE LOOKING FOR! :-)))
This file contains the actual savedata, in it's pure, unencrypted form!
Edit it to all your needs, on the next load THIS will be loaded instead
of the original (encrypted) savedata.


The following "rules" apply while this plugin is active:

- If unencrypted savedata for the current load is present it will be loaded
  INSTEAD of the normal/encrypted one.

- When saving, thre's always the unencrypted version saved alongside.

- If no unencrypted data exists for the current load, the normal/encrypted
  one is loaded as if nothing ever happened.

So, if you want to use your normal savedata again, either disable this plugin
or delete the unencrypted version from /PSP/SAVEPLAIN.


*NOTES* *IMPORTANT* (more or less....)

In theory this shouldn't have any negative sideeffect beside slowing the
load/save down a bit due to some intentional delays for preventing
conflicts with other threads.

However, if you do not intent to use the unencrypted data, you should
disable the plugin in the recovery menu - just to be save :-)


Installation
==============

Easy:
Copy the /seplugins folder from this archive to your memstick.
If you have no plugins yet, just rename the "game.txt.new" to
"game.txt".
If you already have plugins, edit your existing "game.txt" and add
this line:

ms0:/seplugins/deemerh.prx

Go to recovery and enable the "deemerh.prx" plugin.

Set, and ready for liftoff :-)

(There are two deemer .PRXs, make sure you add the one with the
 "h" at the end to game.txt, NOT the one ending with "d" - nothing
 bad will happen, in fact absolutely nothing will happen if you put the "d"
 one in game.txt since it's a helper module that does nothing on its own. )


To look out for?
===================

While editing the savedata you should keep in mind that most games
include some own checksums, additional encryption or sanity checks.
So, even if the savedata is loaded correctly from the technical
point of view, the game might complain about corrupted data.

In that case, you'll have to figure out the games additional checks.

Another thing, when the savedata in question is saved/loaded via
the save game dialog (where you can choose what savegame to load
or save):
Usually the folder for the unencrypted savedata consists of
the game ID AND the save ID.
For the dialog to show up, the game does not pass a fixed save ID,
so in this case the folder will only be named of the game ID.
Keep that in mind if you think the wrong data is loaded/saved.

Example:
Wipeout-Pulse, savedata caused by autosave will be in a folder
like this:
UCES00465P0001
If you save (or load) a profile using the load/save dialog the
folder will look like this:
UCES00465

I guess this will cause some confusion, but so far I have no
way of knowing what save was selected in the dialog.
Not even the game knows ;-)


The End
=========

Well, I think this should be it....
If there's anymore to be said, I'll add in the next realeases readme.

HAPPY SAVEGAME CHEATING! :-)))




Dev Stuff
===========

For those knowing what's going on:
I initially tried to load/save the savedata using the original function
the games use as well: sceUtilitySavedataInitStart()
Without luck so far, there's more initialisations to be done or additional
checks by the PSP I have yet to figure out....
(yes, I do have the gamekey, that one is no problem....;-) )

So I came up with this which was originally intended to get the gameskey from
the games and which is so damn simple....
All this does is dumping the databuffer when sceUtilitySavedataInitStart()
is called or overwrite it with the unencrypted data when
sceUtilitySavedataGetStatus() returns 3.... BOOM :-p

The source to this is available as seperate download from this URL:
http://fserv.skill-club.com/get_484_ec85.html
