-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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
God Eater 2 cannot do continuous mission #5192
Comments
Sort of a duplicate of #4537, but that issue was hijacked so continue discussion here, I guess? :) |
Sorry,I cannot search the old issue |
What does the code near 08e70764 look like? -[Unknown] |
If you set a breakpoint there and run it, what does it look like? I guess it unloaded a module... maybe it's unloading it too early. -[Unknown] |
Okay, so s1 is differently bad in that case, and it's a function pointer. Yeah, the debugger doesn't handle jumping to invalid addresses well... -[Unknown] |
Well, that value of s1 definitely seems like the more correct one. I would guess this is a problem with resolving exports but I'm not really sure where the problem is. Does it still happen if you disable jit (in developer options, kinda tucked away on purpose)? -[Unknown] |
Jit off, same crash althrough doesn't freeze the debugger. |
Turn of fast memary and JIT,log seem the same |
@unknownbrackets It is my screen
|
God Eater 2 Prelude Edition DEMO 2 |
@jack00 what's the use of these link? Spread piracy? |
Links to demos are fine IMHO, as long as it really is demos that Sony or the game company lets you freely download. |
I wonder if the issue here is our blatant disregard for any of the options in SceKernelLMOption... Is there an easy (and quick) way to reproduce this that works in the demo? Ideally one that involves not finishing a whole mission, maybe just ending early or holding repeat and X a lot. So I can test things quickly... -[Unknown] |
Doesn't seem like abandoning missions and retaking them in the NPJH90338 (the first demo that was released) has any effect, e.g. the demo doesn't hang when taking another mission after abandoning, so I think that idea's out. |
@unknownbrackets some possibilities I've thought of :
// TODO: Use position to decide whether to load high or low |
I swear I mentioned that somewhere recently. We ignore the entire options struct, that definitely could be related if changing the thread allocation position helps. -[Unknown] |
You did just a few posts above: #5192 (comment). :P |
the problem is indeed related to not respecting fromTop in ElfReader on the following line vaddr = userMemory.Alloc(totalSize, false, "ELF"); changing it to true fixes the God Machine (and I suspect finding fromTop correctly there would also fix consecutive missions). |
Yay, not senile quite yet, just inattentive and forgetful. I'll take that as a win. Okay, well, that sounds pretty good. I think we just need to pass either the options pointer or parts of it into the elf reader, and respect them. I also wonder what the flags are... Thanks for figuring that out. -[Unknown] |
@unknownbrackets fwiw I tested the game a bit more and it doesn't use SceKernelLMOption (the option address for each module load is 0)...maybe there's something useful in the elf header? the change I did above does show some fixes, although it breaks some things (most notably, mission description text looks wrong and the archive crashes). it's probably not a good idea to force allocating one way there... |
http://report.ppsspp.org/logs/kind/455 <-- flags generally looks like a pointer, but not always. Hmm. Either way, indeed seems like this game doesn't use that. Hmm. -[Unknown] |
I was talking about the pointer (address) to lmoptions, which is null for this game, and flags are also null. much of the module is discovered after reader.LoadInto(loadAddress) which is why I was thinking maybe something in the elf header could tell, since there isn't much information before loadinto(). |
@unknownbrackets , might be related to firmware version. Maybe they changed it from a regular flags field to a pointer at some point. |
Could be. Or maybe it's just garbage so games don't care what they put in there. -[Unknown] |
Well, yeah, that might actually be more likely. |
That's a typical "FastMem" crash (the and edx,0x3ffffffff before in 32-bit builds are an easy indication), try turning off fast memory , you'll see that you'll get some invalid memory accesses in the log I guess... |
v0.9.8-310-gb4244fb still crash |
Is this known problem...every time I create a save state,ppsspp will crash. I'm using the demo of the game and the problem exist on 0.9.6-537 and 0.9.8-306. It's spamming this in the console when I tried 0.9.8-306 |
Not sure if a method to quickly reproduce this issue in demo is still needed, but I made a cheat which can make it very quick: As soon as the mission starts with this code activated, it'll instantly jump to mission complete, the first line of the cheat is a check which ensures it'll activate only during the mission, so should not mess anything else. |
Is this at all improved by doing this? It's just a theory. -[Unknown] |
Sill hangs. |
fwiw in v1.40 continuous missions can be done by increasing the allowed memory size. that probably means something isn't being cleared (or maybe the game doesn't recognise the clear for some reason?) adding |
@unknownbrackets Just a question .Do ppsspp invalidate native code blocks when unloading PSP modules ? |
@CPkmn actually this hd remaster addition is not increasing the memory, but decreasing it, as the game allocates much more(0x04000000 ?) with your other hacks in ElfReader: "vaddr = userMemory.Alloc(totalSize, true, "ELF");". and in sceKernelThread: currentStack.start = userMemory.Alloc(stackSize, true, (std::string("stack/") + nt.name).c_str()); |
@LunaMoo oops I meant decreasing. its 3AM when I posted that and I was tired. the updates for god eater 2 are interesting in PPSSPP. something always seem to be fixed in each update and something else breaks. |
Yeah;3, and also it's more than likely that all GE series games are affected by the problem it just doesn't break anything at least in GEB, as we can see in cwcheat.cpp: ^Memory is weirdly shifted in GEB as well and while that offset fixes some cheats it breaks others, because the game seems to also have messed up memory and just accidently working without problems. |
Well, essentially yes, especially with my change, since the emuhacks are gone. To be double sure, you can add this after the memset my change adds: currentMIPS->InvalidateICache(memoryBlockAddr, memoryBlockSize); -[Unknown] |
unluck still fail |
PPSSPP v0.9.8-1610-gc4bebda Windows 64 bit still fail |
Does https://github.com/unknownbrackets/ppsspp/tree/modules help at all? It may allocate modules more correctly in memory (kernel modules in kernel memory, user modules at top/bottom.) -[Unknown] |
No,it doesn't. |
But the "fromTop" thing still does, right? Hmm. -[Unknown] |
fromTop = 1;aways not help this problem. |
Oh. I think I got it confused with #4545, then. That branch doesn't help that one either though, does it? -[Unknown] |
No,it doesn't. |
That branch make Metal Gear Solid Portable Ops Chinese patch hangup after title,report a lot of snd_thread_m W[KERNEL]: ppsspp\Core/HLE/sceKernel.h:459 Kernel: Bad object handle -2143190986 (80418036) |
That's not even an error code it returns, though. -[Unknown] |
The address is not restored correctly when unloading module.
|
Nice catch. But hmm. Does that mean the Or no wait, it won't exactly "unreverse" that, what am I saying. No, maybe it's right like this. -[Unknown] |
v0.9.6-562-gd69f02d log
(Turn off fast memory)
https://gist.github.com/sum2012/dcc910b88b34da7bf899
maybe loading\unloading modules problem
edit:I start from new game
The text was updated successfully, but these errors were encountered: