bbbradsmith / nsfplay

Nintendo NES sound file NSF music player
https://bbbradsmith.github.io/nsfplay/
277 stars 42 forks source link

Buzzing when using MMC5? #37

Closed BleuBleu closed 4 years ago

BleuBleu commented 4 years ago

Hi Brad.

Mat from FamiStudio here.

I'm adding MMC5 support and NSFPlay seems to be the only one creating a loud buzz when playing my NSF. I validated with Mesen and NotSoFatso and both play very clearly. Not sure if its my fault of not. Has anyone reported such issue in the past?

Thanks.

MMC5_Bug.zip

-Mat

bbbradsmith commented 4 years ago

Those players do not implement all of the MMC5's audio capabilities, specifically the PCM channel and its automatic "read" mode.

The quick fix is to write 0 to $5010, not 1.

When you put it into read mode it will automatically send samples to the PCM channel any time there is an access to the $8000-$BFFF area (including running code from there).

https://wiki.nesdev.com/w/index.php/MMC5_audio

bbbradsmith commented 4 years ago

By the way, if you want to test the MMC5 PCM features available in various emulators, here's an NSF for that.

mmc5_pcm.zip

If you want to file a bug with other emulators that are missing support for the MMC5 feature needed for track 1 or 2, you might refer them to this test ROM.

BleuBleu commented 4 years ago

Ha Thanks man.

Sorry I wasted your time. I'll go annoy Sour over at Mesen!

I'll make sure to favor nsfplay in my future testing for the extra accuracy.

-Mat