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

Gods Eater Burst Broken Savegames #3988

Closed
Daykod opened this issue Sep 29, 2013 · 83 comments · Fixed by #6762
Closed

Gods Eater Burst Broken Savegames #3988

Daykod opened this issue Sep 29, 2013 · 83 comments · Fixed by #6762
Labels
Saving issue Prevents or obstructs saving game (not save states.)

Comments

@Daykod
Copy link

Daykod commented Sep 29, 2013

Getting a weird error when loading my saves created on my actual PSP and it won't actually load them. It just goes back to the main menu whenever I try to load a save that wasn't created in ppsspp. They definitely work on my PSP though. Took a screenshot of the log right as it went back into the main menu. It's a bit noisy because of the atrac spam.

godeaterlog

@thedax
Copy link
Collaborator

thedax commented Sep 29, 2013

IIRC PPSSPP has never loaded saves for this game created by a real PSP. As for why, my money's on missing sceJPEG stuff, but I could be wrong.

@unknownbrackets
Copy link
Collaborator

Hmm, it says "hash broken". It might've hashed the save with your PSP's nickname or the PSID.

Does the save in question work on any PSP, e.g. not just yours?

-[Unknown]

@thedax
Copy link
Collaborator

thedax commented Sep 29, 2013

@suleks Could you upload the save to a site like mediafire? I'd like to test something.

@Daykod
Copy link
Author

Daykod commented Sep 29, 2013

I don't have another PSP on hand to test. It might be worth noting that the DLC didn't load when I copied it to the PPSSPP's memstick either. Something about a character mismatch. I dunno why it loads the saves made in ppsspp though. It's still writing a JPEG for the avatar because the avatar loads on the real PSP.
godeaterdlc
Here's a link to the saves if you'd wanna check them out.
https://dl.dropboxusercontent.com/u/38823080/SAVEDATA.zip

EDIT 1
Here's the last part of the log when loading a save game made in PPSSPP sort of successfully with the dlc
godeaterdlclog

@unknownbrackets
Copy link
Collaborator

You may have to copy the files from PSP/LICENSE (or whereever, I forget) to the PPSSPP memstick/ directory as well for the DLC.

-[Unknown]

@Daykod
Copy link
Author

Daykod commented Sep 29, 2013

Copying PSP/LICENSE didn't seem to do much.

@unknownbrackets
Copy link
Collaborator

Dunno then, see #1916. Maybe there's DLC files you also need to copy.

-[Unknown]

@Daykod
Copy link
Author

Daykod commented Sep 29, 2013

I figured it might be related if there's some kind of DRM thing going on. Anyway I just double checked the savegames and the one created on PPSSPP actually doesn't have an avatar loading on my real PSP. So it might be the JPEG breaking it like @thedax mentioned.

@thedax
Copy link
Collaborator

thedax commented Sep 29, 2013

Does the save created by PPSSPP actually load and go in-game on your PSP? Also, if you then save the game on your PSP and re-load it in PPSSPP, does it kick you back to the main menu?

@Daykod
Copy link
Author

Daykod commented Sep 29, 2013

Yeah, the PPSSPP game save loads on the real PSP. Saving after loading it onto the PSP did seem to break it. Now it behaves like the real PSP savegames. The same error message about hash broken appears in the log

@thedax
Copy link
Collaborator

thedax commented Sep 29, 2013

I just did a test and yes, savedata are indeed transferable between real PSPs. Is it safe to say then that the game may be hashing the avatar image created by scejpeg?

@mr-chya
Copy link

mr-chya commented Sep 29, 2013

I just tested the save games available on gamefaqs which I assume were made with a real psp and they worked correctly so I am not sure that is it. However with that said one file I noticed that was present inside the gamefaqs saves and not present in any other is a file named C00.bin.

@Daykod
Copy link
Author

Daykod commented Sep 30, 2013

Well I can't explain this. They did actually load in ppsspp and they have avatars. What's even in these save files?

