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: Handle mail more accurately #10761

Merged
merged 6 commits into from Jun 24, 2022
Merged

Conversation

Pokechu22
Copy link
Contributor

Split from #10732. This (specifically the halted change) fixes booting Datel titles with DSP HLE (issue 12943).

@delroth
Copy link
Member

delroth commented Jun 22, 2022

Could you resolve merge conflicts? Otherwise LGTM.

It's cleared whenever the uCode changes, so there's no reason to clear it in a destructor or during initialization.

I've also renamed it to ClearPending.
Most of these were made unnecessary by the previous commit.
This is an accuracy improvement, though I don't think it matters for anything in practice.
This fixes booting Datel titles with DSPHLE (see https://bugs.dolphin-emu.org/issues/12943). Datel messed up their DSP initialization code, so it only works by receiving a mail later on, but if halting isn't implemented then it receives the mail too early and hangs.
@JMC47 JMC47 merged commit 76f890f into dolphin-emu:master Jun 24, 2022
11 checks passed
@Adamillo
Copy link

Adamillo commented Jun 25, 2022

I found a regression with this PR. It seems that if you load a state (doesn't matter where you save a state) instantly after the game boots the game will crash. This happens in every game. And this not only happens with Wii games but it also happens with Game Cube games as well. The timing to load the state to cause a crash is pretty hard to achieve with some games like Mario Kart Double Dash and Kirby's Epic Yarn. Some games like Epic Mickey have a pretty easy timing to achieve the crash.
How to reproduce the crash: Boot up the game. Make a save state anywhere. Close the game. Reload the game but instantly load the state after you just booted it up and voilla, a crash

@AdmiralCurtiss
Copy link
Contributor

Ah yeah, m_last_mail and m_halted are not stored to the savestate. Pretty obvious in retrospect.

@AdmiralCurtiss
Copy link
Contributor

@Adamillo Can you check if #10784 fixes it?

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