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

Object collision/glitching in Harvest Moon Hero of Leaf Valley on Android #15282

Closed
5 tasks done
Obviator opened this issue Jan 5, 2022 · 13 comments
Closed
5 tasks done
Labels
arm64jit Occurs with JIT on 64-bit ARM devices, but not another CPU backend. armjit Occurs with JIT on 32-bit ARM devices, but not another CPU backend. CPU emulation
Milestone

Comments

@Obviator
Copy link

Obviator commented Jan 5, 2022

Game or games this happens in

ULUS10458

What area of the game / PPSSPP

At the horse race when contestants are riding around the track, the horse and rider often force their way through the fence and into an out-of-bounds area in the center of the track. It does not necessarily happen every race, but this can break the horse racing.
A seemingly related glitch/world stutter can be seen when visiting the restaurant and walking toward the counter to the left of where Katie stands; other glitches may be present.

This glitching behavior seems to have been introduced to the Android version. The glitching was NOT present in PPSSPP version 0.9.9.1 on Android but has been present on every version I've tried since 1.0. I primarily play on Android, but I have tried various Windows builds and have NOT seen this glitching on Windows.

(There are three races beginning at 2 PM. Save state is right before the first race, game save is the day of the race. The issue at the restaurant can be seen any non-event day when the restaurant is open.)
game save and save state.zip

Screenshot_20220105-133759_PPSSPP Gold

What should happen

The horse/rider should remain on the dirt outer part of the track and not be able to glitch into the grass in the center of the race track.
The screen should not shake/shudder when walking around to the left of Katie near the bar at the restaurant.

Logs

No response

Platform

Android

Mobile phone model or graphics card

Samsung Galaxy s10e

PPSSPP version affected

v1.12.3

Last working version

v0.9.9.1

Graphics backend (3D API)

Vulkan

Checklist

  • Test in the latest git build in case it's already fixed.
  • Search for other reports of the same issue.
  • Try resetting settings or older versions and include if the issue is related.
  • Try without any cheats and without loading any save states.
  • Include logs or screenshots of issue.
@hrydgard hrydgard added arm64jit Occurs with JIT on 64-bit ARM devices, but not another CPU backend. armjit Occurs with JIT on 32-bit ARM devices, but not another CPU backend. CPU emulation labels Jan 5, 2022
@hrydgard hrydgard added this to the Future milestone Jan 5, 2022
@hrydgard
Copy link
Owner

hrydgard commented Jan 5, 2022

That would likely be some minor precision difference in the ARM jits... Are you running on a 32-bit or 64-bit Android device?

Does it make a difference to change the CPU backend to "IR Interpreter" or even Interpreter? (you can find it in developer settings under tools).

@Obviator
Copy link
Author

Obviator commented Jan 5, 2022

I'm running 64-bit Android.

Just with some quick testing, it does seem to fix the issue to change the CPU backend to "IR Interpreter." Thanks for the suggestion, I had tried adjusting a lot of settings! Is that a permanent fix?

@hrydgard
Copy link
Owner

hrydgard commented Jan 5, 2022

It's interesting because it points to a way of narrowing down the problem. It's now clear that there's a bug in the 64-bit ARM JIT compiler, which we use to convert MIPS code from the PSP game to ARM64 for execution on the phone.

The next step would be to turn the JIT back on, and then go into Developer Tools / JIT debug tools, and start checking boxes (that each disable a part of the JIT) until it starts working again. The box that "fixed" it then points to the buggy part of the JIT. May have to restart the game before checking each box for reliable results though, so it's a bit of work..

@ghost
Copy link

ghost commented Jan 6, 2022

I disable this and the horse is not glitching anymore using JIT Dynarec
Screenshot_2022-01-06-08-14-52-470_org ppsspp ppsspp
Edit: After 3rd try the horse glitch again but I disable another jit debug static regalloc

@ghost
Copy link

ghost commented Jan 6, 2022

Static Regalloc disable in jit debug tools

Screenrecorder-2022-01-06-08-34-42-897.mp4

@unknownbrackets
Copy link
Collaborator

That's very interesting. So it seems like both of those help? Are they the only ones that help?

I guess some sort of static allocation bug could explain a couple of the remaining arm64 issues we have...

-[Unknown]

@Obviator
Copy link
Author

Obviator commented Jan 6, 2022

Disabling "Static Regalloc" did not fix the issue for me, but I think I found one that did. I started with that option to check it but still got the glitch. So I started over from the top of the list and exited upon changing each setting until I got down to "VFPU_VEC."

I checked it with six races and going into the cafe the next day and all is well (it may be faster to test by checking in the cafe, since that twitching happens every time you're in the right spot but the horse race is a little more sporadic - the issues are definitely related). There may be other settings that can fix it as well if someone wants to double-check the rest.

Thanks for helping get to the bottom of this - it's bugged me for a long time!

@ghost
Copy link

ghost commented Jan 6, 2022

Change Emulated PSP's CPU Clock to 99MHz or below the horse is glitch.

Change Emulated PSP's CPU Clock to 100MHz or above the horse is not glitch.

@anr2me
Copy link
Collaborator

anr2me commented Jan 7, 2022

I don't think changing the clock can be called a solution, changing the clock is probably affecting the horse movement, thus hitting a different location during the collision calculation when the horse bumping the fence.

@unknownbrackets
Copy link
Collaborator

If it's between v0.9.9.1 and v1.0.0, rounding mode was set between these two versions. Technically, I think the VFPU uses a fixed rounding mode, different from FPU... but that would affect PC too.

Vhoriz, Vmfvc, VCrossQuat, Vrot, and many of the NEON jit funcs had updates between those versions. That lines up with VFPU_VEC.

-[Unknown]

@ghost
Copy link

ghost commented Feb 7, 2023

Can't reproduce this issue using the recently build PPSSPP.apk using my vivo y11 snapdragon 439 adreno 505.
https://fileup.to/9w36/Screenrecording-PPSSPP.mp4

@unknownbrackets
Copy link
Collaborator

This may have been fixed with #18203.

-[Unknown]

@justafella
Copy link

This may have been fixed with #18203.

-[Unknown]

It was fixed. I have been playing lately and no bugs so far.

@hrydgard hrydgard modified the milestones: Future, v1.16.0 Jan 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
arm64jit Occurs with JIT on 64-bit ARM devices, but not another CPU backend. armjit Occurs with JIT on 32-bit ARM devices, but not another CPU backend. CPU emulation
Projects
None yet
Development

No branches or pull requests

5 participants