@Daykod
Copy link
Author

Daykod commented Sep 30, 2013

Still dunno what's up with this save file. I'm checking out the one with just C00.bin and it seems to be edited. Has stupid amount of money with top end gear without having any missions clear. Removing C00.bin causes the game on ppsspp to read it as corrupted but it "recovers" it and works fine afterwards. It doesn't rewrite C00.bin to the memstick. I tried it with my real PSP and ppsspp. I didn't see the bin get touched in the log though. As for the dlc, it seems it's generating a key and using it to find a file in PSP/LICENSE. It generated a couple and none of them matched the one I have for it. Wonder if the CFW i'm using on my real PSP is doing something with that.

@Daykod
Copy link
Author

Daykod commented Oct 2, 2013

Just to make sure nothing weird was going on, I loaded up the disc for GEB without CFW and didn't change any of the save files I already head. Created a new one to test it too. Still dunno whats up with those extra bin files.

@Daykod
Copy link
Author

Daykod commented Oct 3, 2013

What's up with sceJpegGetOutputInfo()? Using the debug bit of code to try and dump the jpeg always breaks at line 196, on fclose(wfp). Buffer overflow exception. Are the checks at the start of the function missing something? I'm trying to figure out what's going on in this save menu. Here's the call stack when you open the continue singleplayer menu.

    msvcr110.dll!6a1d28b7() Unknown
    [Frames below may be incorrect and/or missing, no symbols loaded for msvcr110.dll]  
    msvcr110.dll!6a1cf7fb() Unknown
    KernelBase.dll!7711778a()   Unknown
    kernel32.dll!76a63f46() Unknown
    msvcr110.dll!6a1cc2a2() Unknown
    kernel32.dll!76a614ad() Unknown
    msvcr110.dll!6a13dcc2() Unknown
    msvcr110.dll!6a1cd0a0() Unknown
    msvcr110.dll!6a144c67() Unknown
    msvcr110.dll!6a1cd03a() Unknown
    msvcr110.dll!6a1cd0c1() Unknown
>   PPSSPPWindows.exe!sceJpegGetOutputInfo(unsigned int jpegAddr, int jpegSize, unsigned int colourInfoAddr, int dhtMode) Line 196  C++
    PPSSPPWindows.exe!WrapI_UIUI<&sceJpegGetOutputInfo>() Line 330  C++
    PPSSPPWindows.exe!CallSyscall(Memory::Opcode op) Line 450   C++
    0d01669e()  Unknown

Also I tried setting up JpcspTrace up with my real psp to see what's going on in this menu but the log doesn't catch anything from sceJpeg. Here's a link to the log : https://dl.dropboxusercontent.com/u/38823080/log.txt

@unknownbrackets
Copy link
Collaborator

The God Eater games use some complex linking, it's not impossible JpcspTrace is missing it, unfortunately... or maybe it's some module that's already loaded doing the sceJpeg calls. Hmm.

For the debug code, it looks like you need to create a "Jpeg" directory (possibly inside Windows/) or it'll probably crash. Might check wfp != NULL.

-[Unknown]

@Daykod
Copy link
Author

Daykod commented Oct 3, 2013

Cool. Got it working and it looks like the jpeg isn't too far off of what it should be. Instead of putting it in a specific directory, I just changed sprint off to format "Jpeg%x.jpg" instead.
Here's a link to the image
https://dl.dropboxusercontent.com/u/38823080/Jpeg7369E829.jpg

@unknownbrackets
Copy link
Collaborator

Oh, that's interesting. Is it meant to have a background? It almost seems like there's transparency that's being ignored, but that would be JPEG-2000 or something right? (I do not know much about that stuff at all.)

-[Unknown]

@Daykod
Copy link
Author

Daykod commented Oct 3, 2013

https://dl.dropboxusercontent.com/u/38823080/pspscreenshot.png
Here's what it should look like so there's some kind of transparency somewhere. PPSSPP just draws a black silhouette.

