*** scsp2.c	Fri Jun 24 23:32:31 2011
--- scsp2.c	Wed Aug 18 14:59:00 2010
***************
*** 304,309 ****
     u32  looplen_shifted;// (lea - lsa + 1) << SCSP_FREQ_LOW_BITS
  
     u32  env_phase;      // Current envelope phase (attack/decay/...)
     s32  env_counter;    // Envelope counter
     s32  env_step;       // Envelope counter increment for current phase
     s32  env_target;     // Envelope target value for advancing to next phase
--- 304,310 ----
     u32  looplen_shifted;// (lea - lsa + 1) << SCSP_FREQ_LOW_BITS
  
     u32  env_phase;      // Current envelope phase (attack/decay/...)
+ #ifndef NOGEKKO
     s32  env_counter;    // Envelope counter
     s32  env_step;       // Envelope counter increment for current phase
     s32  env_target;     // Envelope target value for advancing to next phase
***************
*** 311,324 ****
     s32  env_step_d;     // Envelope counter increment for decay phase
     s32  env_step_s;     // Envelope counter increment for sustain phase
     s32  env_step_r;     // Envelope counter increment for release phase
-    u8   krs_shift;      // Shift count corresponding to KRS
     s32  sl_target;      // Compare value corresponding to SL
     s32  tl_mult;        // Envelope volume multiplier corresponding to TL
  
     u32  lfo_counter;    // LFO counter (fixed point index into LFO waveforms)
     s32  lfo_step;       // LFO counter increment, or -1 if in reset mode
     s32  *lfo_fm_wave;   // LFO frequency modulation waveform pointer
     s32  *lfo_am_wave;   // LFO amplitude modulation waveform pointer
     s8   lfo_fm_shift;   // LFO frequency modulation strength, -1 if disabled
     s8   lfo_am_shift;   // LFO amplitude modulation strength, -1 if disabled
  
--- 312,341 ----
     s32  env_step_d;     // Envelope counter increment for decay phase
     s32  env_step_s;     // Envelope counter increment for sustain phase
     s32  env_step_r;     // Envelope counter increment for release phase
     s32  sl_target;      // Compare value corresponding to SL
     s32  tl_mult;        // Envelope volume multiplier corresponding to TL
+ #else
+    u32  env_counter;    // Envelope counter
+    u32  env_step;       // Envelope counter increment for current phase
+    u32  env_target;     // Envelope target value for advancing to next phase
+    u32  env_step_a;     // Envelope counter increment for attack phase
+    u32  env_step_d;     // Envelope counter increment for decay phase
+    u32  env_step_s;     // Envelope counter increment for sustain phase
+    u32  env_step_r;     // Envelope counter increment for release phase
+    u32  sl_target;      // Compare value corresponding to SL
+    u32  tl_mult;        // Envelope volume multiplier corresponding to TL
+ #endif
+    u8   krs_shift;      // Shift count corresponding to KRS
  
     u32  lfo_counter;    // LFO counter (fixed point index into LFO waveforms)
     s32  lfo_step;       // LFO counter increment, or -1 if in reset mode
+ #ifndef NOGEKKO
     s32  *lfo_fm_wave;   // LFO frequency modulation waveform pointer
     s32  *lfo_am_wave;   // LFO amplitude modulation waveform pointer
+ #else
+    u32  *lfo_fm_wave;   // LFO frequency modulation waveform pointer
+    u32  *lfo_am_wave;   // LFO amplitude modulation waveform pointer
+ #endif
     s8   lfo_fm_shift;   // LFO frequency modulation strength, -1 if disabled
     s8   lfo_am_shift;   // LFO amplitude modulation strength, -1 if disabled
  
***************
*** 447,457 ****
  static s32 scsp_env_table[SCSP_ENV_LEN*2];
  
  // LFO waveforms for amplitude modulation
  static s32 scsp_lfo_wave_amp[4][SCSP_LFO_LEN];
  // LFO waveforms for frequency modulation
  static s32 scsp_lfo_wave_freq[4][SCSP_LFO_LEN];
  // LFO counter step values for each LFOF index
  static s32 scsp_lfo_step[32];
  
  // Envelope increments for each attack/decay rate (AR, DR, etc.)
  static s32 scsp_attack_rate[62+16];
--- 464,486 ----
  static s32 scsp_env_table[SCSP_ENV_LEN*2];
  
  // LFO waveforms for amplitude modulation
+ #ifndef NOGEKKO
  static s32 scsp_lfo_wave_amp[4][SCSP_LFO_LEN];
+ #else
+ static u32 scsp_lfo_wave_amp[4][SCSP_LFO_LEN];
+ #endif
  // LFO waveforms for frequency modulation
+ #ifndef NOGEKKO
  static s32 scsp_lfo_wave_freq[4][SCSP_LFO_LEN];
+ #else
+ static u32 scsp_lfo_wave_freq[4][SCSP_LFO_LEN];
+ #endif
  // LFO counter step values for each LFOF index
+ #ifndef NOGEKKO
  static s32 scsp_lfo_step[32];
+ #else
+ static u32 scsp_lfo_step[32];
+ #endif
  
  // Envelope increments for each attack/decay rate (AR, DR, etc.)
  static s32 scsp_attack_rate[62+16];
