Save some RAM (first step, more to come)

release-0.1
Frank Bösing 8 years ago
parent 00654c5814
commit a40e411a82
  1. 4
      reSID/envelope.cc
  2. 4
      reSID/envelope.h
  3. 4
      reSID/filter.cc
  4. 6
      reSID/filter.h

@ -98,7 +98,7 @@ void EnvelopeGenerator::reset()
// The described method is thus sufficient for exact calculation of the rate
// periods.
//
reg16 EnvelopeGenerator::rate_counter_period[] = {
const reg16 EnvelopeGenerator::rate_counter_period[] = {
9, // 2ms*1.0MHz/256 = 7.81
32, // 8ms*1.0MHz/256 = 31.25
63, // 16ms*1.0MHz/256 = 62.50
@ -155,7 +155,7 @@ reg16 EnvelopeGenerator::rate_counter_period[] = {
// envelope counter are compared to the 4-bit sustain value.
// This has been verified by sampling ENV3.
//
reg8 EnvelopeGenerator::sustain_level[] = {
const reg8 EnvelopeGenerator::sustain_level[] = {
0x00,
0x11,
0x22,

@ -71,10 +71,10 @@ protected:
// Lookup table to convert from attack, decay, or release value to rate
// counter period.
static reg16 rate_counter_period[];
static const reg16 rate_counter_period[];
// The 16 selectable sustain levels.
static reg8 sustain_level[];
static const reg8 sustain_level[];
friend class SID;
};

@ -44,7 +44,7 @@ RESID_NAMESPACE_START
// NB! Cutoff frequency characteristics may vary, we have modeled two
// particular Commodore 64s.
fc_point Filter::f0_points_6581[] =
const fc_point Filter::f0_points_6581[] =
{
// FC f FCHI FCLO
// ----------------------------
@ -81,7 +81,7 @@ fc_point Filter::f0_points_6581[] =
{ 2047, 18000 } // 0xff 0x07 - repeated end point
};
fc_point Filter::f0_points_8580[] =
const fc_point Filter::f0_points_8580[] =
{
// FC f FCHI FCLO
// ----------------------------

@ -193,9 +193,9 @@ protected:
sound_sample f0_6581[2048];
sound_sample f0_8580[2048];
sound_sample* f0;
static fc_point f0_points_6581[];
static fc_point f0_points_8580[];
fc_point* f0_points;
const static fc_point f0_points_6581[];
const static fc_point f0_points_8580[];
const fc_point* f0_points;
int f0_count;
friend class SID;

Loading…
Cancel
Save