@CPkmn
Copy link
Contributor

CPkmn commented Oct 3, 2013

@unknownbrackets

Transparency isn't ignored - nothing is actually being decoded because the functions it uses aren't really implemented fully and (I guess) there's a silhouette, and the decoded avatar is drawn over that (but since nothing is decoded, nothing is drawn over it I think).
In order to actually decode the avatar, the following functions have to be correctly implemented :

sceJpegDecodeMJpegYCbCr()
sceJpegMJpegCsc()

@Daykod
Copy link
Author

Daykod commented Oct 3, 2013

The silhouette would changed based on the save game though from what I could tell, and I think PPSSPP gets that part right. I'l have to check it again later.

@thedax
Copy link
Collaborator

thedax commented Oct 5, 2013

Another thought just occurred to me: @suleks: What firmware was your PSP on when you created the save, if you can remember? If it doesn't match the firmware the game wanted(say 5.00 or 5.50 for example, and the game wanted 6.xx) that tends to create "corrupted" saves, which might be throwing off PPSSPP. Or was it if you upgraded to a newer firmware after creating the save on the "wrong" one? Hm..either way I seem to remember improper firmware versions causing trouble.

@Daykod
Copy link
Author

Daykod commented Oct 5, 2013

I use the PSP 3000 model so I was probably using CFW 6.60 when I made it. I created a test save without CFW with the disc though and it had the same issues IIRC. That one was created with the latest firmware.

@Daykod
Copy link
Author

Daykod commented Oct 5, 2013

https://dl.dropboxusercontent.com/u/38823080/SAVEDATA2.7z here's the zip I posted in the other thread. The second file is the one I'm sure I created on a real PSP since it has avatar data at all and it loads ingame after the MJPEG implementation commit.
https://dl.dropboxusercontent.com/u/38823080/SAVEDATA%20-%20TEST.7z is a new set of save files I just tested with that commit. Both real PSP save games still give the hash broken message. Gave them appropriate names this time round so they're easy to identify.

@thedax
Copy link
Collaborator

thedax commented Oct 6, 2013

I tested savedata-2.7z and the second save slot with 10 hours goes in-game without the mjpeg commit, so I don't think it's working because of that. The third save slot with 5 hours doesn't go in-game with or without the commit(broken hash).

I got the same results as you with SAVEDATA-TEST.7z.

@Daykod
Copy link
Author

Daykod commented Nov 16, 2013

Thought I'd add that God Eater 2 still has this issue. It can't load real PSP save games. There aren't any MJPEGs used in the loading screen. Same error code though.
image

@Daykod
Copy link
Author

Daykod commented Nov 26, 2013

So I had a dumb realization about that real PSP save game that loaded in PPSSPP. It was run through SED because I was manipulation the version of the save so that it could be imported in JP GEB. So despite being able to be transferred to different PSPs, PPSSPP can't decrypt it? I'm not too familiar with the DRM that PSPs use I just tested this with my GE2 save that I used SED on.

@kurasa25
Copy link

kurasa25 commented Dec 2, 2013

same problem here... except my save works perfectly on my psp. only on ppsspp the avatar is kinda buggy and it sends me back to the title screen as soon as i try to load the save.

@unknownbrackets
Copy link
Collaborator

Well, if we detected it it would just be to show an osm, I think. It's possible to detect the hash failure using a replacement hook. Automating would be crazy, yeah.

-[Unknown]

@LunaMoo
Copy link
Collaborator

LunaMoo commented Aug 22, 2014

Wouldn't the cheat from above be enough to work around this backward compatibility issue?

If so, I can confirm it works in EU version(same address) and I made a similar cheat for GE2 a while ago. Just a bit of work for the users. :3

BTW nice work solving this ancient issue:).

@unknownbrackets
Copy link
Collaborator

