2011-04-24 01:14:00 +00:00
|
|
|
//#ifndef SCSPDSP_H
|
|
|
|
#define SCSPDSP_H
|
|
|
|
|
|
|
|
//#define DYNDSP
|
|
|
|
#define DYNOPT 1 //set to 1 to enable optimization of recompiler
|
|
|
|
|
|
|
|
|
|
|
|
//the DSP Context
|
|
|
|
struct _SCSPDSP
|
|
|
|
{
|
|
|
|
//Config
|
2011-09-05 06:53:26 +00:00
|
|
|
UINT16 *SCSPRAM;
|
2011-04-24 01:14:00 +00:00
|
|
|
unsigned int RBP; //Ring buf pointer
|
|
|
|
unsigned int RBL; //Delay ram (Ring buffer) size in words
|
|
|
|
|
|
|
|
//context
|
|
|
|
|
2011-09-05 06:53:26 +00:00
|
|
|
INT16 COEF[64]; //16 bit signed
|
|
|
|
UINT16 MADRS[32]; //offsets (in words), 16 bit
|
|
|
|
UINT16 MPRO[128*4]; //128 steps 64 bit
|
|
|
|
INT32 TEMP[128]; //TEMP regs,24 bit signed
|
|
|
|
INT32 MEMS[32]; //MEMS regs,24 bit signed
|
2011-04-24 01:14:00 +00:00
|
|
|
unsigned int DEC;
|
|
|
|
|
|
|
|
//input
|
2011-09-05 06:53:26 +00:00
|
|
|
INT32 MIXS[16]; //MIXS, 24 bit signed
|
|
|
|
INT16 EXTS[2]; //External inputs (CDDA) 16 bit signed
|
2011-04-24 01:14:00 +00:00
|
|
|
|
|
|
|
//output
|
2011-09-05 06:53:26 +00:00
|
|
|
INT16 EFREG[16]; //EFREG, 16 bit signed
|
2011-04-24 01:14:00 +00:00
|
|
|
|
|
|
|
bool Stopped;
|
|
|
|
int LastStep;
|
|
|
|
#ifdef DYNDSP
|
2011-09-05 06:53:26 +00:00
|
|
|
INT32 ACC; //26 bit
|
|
|
|
INT32 SHIFTED; //24 bit
|
|
|
|
INT32 X; //24 bit
|
|
|
|
INT32 Y; //13 bit
|
|
|
|
INT32 B; //26 bit
|
|
|
|
INT32 INPUTS; //24 bit
|
|
|
|
INT32 MEMVAL;
|
|
|
|
INT32 FRC_REG; //13 bit
|
|
|
|
INT32 Y_REG; //24 bit
|
|
|
|
UINT32 ADDR;
|
|
|
|
UINT32 ADRS_REG; //13 bit
|
2011-04-24 01:14:00 +00:00
|
|
|
|
|
|
|
void (*DoSteps)();
|
|
|
|
#endif
|
|
|
|
};
|
|
|
|
|
|
|
|
void SCSPDSP_Init(_SCSPDSP *DSP);
|
2011-09-05 06:53:26 +00:00
|
|
|
void SCSPDSP_SetSample(_SCSPDSP *DSP,INT32 sample,int SEL,int MXL);
|
2011-04-24 01:14:00 +00:00
|
|
|
void SCSPDSP_Step(_SCSPDSP *DSP);
|
|
|
|
void SCSPDSP_Start(_SCSPDSP *DSP);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//#endif
|