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

[RFC] SI: Base SI sampling on VSync & horiz lines #3457

Merged
merged 1 commit into from Jan 6, 2016

Conversation

booto
Copy link
Contributor

@booto booto commented Jan 6, 2016

The rate at which SI is polled is specified in terms of horizontal video lines (see SIPOLL at 0xCC006430). While dolphin tries to use this to calculate the interval between SI samplings, no attention is paid to sampling in the correct phase wrt vsync. This needs testing, and changes behaviour of movies and netplay - I'm not sure why they were special cased... see the removed function in SI.cpp "GetTicksToNextSIPoll".

This seems to address https://bugs.dolphin-emu.org/issues/960

@@ -158,6 +161,7 @@ void Preset(bool _bNTSC)

s_ticks_last_line_start = 0;
s_half_line_count = 1;
s_half_line_of_next_si_poll = (7 * 2) - 1; // first results at start of 7th line

This comment was marked as off-topic.

@booto booto force-pushed the si-sampling branch 2 times, most recently from 7bca858 to 9a2a46e Compare January 6, 2016 15:46
@JMC47
Copy link
Contributor

JMC47 commented Jan 6, 2016

Fixes https://bugs.dolphin-emu.org/issues/960

Question: Would this only affect GC stuff, or would it affect Wiimotes too?

@delroth
Copy link
Member

delroth commented Jan 6, 2016

This is probably going to desync all the TASes, but oh well, worth it if it's more accurate.

I'm not a big fan of calling SI from VI but OTOH it makes sense here.

If Netplay still works with this, LGTM.

@RisingFog
Copy link
Member

On the TAS point of view, we expect TASes to desync on newer versions of Dolphin, which is fine.

@JMC47
Copy link
Contributor

JMC47 commented Jan 6, 2016

@delroth: Tested a full netplay session, no desyncs. Movie recording can be fixed later if it's broken!

Sonicadvance1 added a commit that referenced this pull request Jan 6, 2016
[RFC] SI: Base SI sampling on VSync & horiz lines
@Sonicadvance1 Sonicadvance1 merged commit adffa5f into dolphin-emu:master Jan 6, 2016
@dolphin-emu-bot
Copy link
Contributor

FifoCI detected that this change impacts graphical rendering. Here are the behavior differences detected by the system:

  • medabots-crash on ogl-lin-nouveau: diff
  • monkeyball-fuse on ogl-lin-radeon: diff
  • sf-assault-flashing on ogl-lin-radeon: diff
  • sms-bubbles on ogl-lin-radeon: diff
  • sw3-dt on ogl-lin-radeon: diff

automated-fifoci-reporter

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