Diff for /np2/cbus/board26k.c between versions 1.1.1.1 and 1.9

version 1.1.1.1, 2003/10/16 17:58:00 version 1.9, 2005/05/13 05:47:24
Line 8 Line 8
 #include        "s98.h"  #include        "s98.h"
   
   
 static void IOOUTCALL opn_o188(UINT port, BYTE dat) {  static void IOOUTCALL opn_o188(UINT port, REG8 dat) {
   
         opn.opnreg = dat;          opn.addr = dat;
           opn.data = dat;
         (void)port;          (void)port;
 }  }
   
 static void IOOUTCALL opn_o18a(UINT port, BYTE dat) {  static void IOOUTCALL opn_o18a(UINT port, REG8 dat) {
   
         S98_put(NORMAL2608, opn.opnreg, dat);          UINT    addr;
         if (opn.opnreg < 0x10) {  
                 if (opn.opnreg != 0x0e) {          opn.data = dat;
                         psggen_setreg(&psg1, opn.opnreg, dat);          addr = opn.addr;
           S98_put(NORMAL2608, addr, dat);
           if (addr < 0x10) {
                   if (addr != 0x0e) {
                           psggen_setreg(&psg1, addr, dat);
                 }                  }
         }          }
         else {          else if (addr < 0x100) {
                 if (opn.opnreg < 0x30) {                  if (addr < 0x30) {
                         if (opn.opnreg == 0x28) {                          if (addr == 0x28) {
                                 if ((dat & 0x0f) < 3) {                                  if ((dat & 0x0f) < 3) {
                                         sound_sync();  
                                         opngen_keyon(dat & 0x0f, dat);                                          opngen_keyon(dat & 0x0f, dat);
                                 }                                  }
                         }                          }
                         else {                          else {
                                 fmtimer_setreg(opn.opnreg, dat);                                  fmtimer_setreg(addr, dat);
                                 if (opn.opnreg == 0x27) {                                  if (addr == 0x27) {
                                         opnch[2].extop = dat & 0xc0;                                          opnch[2].extop = dat & 0xc0;
                                 }                                  }
                         }                          }
                 }                  }
                 else if (opn.opnreg < 0xc0) {                  else if (addr < 0xc0) {
                         opngen_setreg(0, opn.opnreg, dat);                          opngen_setreg(0, addr, dat);
                 }                  }
                 opn.reg[opn.opnreg] = dat;                  opn.reg[addr] = dat;
         }          }
         (void)port;          (void)port;
 }  }
   
 static BYTE IOINPCALL opn_i188(UINT port) {  static REG8 IOINPCALL opn_i188(UINT port) {
   
         (void)port;          (void)port;
 #if 1          return(fmtimer.status);
                 return(fmtimer.status | 0x7c);  
 #else  
                 return(fmtimer.status);  
 #endif  
 }  }
   
 static BYTE IOINPCALL opn_i18a(UINT port) {  static REG8 IOINPCALL opn_i18a(UINT port) {
   
           UINT    addr;
   
         if (opn.opnreg == 0x0e) {          addr = opn.addr;
           if (addr == 0x0e) {
                 return(fmboard_getjoy(&psg1));                  return(fmboard_getjoy(&psg1));
         }          }
         if (opn.opnreg < 0x10) {          else if (addr < 0x10) {
                 return(psggen_getreg(&psg1, opn.opnreg));                  return(psggen_getreg(&psg1, addr));
         }          }
         (void)port;          (void)port;
         return(0xff);          return(opn.data);
 }  }
   
   
Line 80  static const IOINP opn_i[4] = { Line 83  static const IOINP opn_i[4] = {
 void board26k_reset(void) {  void board26k_reset(void) {
   
         opngen_setcfg(3, 0);          opngen_setcfg(3, 0);
         fmtimer_reset((BYTE)(np2cfg.snd26opt & 0xc0));          fmtimer_reset(np2cfg.snd26opt & 0xc0);
         soundrom_loadex((BYTE)(np2cfg.snd26opt & 7), "26");          soundrom_loadex(np2cfg.snd26opt & 7, OEMTEXT("26"));
         opn.base = (np2cfg.snd26opt & 0x10)?0x000:0x100;          opn.base = (np2cfg.snd26opt & 0x10)?0x000:0x100;
 }  }
   
 void board26k_bind(void) {  void board26k_bind(void) {
   
           fmboard_fmrestore(0, 0);
           psggen_restore(&psg1);
         sound_streamregist(&opngen, (SOUNDCB)opngen_getpcm);          sound_streamregist(&opngen, (SOUNDCB)opngen_getpcm);
         sound_streamregist(&psg1, (SOUNDCB)psggen_getpcm);          sound_streamregist(&psg1, (SOUNDCB)psggen_getpcm);
         cbuscore_attachsndex(0x188 - opn.base, opn_o, opn_i);          cbuscore_attachsndex(0x188 - opn.base, opn_o, opn_i);

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


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