Well, the cheat allows loading the corrupt broken savedata, but it doesn't make the savedata not corrupt (although saving after loading with the cheat will set the corruption in stone.) You may experience weird glitches anywhere in the game because of this corruption.

-[Unknown]

@LunaMoo
Copy link
Collaborator

LunaMoo commented Aug 22, 2014

Oh so it's actually broken, I thought it would simply not load because of incorrect hash.:3

Anyway great news, MGS was also affected, wonder how many other games were having problems because of this.:)

@super-ninja-tom
Copy link

@LunaMoo how are you managing to get that cheat to work on the EU version, please help!

I am using ULES01519 and have:
1.Fresh install: ppsspp-v0.9.9.1-65-gf8a4236-windows-x86 (tried with ppsspp-v0.9.9.1-65-gf8a4236-windows-amd64 too)
2.Contents of memstick\PSP\Cheats\ULES01519.ini:
_C1 Enable PSP Gods Eater save
_L 0x08888F54 0x1063028B beq v1, v0, pos_08889984
3. "Enable Cheats" in main PPSSPP settings
4. Open game, made sure that "Enable PSP Gods Eater save" is checked in the Cheats settings menu
5. Tried to load a save game from my PPSSPP and it drops back to the previous menu, a save created through PPSSPP still works.

