Diff for /np2/sound/psggenc.c between versions 1.5 and 1.8

version 1.5, 2003/11/08 21:43:01 version 1.8, 2003/12/08 00:55:33
Line 70  void psggen_reset(PSGGEN psg) { Line 70  void psggen_reset(PSGGEN psg) {
                 psg->tone[i].pvol = &psg->envvol;                  psg->tone[i].pvol = &psg->envvol;
         }          }
         for (i=0; i<sizeof(psggen_deftbl); i++) {          for (i=0; i<sizeof(psggen_deftbl); i++) {
                 psggen_setreg(psg, (BYTE)i, psggen_deftbl[i]);                  psggen_setreg(psg, (REG8)i, psggen_deftbl[i]);
         }          }
 }  }
   
 void psggen_setreg(PSGGEN psg, BYTE reg, BYTE value) {  void psggen_setreg(PSGGEN psg, REG8 reg, REG8 value) {
   
         UINT    freq;          UINT    freq;
         UINT    ch;          UINT    ch;
   
         reg &= 15;          reg &= 15;
         ((BYTE *)&psg->reg)[reg] = value;  
         if (reg < 14) {          if (reg < 14) {
                 sound_sync();                  sound_sync();
         }          }
           ((BYTE *)&psg->reg)[reg] = value;
         switch(reg) {          switch(reg) {
                 case 0:                  case 0:
                 case 1:                  case 1:
Line 151  void psggen_setreg(PSGGEN psg, BYTE reg, Line 151  void psggen_setreg(PSGGEN psg, BYTE reg,
         }          }
 }  }
   
 BYTE psggen_getreg(PSGGEN psg, BYTE reg) {  REG8 psggen_getreg(PSGGEN psg, REG8 reg) {
   
         return(((BYTE *)&psg->reg)[reg & 15]);          return(((BYTE *)&psg->reg)[reg & 15]);
 }  }
   
   void psggen_setpan(PSGGEN psg, UINT ch, REG8 pan) {
   
           if ((psg) && (ch < 3)) {
                   psg->tone[ch].pan = pan;
           }
   }
   

Removed from v.1.5  
changed lines
  Added in v.1.8


RetroPC.NET-CVS <cvs@retropc.net>