Skip to content

Commit

Permalink
scale down filtered voices on 6581, patch by Leandro Nini
Browse files Browse the repository at this point in the history
git-svn-id: https://svn.code.sf.net/p/vice-emu/code/trunk@45331 379a1393-f5fb-40a0-bcee-ef074d9b53f7
  • Loading branch information
mrdudz committed Sep 5, 2024
1 parent efdd4f3 commit 0021f6d
Show file tree
Hide file tree
Showing 2 changed files with 136 additions and 117 deletions.
6 changes: 6 additions & 0 deletions vice/src/resid/filter8580new.cc
Original file line number Diff line number Diff line change
Expand Up @@ -280,6 +280,12 @@ Filter::Filter()
double N31 = norm*((1u << 31) - 1);
mf.vo_N16 = N16;

// In the 6581 the mixer input resistors for the filter lines
// are slightly bigger than the voice ones
// Scale the values accordingly
const double scaleFactor = m==0 ? 0.93 : 1.0;
mf.filterGain = static_cast<int>(scaleFactor * (1 << 12));

// The "zero" output level of the voices.
// The digital range of one voice is 20 bits; create a scaling term
// for multiplication which fits in 11 bits.
Expand Down
Loading

0 comments on commit 0021f6d

Please sign in to comment.