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

DSPHLE: Minor AX fixes #9897

Merged
merged 2 commits into from Jul 14, 2021
Merged

Conversation

leoetlino
Copy link
Member

A voice is considered running if and only if running equals 1, not if running is not equal to 0.

This fixes https://bugs.dolphin-emu.org/issues/12508 because for some reason The Sims 2 - Castaway sets running to 8 when a stream finishes playing; previously our AX HLE would just loop the voice and eventually crash after accessing invalid memory addresses.

Thanks to JMC47 and delroth's help, I've verified that this is the correct check for the following ucodes:

GC:

  • 0x3ad3b7ac
  • 0x3daf59b9
  • 0x4e8a8b21
  • 0x07f88145
  • 0xe2136399
  • 0x3389a79e

Wii:

  • 0x347112ba
  • 0xfa450138
  • 0xadbc06bd

And while I was fixing the running check, I noticed that the is_stream field was also being handled incorrectly, so I've fixed that as well.


This PR also removes redundant accelerator end checks for AX Wii. The DSP accelerator already tracks whether the end has been reached and returns 0 when appropriate.

A voice is considered running if and only if `running` equals 1,
not if `running` is not equal to 0.

This fixes https://bugs.dolphin-emu.org/issues/12508 because for some
reason *The Sims 2 - Castaway* sets `running` to 8 when a stream
finishes playing; previously our AX HLE would just loop the voice
and eventually crash after accessing invalid memory addresses.

Thanks to JMC47 and delroth's help, I've verified that this is the
correct check for the following ucodes:

GC:
* 0x3ad3b7ac
* 0x3daf59b9
* 0x4e8a8b21
* 0x07f88145
* 0xe2136399
* 0x3389a79e

Wii:
* 0x347112ba
* 0xfa450138
* 0xadbc06bd

And while I was fixing the running check, I noticed that the is_stream
field was also being handled incorrectly, so I've fixed that as well.
@delroth delroth merged commit cccb1ee into dolphin-emu:master Jul 14, 2021
11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
3 participants