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

MediEvil Resurrection camera problems on the Switch port #12706

Open mikifantastik98 opened 4 years ago

mikifantastik98 commented 4 years ago

the camera keeps spinning around and won't stop... ...this bug makes the game unplayable.

*Nintendo Switch / standalone version the bug is on every Nintendo Switch version so far

spriteice commented 4 years ago

+1. Would definitely love to play this game on my Switch. EDIT: For clarification: -9.2.0 ams 0.10.3 -Tried US/EUR regions of game -Stock ppsspp settings -No joycon drift

unknownbrackets commented 4 years ago

Does this happen on mobile devices too (they also use the same jit)? Does it happen on PC? I think people have not reported this on other platforms, but just want to confirm.

-[Unknown]

hrydgard commented 4 years ago

Could still be some kind of issue translating the analog controller values? maybe some kind of wraparound (although sounds odd...)

m4xw commented 4 years ago

Also fwiw, this is the only game this happens with to my knowledge.

spriteice commented 4 years ago

I don’t think it seems to be a control issue, playing with the analogue deadzones did not seem to help. It seems that the green targeting thing is following something that is not visible on screen

Panderner commented 4 years ago

I've played this game on Android no analog drifting on touch screen and controllers

m4xw commented 4 years ago

@Panderner armv7 or aarch64?

Panderner commented 4 years ago

@Panderner armv7 or aarch64?

aarch64

m4xw commented 4 years ago

Camera spin is supposedly fixed https://streamable.com/4ntguf Another tester said tho the camera is "too high" https://www.youtube.com/watch?v=J2pA9fgRafg def some change on last rebase (dunno how its supposed to be tho)

hrydgard commented 4 years ago

Extremely weird stuff. Changing the title of the issue.

ilikemyrealname commented 3 years ago

I'm having the camera spin issue, too. I tried both the regular and the "+" downloads https://www.ppsspp.org

unknownbrackets commented 3 years ago

Hm, that download says v1.9.x which is still a fairly old version...

-[Unknown]

m4xw commented 3 years ago

According to a tester, this issue still persists in my WIP rebase on master from 2 days ago

alfiones commented 3 years ago

For me...camera spin issue too with Medievil Resurrection EUR and Switch PPSSPP v.1.9.3-478 Is there another new version for Switch?

unknownbrackets commented 3 years ago

Does its spin depend on where exactly the analog stick is positioned?

-[Unknown]

alfiones commented 3 years ago

Does its spin depend on where exactly the analog stick is positioned?

-[Unknown]

Exactly, then the character begins to turn on itself

unknownbrackets commented 3 years ago

This might just be a deadzone issue. @m4xw we discussed this, but for more detail:

Currently, the deadzone is applied at the platform level. Values aren't sent at all if they're unchanged within the deadzone. In part, this is because some platforms may already apply some deadzone logic automatically.

The PSP internal APIs games call to get the controller analog data do not apply any deadzone logic. Instead, they simply return an X and Y both in the range 0 - 255, and games are left to apply deadzone logic or not.

On the PSP I used for years, the analog nub is a bit loose, but it's more the "cap" that's loose. This'll be hard to understand if you've never used one physically, but it's more of a coarse pad you can slide around a bit than actually an analog stick. The pad on mine is just slightly loose, so you can nudge it slightly without the actual stick underneath moving.

This at times (rarely) caused my nub to reset back slightly off center, which in many games did nothing. But in a few, it made me run left always or spun the camera. Luckily, in my case I could just nudge it back to center, but it was always annoying when it happened.

It could still be that the hardware applies some deadzone but from tests I did years ago, it seemed like the values changed as soon as I nudged the stick even the tiniest bit.

Most likely the fix here is to apply a deadzone before calling __CtrlSetAnalogX(), etc. In my experience, proper analog sticks don't reset to center as rigidly or consistently as those PDP analog nub pad things... even Switch drift problems aside.

-[Unknown]

ilikemyrealname commented 3 years ago

This might just be a deadzone issue.

It even happens with all controllers disconnected and just using the on-screen controls.

unknownbrackets commented 3 years ago

But not on Android/PC with touch controls?

-[Unknown]

Panderner commented 3 years ago

But not on Android/PC with touch controls?

-[Unknown]

Yes it does not occur for my android phone.

unknownbrackets commented 3 years ago

Well, probably not deadzone then - although might still be good to apply deadzone on Switch anyway.

I wonder if we're getting some event from rotation or something and sending it via NativeAxis, though. Could be a bug with how the SDL joystick stuff is implemented on libnx, and us not checking for SDL_CONTROLLER_AXIS_INVALID or something.

-[Unknown]

hrydgard commented 3 years ago

definitely seems more likely to be some weird input mapping issue than a CPU emulation issue, as the Switch has the same CPU architecture as devices where it works...

Paolo4300 commented 7 months ago

Does its spin depend on where exactly the analog stick is positioned? -[Unknown]

Exactly, then the character begins to turn on itself

It's 2024 and I am having the same problem with the camara on the switch, have you found a solution to this bug? @alfiones