Closed InfoManiac742 closed 1 month ago
More general bug:
Reproduces in 2.8. Tested on Castlevania Harmony of Dissonance
1) Play a game 2) Save a state 3) Open the Hex Editor 4) Start changing values around until you crash your game. 5) Load the savestate
You'll find that sometimes, the music remains corrupted (half the instruments missing, sounds distorted, etc). Loading a second time often clears the issue.
You'll find that sometimes, the music remains corrupted (half the instruments missing, sounds distorted, etc). Loading a second time often clears the issue.
I'm aware of an mGBA core audio bug on that seems to mute certain channels when loading a state immediately after restarting the core, but I can't reproduce it on 2.9 anymore. I can consistently reproduce it on 2.6.2-2.8 by loading Mega Man Battle Network (USA) SHA1:A4FBAE389654A6611D0597B1E9109CBBD32A132F
, making a state during the Capcom logo, turning on "Autload last Slot" and rebooting the core.
The previous comment doesn't mention any specific timing for when to load the states, so I don't know for sure if loading the state right after the core reboots just makes it more likely to happen, or if this is a different issue.
I can try testing the newest version once I get around to it, but I find that Castlevania: Harmony of Dissonance is the game where this is the most noticeable, since the music ~is terrible~ primarily uses the Game Boy sound channels.
Edit: AppVeyor is giving me an error, and I'm too lazy to build BizHawk from source.
It seems to work perfectly on HoD at least, which is a good sign that this is probably fixed on 2.9.
And never mind I spoke too soon: it looks like there's still some weirdness going on, even though the channels aren't muted.
Here are two examples of audio from Harmony of Dissonance: one is normal, the other is immediately after loading a savestate. https://user-images.githubusercontent.com/26778801/214214523-d4a91a56-9ca7-4210-a830-ed94e5cea761.mp4 https://user-images.githubusercontent.com/26778801/214214553-48bda8c6-2a9c-4bdc-a8b2-ec9da2a8cbf2.mp4
Is this still present in 2.9 RC3?
I couldn't find the RC3 tag on Gitlab (I'm not very familiar with all of this), but the audio still glitches out for a short time on 10423abdf (mGBA: https://github.com/TASEmulators/mgba/tree/26ea5311797656a87ebfcabd55fe295a15e55535), which is the latest build I could find on GitLab.
Just as a clarification, there are/were two similar but slightly different problems with GBA audio and savestates:
Additionally, from my testing, it seems like the only channels that are affected by this are the four original Game Boy channels (Square, Wave, and Noise) and not the two new Direct Sound channels.
@InfoManiac742 Can you confirm the second bug is still present in a recent dev build?
Issue appears to be fixed in latest dev as well as the 2.9 and 2.9.1 release versions.
Summary
Occasionally, loading savestates can glitch out the audio, causing high-pitched beeps and similar sounds. This appears to happen across many different GBA games, but it's very finicky to reproduce. The core is mGBA (the only GBA core for BizHawk).
Repro
As mentioned before, this is a very finicky bug to reproduce, but I found a way to reproduce it semi-consistently in Pokémon Emerald (SHA1:F3AE088181BF583E55DAF962A92BB46F4F1D07B7, although I don't think the version matters). Note that this has happened to me before in a lot of other scenarios and in other games - Pokémon Emerald is just the game I happen to be playing right now.
Host env.
gba_audio_glitch.zip