Emulator Issues #12281
closedMissing MaxPlay menu music
0%
Description
Game Name?
MaxPlay
Game ID?
GNHE5d
MD5 Hash?
8a68e9917d7648674cdb51844a4df3eb (this is the US version that is labeled as Wii compatible (though MIOS now blocks it); I haven't tested the PAL release)
What's the problem? Describe what went wrong.
MaxPlay is missing music on the main menu. Sound effects in the actual games work, though.
What steps will reproduce the problem?
After configuring everything such that Datel games load (IPL enabled, DSP LLE, and dual core), simply start the game (ignoring any pop-up warning messages) and observe a lack of sound.
Is the issue present in the latest development version?
Yes, 5.0-12703.
Is the issue present in the latest stable version?
Yes, 5.0.
What are your PC specifications?
- CPU: AMD A6-340M APU with Radeon(tm) Graphics, 1500 Mhz, 4 Core(s), 4 Logical Processor(s)
- GPU: AMD Radeon HD 6520G
- OS: Windows 10 Pro (Insider preview) 10.0.19042.541
Is there anything else that can help developers narrow down the issue?
The following is logged:
21:09:420 Common\MsgHandler.cpp:115 E[MASTER]: Question: FIFO is overflowed by GatherPipe !
CPU thread is too fast!
21:09:473 Core\HW\MMIO.cpp:197 E[MI]: Trying to write 32 bits to an invalid MMIO (addr=0c001000, val=0000001f)
21:09:695 Core\HW\DVD\DVDInterface.cpp:1115 I[DVD]: DVDLowStopMotor
21:10:916 Core\HW\DSP.cpp:362 I[AI]: Audio DMA configured: 731 blocks from 0x802ba7e0
21:22:457 Core\HW\DVD\DVDInterface.cpp:1115 I[DVD]: DVDLowStopMotor
21:22:457 Core\HW\ProcessorInterface.cpp:121 I[PI]: Wrote PI_RESET_CODE: 00000003
21:22:463 Core\HW\ProcessorInterface.cpp:121 I[PI]: Wrote PI_RESET_CODE: 00000007
21:22:463 Core\HW\DVD\DVDInterface.cpp:855 I[DVD]: Read DiscID: buffer 802b99e0
21:22:478 Core\HW\DVD\DVDInterface.cpp:1248 I[DVD]: DTK enabled: buffer size 10
21:22:480 Core\HW\DVD\DVDInterface.cpp:843 I[DVD]: Read: DVDOffset=09900000, DMABuffer = 808777e0, SrcLength = 00100000, DMALength = 00100000
21:23:211 Core\HW\DSP.cpp:362 I[AI]: Audio DMA configured: 103 blocks from 0x802ba7e0
21:25:931 Core\HW\DSP.cpp:362 I[AI]: Audio DMA configured: 731 blocks from 0x802ba7e0
The Audio DMA messages seem relevant; the 731 block one occurs when going into the menu and the 103 block one occurs ingame.
Here's a video of what it should be like: https://youtu.be/-JygxTJX1Uc (my capture setup is a bit jank and there seems to be a bit of audio distortion that I couldn't hear when using my TV, but this should be enough to confirm if it's fixed)
Updated by pokechu22 over 2 years ago
I think there might also be missing sound effects in Action Replay Max (v1.14). When navigating the menus, I do hear a click sound, and "Core\HW\DSP.cpp:392 I[AI]: Audio DMA configured: 80 blocks from 0x015894a0" is logged. However, selecting "Action Replay Codes" in the menu logs "Core\HW\DSP.cpp:392 I[AI]: Audio DMA configured: 823 blocks from 0x0158a0a0" without any sound, and pressing B on that screen logs "Core\HW\DSP.cpp:392 I[AI]: Audio DMA configured: 1828 blocks from 0x0158a0a0". I found a video of a (probably older) version, and there is an additional sound when opening the menu at least.
Also, since I reported this issue, the message has changed slightly; it's now logging a physical address (starting with 0x0) instead of a virtual one (starting with 0x8). I'm not sure why that's happened. Here's the new one from MaxPlay: "Core\HW\DSP.cpp:392 I[AI]: Audio DMA configured: 731 blocks from 0x002ba7e0"
One other thing to note is that the relevant sound is present in memory at the logged address; this can be confirmed by dumping MRAM and then importing the dump into Audacity as signed 16-bit PCM, big endian, 1 channel, with the offset set based on the logged value in converted to decimal (e.g. 0x015894a0 becomes 22582432, and 0x002ba7e0 becomes 2861024) and the sample rate set to 32000. You can at least hear something that seems relevant. Note that the stuff afterwards may be random contents of main memory, which will generally result in loud and painful sounds when played back as audio, so be careful.
I did also test out the GameCube IPL, which logs "Core\HW\DSP.cpp:392 I[AI]: Audio DMA configured: 70 blocks from 0x014e5c20". Dumping MRAM and then using offset 21912608 shows that a short bit of audio is in memory at that location, but it doesn't store the whole intro sound there at the same time. The same does apply to maxplay; as it runs, it is loading new data into 0x002ba7e0 (which clarifies something I was confused about; it did seem like the audio was longer than just the bit that can fix into that location. It just doesn't need to reconfigure the audio DMA (or the way we're logging that message means it doesn't get shown again)).
Updated by pokechu22 over 2 years ago
A discovery: the music for MaxPlay and the sound effects from AR Max is dumped properly when using Movie → Dump Audio! The AR Max sound effects seem to get played twice in a row, but otherwise they sound correct. So, the issue is happening somewhere in the mixing process (which is not applied to the dumped audio). It doesn't seem to be a volume issue either - the volume registers seem to be 256, and although volume isn't used when dumping (#12945), there's no difference in the dumped audio with PR 10735 which fixes that.
Updated by pokechu22 over 2 years ago
I've determined the cause: Datel is sending too many samples at once, so the buffer in Mixer.cpp (currently 4096 stereo samples) is too small and thus never gets populated. Here's a basic fix: https://github.com/dolphin-emu/dolphin/pull/10738
1 audio DMA block is 8 stereo samples, which is sixteen 16-bit words, or 32 bytes. So, at 32000 Hz, MaxPlay's 731 blocks is 5848 stereo samples per transfer, or 0.18275 seconds of audio per transfer, which is a lot but works out because they're not generating it on the fly from the DSP (as far as I can tell). AR Max's 1828 blocks is 14624 stereo samples, or 0.457 seconds. And, the The Wii-compatible action replay logs "Core\HW\DSP.cpp:392 I[AI]: Audio DMA configured: 2298 blocks from 0x00f19ba0". 2298 blocks is 18384 stereo samples, or 0.5745 seconds, which is enough to break the audio dumping code.
Note that even with the fix, sometimes Datel's sound effects play twice. I'm not sure why that happens.
Updated by pokechu22 about 2 years ago
- Status changed from Accepted to Fixed
- Fixed in set to 5.0-17716
Updated by pokechu22 about 2 years ago
- Related to Emulator Issues #9410: Audio Crackling in Homebrew Demo, not present on 4.0.2 added