acm-cfw / acm-cfw.github.io

ACM custom firmware documentation
https://acm-cfw.github.io
MIT License
59 stars 3 forks source link

Fix for the V-sync and stuttering problem for Egret II Mini #45

Open tomakorea opened 1 year ago

tomakorea commented 1 year ago

Hi, after noticing severe screen tearing and scrolling stuttering on emulators I found a fix to keep everything smooth. Unfortunately, theses options are OFF/FALSE by default and it's not possible to activate it in Batocera.. without a fix, it's necessary to bring the retroarch menu and activate the options manually everytime you launch a new game since the configuration file isn't saved.

The fix is to activate theses 2 options by default in retroarch : Configuration -> Video -> Synchronisation -> Hard GPU Sync = YES Configuration -> Video -> Synchronisation -> Sync to Exact Content Framerate = YES

It seems like the screen in the Egret II mini is a variable refresh rate. Activating the 2 options fix not only the tearing, but also the frame pacing. When activating only Hard GPU Sync, there are still problems, so both options are mandatory.

To fix that :

Access the RetroArch Configuration File in SHARE Parition /userdata/system/.config/retroarch/retroarch.cfg.

Edit the RetroArch Configuration File: Use a text editor to open the retroarch.cfg file. You should see a lot of configuration options in this file. Search for the settings you want to change:

    For "Hard GPU Sync", look for a setting named video_hard_sync = "false" and change it to video_hard_sync = "true".

    For "Sync to Exact Content Framerate" I'm investigating which option name is it on the config file.

I will update my comment when I found everything.

tomakorea commented 1 year ago

My Bad ! Actually the config file is on the SHARE partition. No need to bother the dev !

The settings to change in the retroarch config file : video_hard_sync = "true"

However, I don't find the "sync to exact content framerate" option in the config file.. I'll investigate more

Note that it's a fix for the in-game video, the Batocera Emulation Station interface has still issues with Vsync/Screen tearing and Frame Pacing. But I think games are the most important for now

sorry for the confusion !

acmeplus commented 1 year ago

No worries. Note that you can also override retroarch variables via batocera.conf. Just set global.retroarch.variable=value.

tomakorea commented 1 year ago

Thanks :) I finally found everything ! Hard GPU Sync is mandatory and the only way is to edit the config file as I detailed above. For Variable Refresh Rate it was hidden in batocera itself, just go to Main Menu -> Game Settings -> Latency Reduction -> Variable Refresh Rate : ON

It solves 99% of the tearing and scrolling issues. I noticed sometimes a slight stutter during diagonal scrolling, so maybe when the screen is moving horizontal + vertical it may stutter a bit, but honestly, the experience now is so much better than before, it's mostly fine. Now I have to find a way to adjust the intensity and scale of the scanlines because the shader Zfast that does scanlines doesn't scale nicely with the 1024x768 screen of the Egret II.

skodkassen commented 1 year ago

This hack is dead, isn't it? No more work will ever be done, right?

sonicteam77 commented 5 months ago

@tomakorea ,THANKS,I made the modifications as you said, and the picture synchronization is indeed improved a lot than before, but there is still stuttering problem when running the game in all emulators. The picture would glitch every few seconds, and the game audio is same problem