Any tips would be greatly appreciated as you mention having got the EU version to work but I am still stuck :(

@hrydgard
Copy link
Owner

@ninjatjj forget the cheat for that purpose, it will soon no longer be needed.

@super-ninja-tom
Copy link

it will be great news when that happens!

@LunaMoo
Copy link
Collaborator

LunaMoo commented Aug 22, 2014

@ninjatjj basically 0x8800000 is 0 for the address in cw cheat and first number in the address is actually a code type not part of the address, you can google for cw cheat code types.
So basically the first part of the cheat ~ after the title ~ should look like "_L 0x20088F54"(~ "2" in there is basically a code type meaning "32 bit write") and also don't put disassembly after the second code in the line it was more of a comment nothing required.

And yeah saves from psp will work without any cheats, tried already with both GEB/GE2, don't bother using the cheat, just wait a bit, I replied only to point your problems with making cheats.

@super-ninja-tom
Copy link

@LunaMoo many thanks! that works great for me - much appreciated. I took a quick look online to try to understand the "32 bit write" but I found the source of CwCheat.cpp helped me most:
It looks like:
https://github.com/hrydgard/ppsspp/blob/master/Core/CwCheat.cpp#L294
https://github.com/hrydgard/ppsspp/blob/master/Core/CwCheat.cpp#L284
https://github.com/hrydgard/ppsspp/blob/master/Core/CwCheat.cpp#L221
Explain why: 0x08888F54 works on the US version and we need 0x20088F54 on the UK version.

As suggested above, I will wait for the official version but at least I can see why its different now - thanks again!

@LunaMoo
Copy link
Collaborator

LunaMoo commented Aug 22, 2014

@ninjatjj it's same for both EU and US, it's just that CW Cheat address starts from 0x8800000 which is user memory. When you look at the address in disassembly or memory viewer it'll be 0x8888F54, but as cw cheat the address would be 0x0088F54(0x8888F54-0x8800000).
Writing 32 bit value simply means that the value you write can be from 0x0 to 0xFFFFFFFF, It's like the most common and usefull code type in cw cheats althrough it has many others, including some which take more than 1 line of code.

@super-ninja-tom
Copy link

@LunaMoo Ah, that explains it then thanks!

I still don't really understand why the US version needs the following:
https://github.com/hrydgard/ppsspp/blob/master/Core/CwCheat.cpp#L221
And the EU version works even though it isn't having that applied?

@LunaMoo
Copy link
Collaborator

LunaMoo commented Aug 22, 2014

Oh that, this is a pretty awful workaround added only because those games were loading differently on psp and ppsspp, so some cheats weren't working and people cried:]. I'm quite sure this workaround actually broke cheats which worked, because the issue wasn't really affecting whole memory while that "fix" does shift all addresses by same offset.:|

I think the initial issue should have been completely fixed by v0.9.9.1-38-g2de6b47, so that workaround probably should be removed as well, currently I assume all it does is breaking cheats for versions of the game it affects.

@super-ninja-tom
Copy link

@LunaMoo thanks for the context - much appreciated!

@unknownbrackets
Copy link
Collaborator

I've removed the hack in my modules branch, which makes memory allocation much closer. I can almost exactly match it by making sceNetInit() allocate some stuff, but there's still a couple things off by slight amounts within its self-managed allocation pools - possibly different timing.

-[Unknown]

@super-ninja-tom
Copy link

Awesome - really great work - thanks for fixing this one!

@fauxhind
Copy link

So the cheat is obsolete? I still can't get it to load up despite using the cheat code. Also installed the latest build which was stated that it fixed the save file error but it didn't do anything at all.

@unknownbrackets
Copy link
Collaborator

Using default settings and not using the cheat loads savedata for me.

If you're using the cheat (which kills the hash check), and your savedata still won't load, you've got a different problem. Maybe relating to DLC or something.

-[Unknown]

@fauxhind
Copy link

I have the DLC installed but the problem still persists. Blurry avatar and automatically puts me back to the main menu screen.

EDIT: May I ask as well, what build are you using?

@unknownbrackets
Copy link
Collaborator

v0.9.9.1-168-ge1d2e72 which I just sent a pull request for, but it doesn't change anything above v0.9.9.1-164-gcdbcc12 for Gods Eater Burst's savedata issue.

-[Unknown]

@tomjenkinson
Copy link

@fauxhind, which version of GEB are you using? I can confirm the EU version works without cheat and stock 0.9.9.1-92-gd4ec7d8 (I do have the EU DLC installed).

@fauxhind
Copy link

US version @tomjenkinson I have the files I need (that being the DLC) and I have the latest stable build but despite having what I need, it still sends me back to the main menu screen. Help would be appreciate because noone wants a 500hour save file going down the drain.

@unknownbrackets
Copy link
Collaborator

If you have a save file that you loaded with the cheat code enabled, and then saved, or a save file from created/saved/updated from an old ppsspp version, you'll need to go into System settings and turn off the GEB fix to load the old save. Once you've loaded it, turn it back on, and save.

However note that the cheat leads to savedata corruption. I think it will have been saved in your savedata now.

-[Unknown]

@fauxhind
Copy link

Oh I'm glad then because what happened is that my savefile was deleted instead of corrupted when using the cheats which I find weird. I would fire up GEB with the cheats, send me back to main menu, close the game and reopen it, it would say no save file was found. Luckily I have my savefile backed up. Regardless, I was able to fix the savefile issue by downloading the latest build from the automated builds.

@LunaMoo
Copy link
Collaborator

LunaMoo commented Aug 31, 2014

If you talk about the cheat from here, for US version it would actually need an offset for the address to counter that one added by a hack in our cw cheat implementation as discussed above;3. Basically the hack -0x7EF00, so all the cheats created on ppsspp have to include +0x7EF00 to an address, kind of stupid, so yeah it's better to just use ppsspp option to deal with it.

@MaxiM-PL
Copy link

Hey guys,
Downloading v0.9.9.1-1245-g4b053ef helped me with not being able to load the game at all, but one issue still persist. I'm using the original PSN files to play between my PC and my Vita. So far so good, but I'm getting "Could not recognize the Special Character unlock key." error while loading the game: http://i.imgur.com/scUfTaq.jpg
It does load however and after uploading the save game back to Vita the error is gone and I can continue (so far at least). Any ideas?

@Nailurridlo
Copy link

if anyone can summarize how to make the save data can be continued?

@unknownbrackets
Copy link
Collaborator

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Saving issue Prevents or obstructs saving game (not save states.)
Projects
None yet
Development

Successfully merging a pull request may close this issue.