Re: [hatari-devel] Sound lowpass filtering?

[ Thread Index | Date Index | More lists.tuxfamily.org/hatari-devel Archives ]


There are more mailing lists here:
http://hatari.tuxfamily.org/archive/berlios-ml-devel/
-------------
Line 576 in hatari/src/sound.c explains:

 * The output of the YM2149 is modelled well as pullup resistors.
 * Thus, the three sound pins are seen as three parallel
 * computer-controlled, adjustable pull-up resistors.
 * To emulate the output of the YM2149, one must determine the
 * resistance values of the YM2149 relative to the 1k resistor,
 * which is done by the 'math model'.
-----------------
C10 is in parallel with the 1K resistor R8.
Note that a different resistance pulls up than which pulls down.

R8 (in AC parallel with) YM2149 pulls up.
R8 pulls down.

Thus there is a different waveshape for pull-up vs pull-down.
Note this model doesn't change the pull-up filter coefficients for
the many different pull-up resistances. Instead it simply accounts
for 1000 ohm pull-down, and a single lower resistance pull-up..

Note that you should use an oscilloscope across R8 to see the
correct waveforms.

On Sat, Sep 2, 2023 at 2:19 AM Brad Smith <rainwarrior@xxxxxxxxx> wrote:
> See line 407++ and 560++ in hatari/src/sound.c for source code and comments.
> See the log for this file, and the developers mailing list around the dates noted in the log
> for conversations among many people contributing to the topic.

Please understand that I have read all of the comments in sound.c already, multiple times, before asking for further explanation. I am earnestly trying to understand how this was arrived at, and I have been unable to piece it together. The question I am asking is not answered by the comments left in the file.

The filter was added on December 21, 2011.

The mailing list archives from before that date do not really have extensive discussion of this as you suggest.
https://listengine.tuxfamily.org/lists.tuxfamily.org/hatari-devel/2011/12/threads.html

I found two posts where you stated the following:
> The YM2149 is filtered at 7.7 KHz when it charges capacitor C10,
> and filtered at 2.1 KHz when R8 discharges C10. This is exactly
> what happens on a real ST.

I do understand that this is what the filter code does. My question is not what, but why. Why does that circuit behave in the way you describe? What mechanism of the circuit creates one filter while rising, and another while falling? I've never seen sound code that does this anywhere else. Is it unique, or is it an established technique that I could read more about?

I'm asking because I've tried to figure it out and I can't. I've read the code. I've read the comments. I've read the schematics. I've attempted to duplicate the effect in a circuit simulator. I've attempted and failed to find any hardware recording that matches this model. I'm trying as hard as I can to verify the truth of what you've offered, but I'm not able to, and I'm asking for your help to explain it.

Do you have anything to say about the sound recordings? Do you have any sound recordings that could demonstrate? The three separate hardware recordings given in this thread have already shown three machines that do not have the characteristic sound of that filter model. I am perfectly willing to believe there could be STs that really sound like your model, but I can't find the evidence for it.

I am not trying to dismiss what you've asserted. I'm trying to understand it, and I'm trying to verify the truth of it. If you can lead me to the evidence, I will do my best to confirm it. If it can't be confirmed, I have to advocate rejecting it.

-- Brad Smith



Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/