Can I modify my savestate file ? - Printable Version

+- (
+-- Forum: PPSSPP - Playstation Portable Simulator Suitable for Playing Portably (/forumdisplay.php?fid=1)
+--- Forum: General Discussion and Announcements (/forumdisplay.php?fid=2)
+--- Thread: Can I modify my savestate file ? (/showthread.php?tid=1119)

Pages: 1 2

RE: Can I modify my savestate file ? - c0nK3R - 03-19-2013 05:18 AM

How to manually cheat games in ppsspp on windows. Tongue(you can try on linux, Android, and Mac should be similar)
Get memory heap viewer with the ability to write back to RAM. I suggest HxD.
DISCLAIMER: Use with caution you can seriously mess stuff up with this. YOU HAVE BEEN WARNED! I take no responsibility for how you use this program or guide!

1st understand how memory values are stored: (normally I explain later on). This is useful because ppsspp handles memory a little bit weird (v7-161).
Memory values are stored in Base16 a.k.a hexadecimal (123456789ABCDEF).
in hexadecimal there are 3 sizes you will normally be dealing with. (this is important to understand because you will know how to format your searches correctly).

This list will show base10 (decimal) value of 98 for an example. To convert from base10 to base16 you can use The windows stock calculator. Just Put it into programmers mode and the left hand side will have a list allowing you to change between Hex and Dec. Or you can use an online calculator.
  • 2byte: 0062
  • 4byte or Dword: 00000062
  • 8byte: 0000000000000062
Remember the Zero spots are Important!

2nd how memory is set-up on ppsspp(v7-161):
First we have to figure out where ppsspp stores the values from the game your playing. To do this we have to calculate the offset of the games data on the system memory level of addresses.
  1. Open up the Debug console in PPSSPP, then set the calculator to hex values.
  2. Find the Memory Base(usually third line in the debug log)(Where PPSSPP is storing its values in system memory) and copy it to the calculator and notepad if your using one (I suggest you do.)
    [Image: kJslhpJ.png]
  3. Find the UserSbrk offset(Where PPSSPP stores the games variables in PPSSPP scope of memory range) and add it to the Memory Base
    Usually doesn't change but might so check it after every new release.
    Value is 08d2bd00
    [Image: gAwKZoj.png]
  4. The results are the location of the games variables in terms of the system's memory address Smile.
    I will now call this The offset. This is useful to narrow your search range and to be-able to use the cheats you find again without looking for them (or at least till PPSSPP changes how it stores memory)

Next we need to learn how to use the program. if you use a different program well your sol Big Grin lol
  • To be able to manipulate a programs values while it runs We need to:
    1. open our memory heap viewer.
    2. Select the Extras tab
    3. Select Open Ram
    4. Select PPSSPP from the window that pops-up
  • Useful functions to work with.

    1. Search > Find (Ctrl + F), to go to next result its (F3)

      1. You will Most likely always be searching for hex values.
        [Image: uhKlK7m.png]

    2. Search > Find reverse (Shift + F3)
    3. Search > Go to (Ctrl + G), jumping to an address
    4. File > Save (Ctrl + S) used to write your changed values to Memory
    5. View > Byte Group Size > 4 Useful to try and organize the data so you can eliminate some variables without modifying them (i.e. oddly positioned in the blocks for the value size)
  • There's a lot more but you'll figure it out if you explore it longer Smile

  • Now on to how PPSSPP stores it memory values:
    • First PPSSPP stores its memory backwards

      1. a psp probably stores its variables like this: A,B,C
      2. PPSSPP stores its variables like this: C,B,A
  • Because the values are stored backwards even the memory bytes are backwards.

    1. Normal 4byte hex Value for 1000: 00 00 03 E8
    2. PPSSPP 4byte hex Value for 1000: E8 03 00 00

    This gets tricky but just remember the sets(bytes) get reversed not the numbers in the set. This is the Value you look for Smile.

  • Now to search for some values:
    • In HxD Go To the start of the offset block
    • Transform the decimal value into the modified hex value PPSSPP uses.
    • Search for that value

      1. Either change the value and save, Check it. if it doesn't work you might want to change it back because it might crash the emulator.
      2. Or change the value in game by modifying its status and click the block your watching to update its value. If it changes then that's the one.
  • When you find a value record:

    1. It's name
    2. Its address start block minus the offset value (Because it will
      always be in the same place till PPSSPP memory save style changes)

    But let's set some ground rules for these sheets until cwCheats become working Smile. (If it gets popular enough I will write a small program on the side when I get some free time Smile)
    _I GameId
    _G Game Name
    _V Working PPSSPP version:
    _O UserSbrk offset (should stay relatively the same and useful to determine change and codes validity)
    _U UserSbrk size   ^^^^
    _C notes such as creater of codes

    _N Name of value and any notes
    _L offset location of Value
    _S byte size if known ex.2,4,8
  • Repeat Smile
  • Post somewhere, somehow for others.

  • How to use your old values:
    Now once you have the sheet do these steps to use it.
      Calculate your offset (memory base + UserSbrk offset)
    • add the offset to the location value in sheet
    • Go to the new location
    • Change the value to what you want based on ppsspp way of handling hex values
    • repeat.
    • profit

    • Know the data size for the value your looking for it will be much easier.
    • Longer more special values are easier to find.
    • Use a cwCheat list for that game. (please see further down about cwcheat sheets tho).

      1. psp and ppsspp have aligned memory blocks. Meaning the variables fall in the same order
        hp > mp > money. but backwards so money > mp > hp
      2. If you have two values close find the difference that's their size and look for them together. Makes it a lot easier to track down tricky low number values like HP and MP
      3. If in the cheat sheet the value is high look at the begging of the block, If low than look towards the end of the block.
  • have any Tips post them Smile

  • CwCheat sheets:
    Even though psp and ppsspp have aligned memory's, ppsspp is early on in its life and its memory blocking isn't as conformed as psp and it has massive space between blocks of variables.
    This means That at this time cwCheats sheet codes will not work with any equation you try and should only be used as reference sheets for size, speculative position, and value amounts.

    Hope it Helps And maybe we can figure out a way to spread some of those cheats Smile

    Here's an example of what the code sheet should look like
    _I ULJS-00266
    _G .HACK//LINK
    _V 7-161
    _O 08d2bd00
    _U 01194300
    _C CREATED BY c0nK3R

    _N GP or MONEY
    _L 18FA10
    _S 4

    _N Tokio's HP
    _L 8682E
    _S 2

    _N Tokio's MP
    _L 86830
    _S 2

    _N Tokio's EXP.
    _L 738B88
    _S 2

    Also you can follow some of this guide for modifying save states, but honestly they are too random to be efficient at this task(ex. different rooms will have different location values with a save state).

    -Extra note-
    Just because the file says it was tested on an early build doesn't mean it wont work.

    Also when a value does migrate not all of them do. and the ones that do are usually less than +-2000 bytes away from where they were before.

    RE: Can I modify my savestate file ? - [Unknown] - 03-19-2013 05:40 AM

    About the backwards thing: that's actually "little endian", which is what Intel, AMD, Android, and the PSP's processor use. Xbox 360, Wii, and the PS3 however use "big endian" which stores values in logical order (e.g. 1 is 00000001 not 01000000, as explained above.)

    By the by, it's much easier for the emulator to be fast when both the emulator (e.g. Windows, Android) and the console (PSP) are the same endian, which is the case for PPSSPP.


    RE: Can I modify my savestate file ? - sen1668 - 08-12-2013 02:26 AM

    I know this is old topic, I just tried PPSSPP recently and using google no luck so for, so please forgive me if this issue already been slove in else where.

    I tried c0nK3R method "little endian" using cheat engine to edit memory on PPSSPP 0.81 but did not success, I had tried several games tactic orge, persona etc, is there any update how locate and change memory value on 0.81

    Could someone share the light please


    RE: Can I modify my savestate file ? - yuseiarkcradle - 08-15-2013 04:45 PM

    YES YOU CAN, IS THE EASIEST THING TO DO IN THE PPSSPP, I've tried with yugioh tag force 6 with all the cards cheat save data file I found on the Internet and it really worked

    Of course if you're talking about how to cheat on a game >~>

    RE: Can I modify my savestate file ? - sen1668 - 08-16-2013 02:12 AM

    thx for your replay, i've tried google but no luck, i'm using Cheat Engine to change the value like money, i can do this successfull in JPCSP but not in PPSSPP, already tried using backward search like c0nK3R prev mention but not success too.

    Could u share the link/resource for this

    RE: Can I modify my savestate file ? - ZeroG777 - 08-21-2015 09:41 PM

    I know this an old thread but I was wondering if you could take an official save from the UMD and use it one the PSP emulator or not. The reason why I ask is because I want to hex edit my saves but not use custom homebrew programs.