hrydgard / ppsspp

A PSP emulator for Android, Windows, Mac and Linux, written in C++. Want to contribute? Join us on Discord at https://discord.gg/5NJB6dD or just send pull requests / issues. For discussion use the forums at forums.ppsspp.org.
https://www.ppsspp.org
Other
11.02k stars 2.15k forks source link

Jak & Daxter : "Unknown GetPointer" and make the game run slow FPS. #7502

Closed daniel229 closed 5 years ago

daniel229 commented 9 years ago

DEMO,pressing triangle is to skip video. https://drive.google.com/file/d/0BzGZGDfFE68zc3Raa2t2ZzBLcWM

01 02

FuncReplacements = False normal FPS 03

hrydgard commented 9 years ago

Good find! This is a bit odd.

Commenting out

{ "memcpy", &Replace_memcpy, 0, 0 },

and

{ "memset", &Replace_memset, 0, 0 },

in ReplaceTables.cpp fixes it in the demo. Strangely, only commenting out memcpy but not memset causes the game to crash in fast memory mode. Feels like it's relying on some return value from memcpy to then do a memset?

Another strange thing - savestates seem broken in this demo?

hrydgard commented 9 years ago

Rather scary this one - the game relies on some non-return registers to be set correctly after the function. Fixed, but there might be more of this kind of bug out there..

daniel229 commented 9 years ago

Great,how about the "Unknown GetPointer" before intro,also not happen when FuncReplacements = False . 01

hrydgard commented 9 years ago

Oh, I missed that one. I'll check soon

hrydgard commented 9 years ago

Hm, starting to feel like a timing issue? None of the "thread not dormant" or ReferEventFlagStatus errors happen when not using function replacement...

hrydgard commented 9 years ago

Timing issue indeed, bleh.

daniel229 commented 9 years ago

Not fix this game,but seems help https://github.com/hrydgard/ppsspp/issues/6695 and https://github.com/hrydgard/ppsspp/issues/6665

brujo5 commented 9 years ago

since build 1.0-83 1ecfd6cebcd8bb97722be4dc6fbc48f3ea71fe56 Have slowdowns in the game Dante inferno, drop fps from 40/40 to 29/40

In build 1.0-80/81 is fine.no slowdown

iPhone 5S

hrydgard commented 9 years ago

Thanks @brujo5

I'm starting to lean towards not replacing these functions that have highly variable timing, instead just hook and do the GPU copy, then let them run.

unknownbrackets commented 9 years ago

Well, we will have to hook memcpy on enter and exit, but yeah, that may be the simplest thing. I wonder what the perf impact is.

-[Unknown]

brujo5 commented 9 years ago

@hrydgard

Here other game that work in slowmov also in non-buffered rendering since 1.0-83 . And cause overheat

before 1.0-81/82 60/60 fps image In 1.0-83 29/60fps overheat image

unknownbrackets commented 9 years ago

Even using hooks, this game crashes.

More importantly, in interpreter, it works, but in jit it doesn't work. But, the original memset/memcpy don't work with interp, so that's still an issue.

So, it's almost definitely a bug in the jit. I wonder if this happens on arm too?

-[Unknown]

hrydgard commented 9 years ago

@daniel229 how about build 1.0-84 in Tomb Raider?

Yeah, I don't get what's going on here...

brujo5 commented 9 years ago

Will try later today. Hoop the update come out in cydia very soon.

daniel229 commented 9 years ago

@unknownbrackets Is it the crash not randomly happening?Those errors may sometime happen,sometime not. @hrydgard I suppose you @brujo5

unknownbrackets commented 9 years ago

Yeah, I ended up getting random crashes in even interp with no replacements, but it didn't happen every time. It seems way more likely with replacements enabled.

-[Unknown]

brujo5 commented 9 years ago

In build 1.0-86 retest dante inferno/tomb raider legends, slowdowns still going on but not too much lower fps. Example in Dante inferno build 1.0-83 Slowdowns 29/40 fps Now in 1.0-86 increase an bit slowdowns 34/40 fps

hrydgard commented 9 years ago

I think I'm gonna leave it like it is now for 1.0.1. We will have to look more into why replacements cause some misbehavior later..

unknownbrackets commented 9 years ago

I hope you're not using any adjusted cpu clock setting. We've already confirmed through testing that the current speed is faster than on real hardware, and matches replacements being off.

-[Unknown]

brujo5 commented 9 years ago

Nope never use cpu speed hack on this game because make sound very choppy.

sum2012 commented 7 years ago

@daniel229 Does v1.3-540-g29739c8 or newer version fixed ? I only tested beginning no problem

benderscruffy01 commented 5 years ago

no problems so far i think this can be closed