You are not logged in.
Wave sample handling on Windows is completely busted. It doesn't take into account either the samplerate of the input wave file or the sampling rate the game is performing. Most wave samples will be fed to the game way too slowly/quickly and not have the intended effect. I've got some sample code to try and fix this which is in the archive at the end of the post. It's not quite polished enough to submit a PR, more of a proof of concept. Various things like the savestate code would need modification and I cba. I'm also not sure if nds_arm7_timer is the value I should be using for "overall arm7 clock cycles" but I couldn't see anything else keeping track of it when looking around.
Those changes ALMOST let Bangai-O Spirits start reading level data. Almost. The game samples the mic at roughly ~32.7kHz, checking for a 1024Hz sine wave. What I've found from debugging is that DeSmuME sometimes has a massive gap in cycle times from sample to sample. Tens of thousands. This leads to entire bits of level data being skipped, breaking the whole transfer. My somewhat hacky solution is to log the first 21(arbitrarily chosen) sample cycle differences when the user presses the microphone button. It then takes the median value to discard outliers and uses that as the mic sampling frequency until the user releases the microphone button.
Here's a demonstration of that. I added in a volume slider too, because the game is quite picky about that:
https://files.catbox.moe/i3p5jv.webm
Level audio files, DeSmuME binary, source changes:
https://files.catbox.moe/fa5ofy.zip
Offline