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

rsx: Fix second VBlank, add setting to control its frequency #12060

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

elad335
Copy link
Contributor

@elad335 elad335 commented May 22, 2022

There are 2 vblank signals, the first is meant to update at the rate of video output.
The second is a software interrupt usually fixated at 59.94hz, most commonly used to convert logic meant for 59.94hz displays to the real display such as 59.94hz encoded videoes, gameplay logic etc. On real ps3 this had a meaningful use with displays that only output at odd rates such as 50hz for example.
I have added a setting to control it in config.yml

  • Bugfixes include a fix to its enabling, it no longer conflicts with the first VBlank configuration.
  • Implemented fixed 59.94hz mode for both signal types (as if VBlank NTSC fixup is enabled if configured by the game application).
  • Fix Second VBlank timestamps by not overriding it in the first VBLank signal.
  • Another bugfix is enabling by default VSYNC in PS3 Native frame limiter mode.
  • Fix second VBLank time to respect Clocks Scaling.

To users: added a setting to control its frequency in config.yml called "Second Vblank Rate". If 0 (default), it synchronizes with the first VBlank rate, otherwise the value set controls it.
It may help override games' frame cap that is dependent on the first VBlank rate, but their game logic is dependent on the second.

@elad335 elad335 marked this pull request as ready for review May 22, 2022 08:28
@elad335 elad335 force-pushed the second-vblank branch 5 times, most recently from eee8099 to aa98800 Compare May 22, 2022 09:40
@Darkhost1999
Copy link
Contributor

  • Master
    image
    RPCS3.log.gz
  • PR
    image
    F {PPU[0x1000003] Thread (_gcm_intr_thread) [0x004d5ccc]} VM: Access violation reading location 0x155a6b7 (unmapped memory)
    RPCS3.log.gz

@elad335 elad335 marked this pull request as draft May 22, 2022 15:40
@Megamouse Megamouse added the RSX label May 22, 2022
@jokoputera
Copy link

hi, quick question, does this mean, we dont use Game Patches anymore to get 60 fps?

@Darkhost1999
Copy link
Contributor

hi, quick question, does this mean, we dont use Game Patches anymore to get 60 fps?

Honestly that's why I tested NFS Mosted wanted which lead me to the fatal error. Lol
I wanted to see if I could get past 30 because I just tested last night and vblank had no effect.
Truth is I doubt that it does but would be really cool if you can just unlock every single game. Although I feel bad for everyone who worked really hard making those patches if it does unlock fps.

@Darkhost1999
Copy link
Contributor

Darkhost1999 commented May 23, 2022

Harry Potter and the Order of the Phoenix [BLUS30045]
F {PPU[0x1000002] Thread (_gcm_intr_thread) [0x0054e420]} VM: Access violation writing location 0x131e8258 (unmapped memory)
RPCS3.log.gz
All my games work except the ones where vblank does not work to increase fps.
Interesting thing about this game is vblank works until ingame on master.
While currently on PR the game isn't even intro.

Figured the "except the ones where vblank does not work to increase fps" statement may help.
Essentially making the question "Does this mean we don't use Game Patches anymore to get 60 fps?" impossible to answer yet as all games where vblank already increases fps work.

@TorutheRedFox
Copy link

hi, quick question, does this mean, we dont use Game Patches anymore to get 60 fps?

Honestly that's why I tested NFS Mosted wanted which lead me to the fatal error. Lol I wanted to see if I could get past 30 because I just tested last night and vblank had no effect. Truth is I doubt that it does but would be really cool if you can just unlock every single game. Although I feel bad for everyone who worked really hard making those patches if it does unlock fps.

unfortunately not possible as some games, such as LittleBigPlanet can't run at a higher framerate than 30 due to not using deltatime

@Ordinary205
Copy link
Contributor

I understand that this PR would obviously break other games, but is it fine if this build gets updated again? I would like to test this PR for NFS The Run to see if theres any or no differences when using vblank.

@Crafty-The-Fox
Copy link

I understand that this PR would obviously break other games, but is it fine if this build gets updated again? I would like to test this PR for NFS The Run to see if theres any or no differences when using vblank.

Did you have the binaries for the old version downloaded? I cant find the old ones and the newest build didnt build properly.

@Ordinary205
Copy link
Contributor

Ordinary205 commented Dec 1, 2023

I understand that this PR would obviously break other games, but is it fine if this build gets updated again? I would like to test this PR for NFS The Run to see if theres any or no differences when using vblank.

Did you have the binaries for the old version downloaded? I cant find the old ones and the newest build didnt build properly.

I dont have the old version for this PR downloaded, and even if I did, then it would be very outdated to test it. Due to tons of updates/bugfixes that has been merged from this emulator.

@Crafty-The-Fox
Copy link

I understand that this PR would obviously break other games, but is it fine if this build gets updated again? I would like to test this PR for NFS The Run to see if theres any or no differences when using vblank.

Did you have the binaries for the old version downloaded? I cant find the old ones and the newest build didnt build properly.

I dont have the old version for this PR downloaded, and even if I did, then it would very outdated to test it. Due to tons of updates/bugfixes that has been merged from this emulator.

The game that i want to test has a really old regression anyways.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants