Diff for /xmil/sound/psggenc.c between versions 1.1 and 1.4

version 1.1, 2004/08/01 05:31:31 version 1.4, 2004/08/13 04:08:33
Line 2 Line 2
 #include        <math.h>  #include        <math.h>
 #include        "sound.h"  #include        "sound.h"
 #include        "sndctrl.h"  #include        "sndctrl.h"
 #include        "juliet.h"  
 #include        "x1f.h"  
   
   
 extern  int             s_cnt;  
 extern  DWORD   basedclk;  
   
   
         PSGGENCFG       psggencfg;          PSGGENCFG       psggencfg;
   
 static const UINT8 psggen_deftbl[0x10] =  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 UINT8 psgenv_pat[16] = {  static const UINT8 psgenv_pat[16] = {
Line 93  void psggen_setreg(PSGGEN psg, REG8 reg, Line 87  void psggen_setreg(PSGGEN psg, REG8 reg,
         UINT    freq;          UINT    freq;
         UINT    ch;          UINT    ch;
   
         x1f_psg(reg, value);          if (reg >= 14) {
         if (romeo_exist) {  
                 juliet2_YMF288A(reg, value, (basedclk * s_cnt / 1600));  
                 return;                  return;
         }          }
           sound_sync();
         reg &= 15;  
 //      if (reg < 14) {  
 //              sound_sync();  
 //      }  
         ((UINT8 *)&psg->reg)[reg] = value;          ((UINT8 *)&psg->reg)[reg] = value;
         switch(reg) {          switch(reg) {
                 case 0:                  case 0:
Line 134  void psggen_setreg(PSGGEN psg, REG8 reg, Line 122  void psggen_setreg(PSGGEN psg, REG8 reg,
 //                      keydisp_psgmix(psg);  //                      keydisp_psgmix(psg);
                         psg->mixer = ~value;                          psg->mixer = ~value;
                         psg->puchicount = psggencfg.puchidec;                          psg->puchicount = psggencfg.puchidec;
 //                      TRACEOUT(("psg %x 7 %d", (long)psg, value));  
                         break;                          break;
   
                 case 8:                  case 8:
Line 150  void psggen_setreg(PSGGEN psg, REG8 reg, Line 137  void psggen_setreg(PSGGEN psg, REG8 reg,
                         }                          }
                         psg->tone[ch].puchi = psggencfg.puchidec;                          psg->tone[ch].puchi = psggencfg.puchidec;
                         psg->puchicount = psggencfg.puchidec;                          psg->puchicount = psggencfg.puchidec;
 //                      TRACEOUT(("psg %x %x %d", (long)psg, reg, value));  
                         break;                          break;
   
                 case 11:                  case 11:

Removed from v.1.1  
changed lines
  Added in v.1.4


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