Diff for /np2/statsave.c between versions 1.13 and 1.14

version 1.13, 2003/10/25 09:08:24 version 1.14, 2003/10/29 10:09:37
Line 752  static int flagsave_fm(NP2FFILE f, const Line 752  static int flagsave_fm(NP2FFILE f, const
         return(ret);          return(ret);
 }  }
   
 static void play_fmreg(BYTE num) {  static void play_fmreg(BYTE num, UINT reg) {
   
         UINT    chbase;          UINT    chbase;
         UINT    reg;  
         UINT    i;          UINT    i;
   
         chbase = num * 3;          chbase = num * 3;
         reg = num * 0x100;  
         for (i=0x30; i<0xa0; i++) {          for (i=0x30; i<0xa0; i++) {
                 opngen_setreg((BYTE)chbase, (BYTE)i, opn.reg[reg + i]);                  opngen_setreg((BYTE)chbase, (BYTE)i, opn.reg[reg + i]);
         }          }
Line 785  static int flagload_fm(NP2FFILE f, const Line 783  static int flagload_fm(NP2FFILE f, const
         int             ret;          int             ret;
         UINT    saveflg;          UINT    saveflg;
         OPNKEY  opnkey;          OPNKEY  opnkey;
           UINT    fmreg1a;
           UINT    fmreg1b;
           UINT    fmreg2a;
           UINT    fmreg2b;
   
         opngen_reset();          opngen_reset();
         psggen_reset(&psg1);          psggen_reset(&psg1);
Line 798  static int flagload_fm(NP2FFILE f, const Line 800  static int flagload_fm(NP2FFILE f, const
         ret = flagload_load(f, &usesound, sizeof(usesound));          ret = flagload_load(f, &usesound, sizeof(usesound));
         fmboard_reset((BYTE)usesound);          fmboard_reset((BYTE)usesound);
   
           fmreg1a = 0x000;
           fmreg1b = 0x100;
           fmreg2a = 0x200;
           fmreg2b = 0x300;
         switch(usesound) {          switch(usesound) {
                 case 0x01:                  case 0x01:
                         saveflg = FLAG_MG;                          saveflg = FLAG_MG;
Line 815  static int flagload_fm(NP2FFILE f, const Line 821  static int flagload_fm(NP2FFILE f, const
                 case 0x06:                  case 0x06:
                         saveflg = FLAG_FM1A | FLAG_FM1B | FLAG_FM2A | FLAG_PSG1 |                          saveflg = FLAG_FM1A | FLAG_FM1B | FLAG_FM2A | FLAG_PSG1 |
                                                                                 FLAG_PSG2 | FLAG_RHYTHM | FLAG_PCM86;                                                                                  FLAG_PSG2 | FLAG_RHYTHM | FLAG_PCM86;
                           fmreg1a = 0x200;        // 逆転してるのん…
                           fmreg1b = 0x000;
                           fmreg2a = 0x100;
                         break;                          break;
   
                 case 0x08:                  case 0x08:
Line 886  static int flagload_fm(NP2FFILE f, const Line 895  static int flagload_fm(NP2FFILE f, const
         }          }
   
         if (saveflg & FLAG_FM1A) {          if (saveflg & FLAG_FM1A) {
                 play_fmreg(0);                  play_fmreg(0, fmreg1a);
         }          }
         if (saveflg & FLAG_FM1B) {          if (saveflg & FLAG_FM1B) {
                 play_fmreg(1);                  play_fmreg(1, fmreg1b);
         }          }
         if (saveflg & FLAG_FM2A) {          if (saveflg & FLAG_FM2A) {
                 play_fmreg(2);                  play_fmreg(2, fmreg2a);
         }          }
         if (saveflg & FLAG_FM2B) {          if (saveflg & FLAG_FM2B) {
                 play_fmreg(3);                  play_fmreg(3, fmreg2b);
         }          }
         if (saveflg & FLAG_PSG1) {          if (saveflg & FLAG_PSG1) {
                 play_psgreg(&psg1);                  play_psgreg(&psg1);

Removed from v.1.13  
changed lines
  Added in v.1.14


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