Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can not save if load a savestate which saved before the savedata. #7244

Open
daniel229 opened this issue Dec 31, 2014 · 12 comments

Comments

@daniel229
Copy link
Collaborator

commented Dec 31, 2014

A few games affected,Monster Hunter series,Patapon series.
Make a savestate
01

Make a savedata
02

Load the savestate previous make
04

Unable to save
03

@LunaMoo

This comment has been minimized.

Copy link
Collaborator

commented Dec 31, 2014

That's a game protection(kind of pointless through:P), it just stores hash of previously made save in memory and compares it to the save before allowing to overwrite existing save.

Some of the games which do this, allow saving when you delete your current save, dunno about patapon, but MH does not, so it has to be hacked(already did via cw cheat on the forum). I don't think you can do anything emulator side to universally avoid this issue.

@daniel229

This comment has been minimized.

Copy link
Collaborator Author

commented Dec 31, 2014

Delete the save folder,it's not saving.but it allow saving when delete SECURE.BIN.

@unknownbrackets

This comment has been minimized.

Copy link
Collaborator

commented Dec 31, 2014

The only way I can think of to do this is by including the savedata in the savestate and overwriting it when you load state (or otherwise pretending and committing it on write, which would be complicated), I think. I would not like this, personally...

-[Unknown]

@LunaMoo

This comment has been minimized.

Copy link
Collaborator

commented Dec 31, 2014

@daniel229 If you're interested in solving this via hacks as I mentioned already existing on the forums for some MH games, I just made one for Patapon 3 as well, it's pretty easy since this game doesn't even generate any hash, it just counts numbers of times saved and compares that.

I have UCUS-98751 version so the address will likely be different on your version, but you should be able to find it easily by searching for integer value which increases by 1 every successful save(ie using Cheat Engine for example), then set a breakpoint at the address(using ppsspp disassembly) to check what reads it when you try to save. It should break at something looking like this:
patapon 3-1
then just look a bit down in same function until you see something like:
patapon 3-2
You could probably also just try to find same function via ppsspp disassembly as the addresses often does not differ much between different versions of the game.
And that highlighted address is the one you want to change for cheat, this is how it would look for my version done via cw cheat:
_S UCUS-98751
_G Patapon 3
_C0 Allow saving over newer save
_L 0x20223C44 0x1000000B

it changes "beq s0,s2,0x08A23C74" to "beq zero,zero,0x08A23C74"(or "b 0x08A23C74" as it shows in disassembly:3) which makes it always branch like the save was correct, it does not check it for any important reason anyway, probably it was done to stop people from saving over their different saves when swapping memory sticks, certainly they did not made it predicting savestate abuse in emulators:].

Hacks like that must be done per game, but in the end activating simple cw cheat is not a big deal comparing to including saves within a savestate. I prefer them as it's now, keept separately.

@daniel229

This comment has been minimized.

Copy link
Collaborator Author

commented Jan 1, 2015

@LunaMoo Thanks for your tutorial,Is the address need to be converted,It does not break anything.
01

@daniel229

This comment has been minimized.

Copy link
Collaborator Author

commented Jan 1, 2015

Got it.
1.the Cheat Engine setting like this
01

2.search 0 between 3000 (or whatever value that is large enough)
then scan type set to increased value by 1 then would get these addresses
02

PPSSPP address = the address in the list 0xZZZZZZZZ - 0x03020000
then break the PPSSPP address in disassembly,would get something like @LunaMoo posted.
03
04

_S UCAS-40318
_G Patapon 3
_C0 Allow saving over newer save
_L 0x20223814 0x1000000B

@LunaMoo

This comment has been minimized.

Copy link
Collaborator

commented Jan 1, 2015

@daniel229 Oh sorry yeah I did not write what to do with CE itself, the way to actually calculate the address without doing anything extra would be checking ppsspp log when you run first game after starting ppsspp, as one of the first things it'll show where psp memory was allocated, it'll look alike:


 MemMap.cpp:338 I[MM]: Memory system initialized. RAM at 000000000BC80000 (mirror at 0 @ 0000000088810000, uncached @ 00000000C8810000)

(different for you ofc)
Now from that we can see that psp ram starts at 0x0BC80000, game does not load at the start of the ram through, because 8mb is reserved for kernel, so to that address, we have to add 0x800000:
0x0BC80000 + 0x800000 = 0x0C480000 that would be where game loads to memory, now find the address in CE again, for example let's say it was 0x0D123450, to get psp address, you have to decrease it by what we got earlier: 0x0D123450 - 0x0C480000 = 0x00CA3450 and then increase the result of it it by 0x08800000 because that's how it is on psp, so in the end 0x00CA3450 + 0x08800000 = 0x094A3450 now that address would show the place in ppsspp disassembly.

But it's not the only way, so yeah, glad you figured it out.:3

Happy new year!^_^

@daniel229

This comment has been minimized.

Copy link
Collaborator Author

commented Jan 1, 2015

Thanks for your explain,that make much clear about the ram address and psp address and happy new year.

@unknownbrackets

This comment has been minimized.

Copy link
Collaborator

commented Jan 11, 2015

Another option might be to check when loading a state if the savedata has been modified since the savestate was made (maybe with a contained timestamp or...), and prompt the user to let them know this problem may occur due to the way games are programmed. That may be the best option.

-[Unknown]

@sum2012

This comment has been minimized.

Copy link
Collaborator

commented Jan 21, 2015

edit:read again the post,I don't think need my information.
edit2:Add Patapon 3 bad save https://drive.google.com/file/d/0B3OaSdeV0L8kVVNKWXR3TEhIek0/view?usp=sharing

@HeiroMarc

This comment has been minimized.

Copy link

commented Feb 7, 2017

Could you guys create a video for this? I'm little bit confused...

@LunaMoo

This comment has been minimized.

Copy link
Collaborator

commented Feb 8, 2017

There's nothing a video would help in here. The problem is simple, some games have features that doesn't allow the user to write a new savedata over savedata they don't recognize as previously made one.
If you jump into past by loading savestate made before last normal save or if you replace your memstick with another one the game feature works and stops you from being able to overwrite the unknown data.

All you can do after it already happens is restart emulation and reload the game from actual savedata remembering to never jump back in time with savestates again this will fix everything by itself.

If such exist you could also use a cwcheat hack like few shared on the forums or the patapon ones above which intentionally break this game feature to allow saving over unrecognized savedata. Sometimes just deleting existing savedata can also work, but unfortunately those features can be weird and some games will never allow you to save from in-game unless they recognize previously made savedata or notice that existing savedata is actually corrupted.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
5 participants
You can’t perform that action at this time.