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: Add variables in CMailHandler to savestate. #10784
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not tested yet, but this seems correct.
I think I originally had these, but then when I converted m_pending_mails into a std::deque and switched to p.Do(m_pending_mails);, I lost them from a merge conflict. Or maybe I just never had them; I have been forgetting about savestates lately (#10768 originally was missing them, but it has them now).
The hang was probably related to #10732, as there's an initialization step that lasts for 130ish timebase units (I'm not sure how long that is in seconds, but it's pretty short), during which the DSP is halted, and actually it's halted for longer than that (10230 timebase units) while it does some DMAs. If a savestate is loaded during that period, m_halted would be true when it should be false, and things would be hung.
|
Seems to work. |
|
Can confirm. To reproduce the issue, first boot Super Mario Sunshine normally and create a save state on the title screen. Then, check Options → Boot to Pause (you may need the debugging UI enabled), and launch Super Mario Sunshine again. Advance one frame (for me, this is bound to With this PR, that no longer happens. Also, I was wrong about the time period. If you look at my test case, you can see that when Then, after 6 more frame advances (1/10th of a second, which is definitely possible for a human to accidentally run into when loading a state), this is logged:
|
|
Huh, I couldn't seem to reproduve this on Zelda Ucode games. But nice to know it happens on Zelda Ucode as well. EDIT: Woops I didn't realize that while testing Mario Kart Double Dash was a Zelda Ucode title |
…-state DSPHLE: Add variables in CMailHandler to savestate.
Should fix #10761 (comment) but I haven't actually verified it. They should definitely be stored in the state either way though.