It is currently Wed May 22, 2013 6:22 pm

All times are UTC




Post new topic Reply to topic  [ 5 posts ] 
Author Message
PostPosted: Tue Apr 24, 2012 3:52 am 
Offline
Snes9x White Belt

Joined: Tue Apr 24, 2012 2:06 am
Posts: 3
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


Top
 Profile  
 
PostPosted: Fri Apr 27, 2012 11:49 pm 
Offline
Official GTK/Linux Porter/Dev
User avatar

Joined: Tue Oct 02, 2007 12:50 am
Posts: 395
It's actually in the form of a table in the source:
https://github.com/snes9xgit/snes9x/blob/master/apu/bapu/dsp/SPC_DSP.cpp#L93
It's much more difficult to edit in this form, so I'm not sure if that's going to help much. :-)


Top
 Profile  
 
PostPosted: Fri Apr 27, 2012 11:53 pm 
Offline
Official GTK/Linux Porter/Dev
User avatar

Joined: Tue Oct 02, 2007 12:50 am
Posts: 395
Whoops, I thought you meant the gaussian filter. Echo is at
https://github.com/snes9xgit/snes9x/blob/master/apu/bapu/dsp/SPC_DSP.cpp#L593

Slightly easier.


Top
 Profile  
 
PostPosted: Sat Apr 28, 2012 12:11 am 
Offline
Snes9x White Belt

Joined: Tue Apr 24, 2012 2:06 am
Posts: 3
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 ?


Top
 Profile  
 
PostPosted: Sat Apr 28, 2012 1:26 am 
Offline
Snes9x White Belt

Joined: Tue Apr 24, 2012 2:06 am
Posts: 3
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);
}


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 5 posts ] 

All times are UTC


Who is online

Users browsing this forum: Google [Bot] and 3 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group