Skip to content
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

Adjustments for the reSID 1.0 new filter #45

Open
WilfredC64 opened this issue Feb 6, 2022 · 6 comments
Open

Adjustments for the reSID 1.0 new filter #45

WilfredC64 opened this issue Feb 6, 2022 · 6 comments
Assignees

Comments

@WilfredC64
Copy link

I did some measures with reSID 1.0, in particular the new filter in filter8580new.cc.
I found out that the filter model for 6581 needs one adjustment regarding the DC level to boost the digi output a bit.
I've measured this with real 6581 SID chips and it was clear that real 6581 SIDs have a bit louder digi playback in proportion with the voice output.
DC level value 5.0 needs to be changed to value 5.35.

This can be tested by e.g. songs of Chris Hülsbeck that play voices and digis together.

I also did measurements for the 8580 filter. There the overall volume is too low. Especially when you compare it with the 6581 output.
Just play a song that doesn't use any filter, e.g.:

/MUSICIANS/H/Hubbard_Rob/Commando.sid

and play it as 6581 and then as 8580.

I've measured output levels of the same song on a real 6581 and 8580 and how it is configured now is wrong.

To fix this, the first value of the 8580 filter needs to change from 0.2 to 0.5. This will increase the volume a lot and some heavy filtered tunes might clip because of this.
Therefore transistor parameter value 9.09 needs to be increased to value 13.0.

The new values can be tested with tunes like:

/MUSICIANS/L/Linus/64_Forever.sid
/MUSICIANS/J/Jammer/Yet_Bigger_Beat_2SID.sid

The current DC level of the 8580 is set to 4.80. This is needed to make digi playback without using the 3 voices on a 8580 audible but very soft.
However, the current value is problematic for the following tune:

/MUSICIANS/P/Psych858o/90_Seconds.sid

Notice that you will hear a tone at the beginning which shouldn't be there. On a real 8580 the tone is not there.

The problem can be fixed to change value 4.80 to 4.84. This value still gives the right low volume output of digi playback via $D418.
I've tested this on sound cards at 44.1KHz and on 48KHz and the tone is not audible anymore with the new value 4.84.

The last change I would suggest is to change the second transistor parameter value 0.80. This needs to change to value 1.0 to make the filter sound the same as a real 8580.
I've tested this with tune:
/MUSICIANS/P/Psych858o/90_Seconds.sid at 0:07 for the bass sound.

For the complete change in file filter8580new.cc:

static model_filter_init_t model_filter_init[2] = {
  {
    opamp_voltage_6581,
    sizeof(opamp_voltage_6581)/sizeof(*opamp_voltage_6581),
    // The dynamic analog range of one voice is approximately 1.5V,
    1.5,
    // riding at a DC level of approximately 5.0V.
    5.35,
    // Capacitor value.
    470e-12,
    // Transistor parameters.
    12.18,
    1.31,
    26.0e-3,
    1.0,
    20e-6,
    9.0/1.0,
    1.0/115,
    // DAC parameters.
    6.65,
    2.63,
    2.20,
    false
  },
  {
    opamp_voltage_8580,
    sizeof(opamp_voltage_8580)/sizeof(*opamp_voltage_8580),
    0.5,
    // The 4.75V voltage for the virtual ground is generated by a PolySi resistor divider
    4.84,
    // Capacitor value.
    22e-9,
    // Transistor parameters.
    13.0,
    1.0,
    26.0e-3,
    1.0,   // Unused, leave at 1
    100e-6,
    // FIXME: 6581 only
    0,
    0,
    0,
    0,
    2.00,
    true
  }
@drfiemost drfiemost self-assigned this Feb 7, 2022
@drfiemost
Copy link
Member

For anyone looking at this the discussion is going on at https://sourceforge.net/p/vice-emu/bugs/1696/

@drfiemost
Copy link
Member

Been looking again at the issue and I think the problem lies in the opamp model which is tailored on the 6581 and doesn't consider the subthreshold mode.

@reFX-Mike
Copy link

I've tried these values, and all the 8580 tunes I've tried sound very close to the current values. If this fixes some problems, then I'm all for it, as having parity with how VICE sounds is a good thing IMO.

A lot of musicians use VICE with 8580 settings nowadays for convenience so having their tunes sound identical in libsidplayfp can only be a good thing.

A lot of users also use VICE for convenience and the demos they watch then also use the 8580 settings from VICE.

Let's copy them :D

reFX-Mike added a commit to reFX/libSidplayEZ that referenced this issue Dec 23, 2023
@drfiemost
Copy link
Member

VICE uses the same parameters as residfp, I keep them in sync with the latest improvements.

@reFX-Mike
Copy link

So, for 6581 and 8580, are the current defaults the same values VICE uses? Essentially, they use resid (not residfp), but is the filter implementation the same?

@drfiemost
Copy link
Member

Yes, the implementation is more or less the same with just some minor differences.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants