Diff for /np2/sound/psggenc.c between versions 1.9 and 1.11

version 1.9, 2003/12/24 14:01:56 version 1.11, 2004/07/26 18:52:55
Line 7 Line 7
   
         PSGGENCFG       psggencfg;          PSGGENCFG       psggencfg;
   
 static const BYTE psggen_deftbl[0x10] =  static const UINT8 psggen_deftbl[0x10] =
                                 {0, 0, 0, 0, 0, 0, 0, 0xbf, 0, 0, 0, 0, 0, 0, 0xff, 0xff};                                  {0, 0, 0, 0, 0, 0, 0, 0xbf, 0, 0, 0, 0, 0, 0, 0xff, 0xff};
   
 static const BYTE psgenv_pat[16] = {  static const UINT8 psgenv_pat[16] = {
                                         PSGENV_ONESHOT,                                          PSGENV_ONESHOT,
                                         PSGENV_ONESHOT,                                          PSGENV_ONESHOT,
                                         PSGENV_ONESHOT,                                          PSGENV_ONESHOT,
Line 74  void psggen_reset(PSGGEN psg) { Line 74  void psggen_reset(PSGGEN psg) {
         }          }
 }  }
   
   void psggen_restore(PSGGEN psg) {
   
           REG8    i;
   
           for (i=0; i<0x0e; i++) {
                   psggen_setreg(psg, i, ((UINT8 *)&psg->reg)[i]);
           }
   }
   
 void psggen_setreg(PSGGEN psg, REG8 reg, REG8 value) {  void psggen_setreg(PSGGEN psg, REG8 reg, REG8 value) {
   
         UINT    freq;          UINT    freq;
Line 83  void psggen_setreg(PSGGEN psg, REG8 reg, Line 92  void psggen_setreg(PSGGEN psg, REG8 reg,
         if (reg < 14) {          if (reg < 14) {
                 sound_sync();                  sound_sync();
         }          }
         ((BYTE *)&psg->reg)[reg] = value;          ((UINT8 *)&psg->reg)[reg] = value;
         switch(reg) {          switch(reg) {
                 case 0:                  case 0:
                 case 1:                  case 1:
Line 121  void psggen_setreg(PSGGEN psg, REG8 reg, Line 130  void psggen_setreg(PSGGEN psg, REG8 reg,
                 case 9:                  case 9:
                 case 10:                  case 10:
                         ch = reg - 8;                          ch = reg - 8;
                         keydisp_psgvol(psg, (BYTE)ch);                          keydisp_psgvol(psg, (UINT8)ch);
                         if (value & 0x10) {                          if (value & 0x10) {
                                 psg->tone[ch].pvol = &psg->evol;                                  psg->tone[ch].pvol = &psg->evol;
                         }                          }
Line 153  void psggen_setreg(PSGGEN psg, REG8 reg, Line 162  void psggen_setreg(PSGGEN psg, REG8 reg,
   
 REG8 psggen_getreg(PSGGEN psg, REG8 reg) {  REG8 psggen_getreg(PSGGEN psg, REG8 reg) {
   
         return(((BYTE *)&psg->reg)[reg & 15]);          return(((UINT8 *)&psg->reg)[reg & 15]);
 }  }
   
 void psggen_setpan(PSGGEN psg, UINT ch, REG8 pan) {  void psggen_setpan(PSGGEN psg, UINT ch, REG8 pan) {

Removed from v.1.9  
changed lines
  Added in v.1.11


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