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

Use correct GetTicksPerSecond() value in IPC delays #3083

Merged
merged 1 commit into from Oct 4, 2015

Conversation

JosJuice
Copy link
Member

The constant IPC_DEFAULT_DELAY used a value from GetTicksPerSecond(), which in turn uses a value from CPU_CORE_CLOCK... but CPU_CORE_CLOCK isn't actually a constant! It's first initialized to 486 MHz and then changed to 729 MHz in SystemTimers::PreInit if emulating a Wii. This means that the IPC delays always used 486 MHz and thus were wrong. To fix this, the IPC reply constants are changed to functions.

The constant IPC_DEFAULT_DELAY used a value from GetTicksPerSecond(),
which in turn uses a value from CPU_CORE_CLOCK... but CPU_CORE_CLOCK
isn't actually a constant! It's first initialized to 486 MHz and then
changed to 729 MHz in SystemTimers::PreInit if emulating a Wii. This
means that the IPC delays always used 486 MHz and thus were wrong.
To fix this, the IPC reply constants are changed to functions.
@dolphin-emu-bot
Copy link
Contributor

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

  • mkdd-efb on ogl-lin-nv: diff
  • smg2-fog on ogl-lin-nv: diff
  • thps4-shadow on ogl-lin-nv: diff

automated-fifoci-reporter

@waddlesplash
Copy link
Contributor

LGTM.

shuffle2 added a commit that referenced this pull request Oct 4, 2015
Use correct GetTicksPerSecond() value in IPC delays
@shuffle2 shuffle2 merged commit 8bb35c8 into dolphin-emu:master Oct 4, 2015
@JosJuice JosJuice deleted the ipc-ticks branch October 4, 2015 07:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
4 participants