Hello,
Anyone have the FIR Filter equation in the SPC700 DSP echo block ?
I am interest to know how setting the FIR coefficients will affect the echo feedback.
Thanks
SPC-700 APU DSP FIR filter
Re: SPC-700 APU DSP FIR filter
It's actually in the form of a table in the source:
https://github.com/snes9xgit/snes9x/blo ... SP.cpp#L93
It's much more difficult to edit in this form, so I'm not sure if that's going to help much.
https://github.com/snes9xgit/snes9x/blo ... SP.cpp#L93
It's much more difficult to edit in this form, so I'm not sure if that's going to help much.

Re: SPC-700 APU DSP FIR filter
Whoops, I thought you meant the gaussian filter. Echo is at
https://github.com/snes9xgit/snes9x/blo ... P.cpp#L593
Slightly easier.
https://github.com/snes9xgit/snes9x/blo ... P.cpp#L593
Slightly easier.
Re: SPC-700 APU DSP FIR filter
Thanks BearOso
that is of great help, I am reading them
In this
https://github.com/snes9xgit/snes9x/blo ... P.cpp#L593
at line 385
inline VOICE_CLOCK( V1 )
{
m.t_dir_addr = m.t_dir * 0x100 + m.t_srcn * 4;
m.t_srcn = VREG(v->regs,srcn);
}
should the two statements be reversed in order ?
The m.t_srcn be evaluated to reflect the current VREG,
otherwise m.t_dir_addr will be of an earlier value ?

In this
https://github.com/snes9xgit/snes9x/blo ... P.cpp#L593
at line 385
inline VOICE_CLOCK( V1 )
{
m.t_dir_addr = m.t_dir * 0x100 + m.t_srcn * 4;
m.t_srcn = VREG(v->regs,srcn);
}
should the two statements be reversed in order ?
The m.t_srcn be evaluated to reflect the current VREG,
otherwise m.t_dir_addr will be of an earlier value ?
Re: SPC-700 APU DSP FIR filter
In this subroutine
https://github.com/snes9xgit/snes9x/blo ... P.cpp#L593
// Gaussian interpolation
{
int output = interpolate( v );
// Noise
if ( m.t_non & v->vbit )
output = (int16_t) (m.noise * 2);
// Apply envelope
m.t_output = (output * v->env) >> 11 & ~1;
v->t_envx_out = (uint8_t) (v->env >> 4);
}
*****************************************
Can we "logic shortcut" it so execution can be faster without evaluating interpolate in some cases and drop it during the noise ?
that is, there is no "side-effect" in interpolate that must be run each time ?
// Gaussian interpolation
{
int output;
// Noise or interpolate
if ( m.t_non & v->vbit ) output = (int16_t) (m.noise * 2);
else output = interpolate(v);
// Apply envelope
m.t_output = (output * v->env) >> 11 & ~1;
v->t_envx_out = (uint8_t) (v->env >> 4);
}
https://github.com/snes9xgit/snes9x/blo ... P.cpp#L593
// Gaussian interpolation
{
int output = interpolate( v );
// Noise
if ( m.t_non & v->vbit )
output = (int16_t) (m.noise * 2);
// Apply envelope
m.t_output = (output * v->env) >> 11 & ~1;
v->t_envx_out = (uint8_t) (v->env >> 4);
}
*****************************************
Can we "logic shortcut" it so execution can be faster without evaluating interpolate in some cases and drop it during the noise ?
that is, there is no "side-effect" in interpolate that must be run each time ?
// Gaussian interpolation
{
int output;
// Noise or interpolate
if ( m.t_non & v->vbit ) output = (int16_t) (m.noise * 2);
else output = interpolate(v);
// Apply envelope
m.t_output = (output * v->env) >> 11 & ~1;
v->t_envx_out = (uint8_t) (v->env >> 4);
}