SPC: FIR filter confusion

Discussion of hardware and software development for Super NES and Super Famicom. See the SNESdev wiki for more information.

Moderator: Moderators

Forum rules
  • For making cartridges of your Super NES games, see Reproduction.
Post Reply
User avatar
Disch
Posts: 1848
Joined: Wed Nov 10, 2004 6:47 pm

SPC: FIR filter confusion

Post by Disch »

I'm a little unclear on exactly when the FIR filter applies to echo playback. I thought that whatever is written to the echo ring buffer is after the filter has been applied, but now I'm thinking I'm wrong about that ... Anomie's doc could be a little more clear.

Here is my understanding of how everything works. Please let me know if I have things wrong or if I'm doing them right:

Code: Select all

echo ring buffer --> FIR in

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

         FIR out --> *EVOL --\
                             |
All mixed voices --> *MVOL --+---> DAC

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

         FIR out --> *EFB  --\
                             |
EON mixed voices ------------+---> echo ring buffer
Thanks
User avatar
blargg
Posts: 3715
Joined: Mon Sep 27, 2004 8:33 am
Location: Central Texas, USA
Contact:

Post by blargg »

Your diagram looks right. The echo ring buffer in RAM feeds a pair of samples to the 8-sample-pair FIR history buffer, then each FIR coefficient is combined with the corresponding pair in the history buffer, generating a pair of filtered echo samples which are mixed into output and also fed back to the ring buffer in RAM (along with voices selected by EON).
User avatar
Disch
Posts: 1848
Joined: Wed Nov 10, 2004 6:47 pm

Post by Disch »

Excellent. Thanks a bunch.
Post Reply