aaronsgiles / ymfm

BSD-licensed Yamaha FM sound cores (OPM, OPN, OPL, and others)
BSD 3-Clause "New" or "Revised" License
259 stars 40 forks source link

ym2612: Odd edge case #39

Closed carmiker closed 2 years ago

carmiker commented 2 years ago

I'm writing a Mega Drive emulator and discovered that in the intro phase of Venom . Spider-Man - Separation Anxiety (USA, Europe), there is a jarringly loud sound. I can't seem to figure out where to start looking for the source of the problem, but maybe the author of the code will know immediately upon hearing it.

I've made recordings using YMFM and Nuked-OPN2 (for reference), the sounds in question are near the end of the recordings. I've not tested this myself in MAME but I have been told the issue exists there also.

https://anonfiles.com/v2Bco4y0y1/ymfm_ogg https://anonfiles.com/xbBfo5ydy1/nuked_ogg

aaronsgiles commented 2 years ago

Thanks for the report. Is there any chance you can create or find a .vgm file for the problematic piece?

Nevermind, found one. Are you 100% sure that ymfm is wrong here? Those hits sound legit to me, even if they are missing in nuked. Would be good to have a 3rd reference (ideally hardware) to be sure.

carmiker commented 2 years ago

@aaronsgiles I am 100% sure ymfm is wrong here. I have tested on original hardware (VA3 NTSC-U Sega Genesis).

Here is a video captured on real hardware: https://www.youtube.com/watch?v=0NWbqqgXod4

aaronsgiles commented 2 years ago

Thanks! I managed to track down the problem, a very subtle case where the LFO is disabled chip-wide, but they are engaging the AM modulation, which was just giving extra attenuation to the sounds.

carmiker commented 2 years ago

Thanks for taking care of this so quickly!

aaronsgiles commented 2 years ago

You got me at a good time -- I have been fixing up edge case bugs this past week. :)