Main Page | Class Hierarchy | Compound List | File List | Compound Members | File Members | Related Pages

SID.cpp File Reference

#include "sysdeps.h"
#include <math.h>
#include "SID.h"
#include "Prefs.h"
#include "C64.h"
#include "VIC.h"
#include <mda/common/audio.h>
#include <mdaaudiooutputstream.h>
#include "FixPoint.i"
#include "sid_epoc32.i"

Include dependency graph for SID.cpp:

Include dependency graph

Go to the source code of this file.

Compounds

class  DigitalRenderer
struct  DRVoice

Defines

#define USE_FIXPOINT_MATHS
#define FIXPOINT_PREC   16
#define PRECOMPUTE_RESONANCE
#define ldSINTAB   9
#define CALC_RESONANCE_LP(f)
#define CALC_RESONANCE_HP(f)

Enumerations

enum  {
  WAVE_NONE, WAVE_TRI, WAVE_SAW, WAVE_TRISAW,
  WAVE_RECT, WAVE_TRIRECT, WAVE_SAWRECT, WAVE_TRISAWRECT,
  WAVE_NOISE
}
enum  { EG_IDLE, EG_ATTACK, EG_DECAY, EG_RELEASE }
enum  {
  FILT_NONE, FILT_LP, FILT_BP, FILT_LPBP,
  FILT_HP, FILT_NOTCH, FILT_HPBP, FILT_ALL
}

Variables

const uint32 SAMPLE_FREQ = 8000
const uint32 SID_FREQ = 985248
const uint32 CALC_FREQ = 50
const uint32 SID_CYCLES = SID_FREQ/SAMPLE_FREQ
const int SAMPLE_BUF_SIZE = 0x138*2


Define Documentation

#define CALC_RESONANCE_HP  ) 
 

Value:

(366.374\
                                - 14.0052 * f\
                                + 0.603212 * f * f\
                                - 0.000880196 * f * f * f)

Definition at line 101 of file SID.cpp.

Referenced by DigitalRenderer::calc_filter(), and DigitalRenderer::DigitalRenderer().

#define CALC_RESONANCE_LP  ) 
 

Value:

(227.755\
                                - 1.7635 * f\
                                - 0.0176385 * f * f\
                                + 0.00333484 * f * f * f\
                                - 9.05683E-6 * f * f * f * f)

Definition at line 95 of file SID.cpp.

Referenced by DigitalRenderer::calc_filter(), and DigitalRenderer::DigitalRenderer().

#define FIXPOINT_PREC   16
 

Definition at line 71 of file SID.cpp.

Referenced by DigitalRenderer::fixcos(), fixdiv(), fixmult(), DigitalRenderer::fixsin(), fixsqrt(), fixsquare(), intmult(), operator+(), FixPoint::operator+(), FixPoint::operator++(), FixPoint::operator+=(), operator-(), FixPoint::operator-(), FixPoint::operator--(), FixPoint::operator-=(), and FixPoint::round().

#define ldSINTAB   9
 

Definition at line 73 of file SID.cpp.

Referenced by DigitalRenderer::fixcos(), DigitalRenderer::fixsin(), and DigitalRenderer::InitFixSinTab().

#define PRECOMPUTE_RESONANCE
 

Definition at line 72 of file SID.cpp.

#define USE_FIXPOINT_MATHS
 

Definition at line 70 of file SID.cpp.


Enumeration Type Documentation

anonymous enum
 

Enumeration values:
WAVE_NONE 
WAVE_TRI 
WAVE_SAW 
WAVE_TRISAW 
WAVE_RECT 
WAVE_TRIRECT 
WAVE_SAWRECT 
WAVE_TRISAWRECT 
WAVE_NOISE 

Definition at line 291 of file SID.cpp.

anonymous enum
 

Enumeration values:
EG_IDLE 
EG_ATTACK 
EG_DECAY 
EG_RELEASE 

Definition at line 304 of file SID.cpp.

anonymous enum
 

Enumeration values:
FILT_NONE 
FILT_LP 
FILT_BP 
FILT_LPBP 
FILT_HP 
FILT_NOTCH 
FILT_HPBP 
FILT_ALL 

Definition at line 312 of file SID.cpp.


Variable Documentation

const uint32 CALC_FREQ = 50
 

Definition at line 286 of file SID.cpp.

const int SAMPLE_BUF_SIZE = 0x138*2
 

Definition at line 288 of file SID.cpp.

Referenced by DigitalRenderer::calc_buffer(), DigitalRenderer::EmulateLine(), and DigitalRenderer::Reset().

const uint32 SAMPLE_FREQ = 8000
 

Renderer for digital SID emulation (SIDTYPE_DIGITAL)

Definition at line 279 of file SID.cpp.

Referenced by DigitalRenderer::calc_buffer(), DigitalRenderer::calc_filter(), DigitalRenderer::DigitalRenderer(), DigitalRenderer::init_sound(), and DigitalRenderer::WriteRegister().

const uint32 SID_CYCLES = SID_FREQ/SAMPLE_FREQ
 

Definition at line 287 of file SID.cpp.

const uint32 SID_FREQ = 985248
 

Definition at line 285 of file SID.cpp.

Referenced by DigitalRenderer::DigitalRenderer(), and DigitalRenderer::WriteRegister().


Generated on Tue Feb 8 04:10:53 2005 for E32frodo by doxygen 1.3.3