New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
DAC_8BIT_R2R sounds horrible #3603
Comments
"Sounds terrible" is not a useful error report. Show how it's producing inaccurate output levels. |
By ear, it sounds to me like gaps or bogus data at the start of each stream_update. Recently there was an update to MAME's sound core (emu/sound.cpp) dealing with stream updates. Is one of those the regression point?
edit yup, that's when it regressed |
this sounds like it could be quite a serious issue then given that the DAC devices are used all over the place, and this is a core change? anything else obviously broken? |
According to OG who did some testing yesterday, junglek was "generating negative numbers of samples and scribbling all over memory in the process". |
if (update_sampindex <= m_output_sampindex) https://git.redump.net/mame/commit/src/emu/sound.cpp?id=4f13ab7d12a8b336977e89cd8b7196ed33e11f2f When i removed the lines the yell in Jungle King sound good again. |
I have been aware of the taitosj.cpp systems DAC audio bugs for years. Glad that someone is paying attention :) Jungle King/Hunts monkey/ape noise and falling in the bushes death sound, and rocks are distorted.I wasn't sure if it was because those samples use signed/unsigned or a different bit number. |
Part of the problem is taitosj (and grchamp, and halleys, all of which share the same sound circuit/board with some very minor variations in the mixing and filter section) uses a very complex circuit for the DAC, using two ports from an ay-3-8910, and it depends extensively on the amount of current the ay-3-8910 can source or sink for each pin, to behave properly. This requires extensive hardware testing against a real ay-3-8910 chip to figure out (possibly from several chips and average the results together, to compensate for process variation), and to behave properly in MAME, it probably requires a netlist implementation of the DAC circuit. IIRC the way the volume control 8-bit port for the DAC works is the DAC output is run through a lowpass or bandpass filter, and the volume port controls the cutoff/center frequency of a SECOND bandpass filter which the output of the first dac filter runs through, so the volume is lowered when the bandpass pass band is 'misaligned' with the dac filter's passband. This also causes a significant change to the 'tone' of the sound as well. |
The DAC_8BIT_R2R (devices\sound\dac.cpp/h) sounds horrible.
Best example is the Tarzan yell in Jungle King.
Listen to this wav:
http://www.mameworld.info/mameinfo/download/MAME-0197-0198.wav
The text was updated successfully, but these errors were encountered: