EmulationCollective / XBSX2

XBSX2 UWP/WinRT - The PlayStation 2 Emulator for Xbox Series/Xbox One
GNU General Public License v3.0
31 stars 3 forks source link

[BUG]: Weird framepacing issues #8

Open therealteamplayer opened 3 months ago

therealteamplayer commented 3 months ago

Describe the Bug

(edited from original post) Upon opening the app and then selecting a game, there can be severe microstuttering issues. So far I have tested Dark Cloud and Half-Life (at 300% overclock as the game lags on real hardware). Dark Cloud has severe microstuttering until the option "Disable Mailbox Presentation" is toggled, regardless of what it is set to. To my memory, the issues in Half Life are solved when this setting is set to enabled. Either way it seems like the microstuttering issues are tied to this option.

Reproduction Steps

Launch Dark Cloud and observe poor framepacing (i.e. by rotating the camera). Toggle the setting and the issues should go away.

Expected Behavior

There are no framepacing issues entirely - as is the case with 2.0.3

PCSX2 Revision

xbsx 2.0.7

Operating System

Windows 11

If Linux - Specify Distro

No response

CPU

xbox

GPU

xbox

GS Settings

No response

Emulation Settings

No response

GS Window Screenshots

No response

Logs & Dumps

No response

therealteamplayer commented 3 months ago

NOTE: originally I did not know much about the issue other than there being framepacing issues that were not present in 2.0.3, my earlier comments reflect this.

it might be an issue on my end I'll try and investigate some more

therealteamplayer commented 3 months ago

I can confirm that this build definitely has worse framepacing than older ones - however, the most severe framepacing issues went away once I enabled "Disable Mailbox Presentation", despite the option claiming it would make it worse.

therealteamplayer commented 3 months ago

Furthermore the result is inconsistent from game to game. Dark Cloud for instance has much better frame pacing with the option disabled, whereas Half-Life (with 300% overclock as the game lags on real hardware) is better with the option enabled.

edit: not sure what was causing the dodgy framepacinf in dark cloud now, cause jow it's working perfectly when I have the option enabled?

therealteamplayer commented 3 months ago

Ok, even more strange. Dark cloud has horrendous frame pacing if I launch it after first starting the app, but if I then toggle the mailbox presentation setting, regardless of what it's set to, the frame pacing fixes its self?

therealteamplayer commented 3 months ago

This is regardless of whether or not the no-interlacing patch is enabled, btw.

therealteamplayer commented 3 months ago

Can confirm that the issue (at least with Dark Cloud) is present on 2.0.6 as well.

therealteamplayer commented 3 months ago

I'd make an issue on the mainline PCSX2 branch if i could replicate the problem on PC, but i've had no such luck...

at the very least, i've realised that turning vsync off and on again also removes the microstuttering once it occurs. And i've done a quick search in the code and narrowed the issue down i believe to pcsx2/VMManager.cpp, in the function VMManager::CheckForGSConfigChanges there's a check for whether either of VsyncEnable or DisableMailboxPresentation have changed, and if they have, it calls UpdateTargetSpeed(); and MTGS::UpdateVSyncMode();. so i'm assuming whatever these functions do fix the microstuttering. hopefully that's helpful to someone

SternXD commented 2 months ago

Hello, I apologize for the delay in responding. I’m planning to release version 2.0.8.1 later today. Once it’s available, could you please try it on that build?

therealteamplayer commented 1 month ago

Sorry for the late reply - done some testing and frame pacing seems a lot better across the board with Sync to Host Refresh Rate and Optimal Frame Pacing both turned on. The issue specific to dark cloud seems fixed. Some games I've found benefit tremendously from having Disable Mailbox Presentation on - the previous version would crash when this was set on a per-game basis but thankfully this is no longer the case.

therealteamplayer commented 1 month ago

Actually, there is still a strange issue. It seems the formula is to have Sync to Host Refresh Rate and Optimal Frame Pacing turned on, with Disable Mailbox Presentation off globally but on in the per-game settings. Why this specific combination works for most games I've tested is unknown to me, but from my limited testing it seems any other configuration doesn't have great frame pacing.

Edit: I also have CDVD Precaching set to on, Allow Exclusive Full screen set to Force Disabled, Renderer set to Automatic, and Minimal Output Latency (in audio settings) set to On.