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

[WIP] VI: convert SI poll line count to half lines #8229

Open
wants to merge 2 commits into
base: master
from

Conversation

@booto
Copy link
Contributor

commented Jul 6, 2019

This PR is mainly to generate builds

  • multiply 'X lines between samples' value from SI by 2 as VI deals in half-lines
  • make VI use the 'sample-count-per-frame value from SI for automatic polling

Some of the safer changes were spun off to #8236

@JMC47

This comment has been minimized.

Copy link
Contributor

commented Jul 6, 2019

Sonic Heroes still works with this, which is my test case.

For some background behind this change: It appears that we were polling incorrectly causing controller inputs to be kinda weird. This may have been causing dropped R/L buttons in Mario Kart: Double Dash as well as other oddities.

@lioncash

This comment has been minimized.

Copy link
Member

commented Jul 6, 2019

Commit message should probably include context as to why the change was made

@booto booto force-pushed the booto:si_poll_lines branch from d05eb78 to 7a23ae4 Jul 8, 2019

@booto booto changed the title VI: convert SI poll line count to half lines [WIP] VI: convert SI poll line count to half lines Jul 8, 2019

@booto booto force-pushed the booto:si_poll_lines branch from 7a23ae4 to 25eecb5 Jul 8, 2019

@booto booto force-pushed the booto:si_poll_lines branch from 25eecb5 to 271774a Jul 9, 2019

@@ -69,7 +69,9 @@ static constexpr std::array<u32, 2> s_clock_freqs{{
static u64 s_ticks_last_line_start; // number of ticks when the current full scanline started
static u32 s_half_line_count; // number of halflines that have occurred for this full frame
static u32 s_half_line_of_next_si_poll; // halfline when next SI poll results should be available
static constexpr u32 num_half_lines_for_si_poll = (7 * 2) + 1; // this is how long an SI poll takes
static constexpr u32 num_half_lines_for_si_poll = (6 * 2); // this is how long an SI poll takes
static u32 s_si_poll_halfline_interval;

This comment has been minimized.

Copy link
@Techjar

Techjar Jul 9, 2019

Contributor

This variable is written, but never read.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
4 participants
You can’t perform that action at this time.