--- np2/cbus/boardspb.c 2003/12/08 00:55:30 1.4 +++ np2/cbus/boardspb.c 2005/02/09 20:11:33 1.7 @@ -65,7 +65,6 @@ static void IOOUTCALL spb_o18e(UINT port opngen_setreg(3, opn.extreg, dat); } else if (opn.extreg < 0x12) { - sound_sync(); adpcm_setreg(&adpcm, opn.extreg, dat); } (void)port; @@ -142,7 +141,6 @@ static void IOOUTCALL spr_o58e(UINT port opn.reg[opn.ext2reg + 0x300] = dat; if (opn.ext2reg >= 0x30) { - sound_sync(); opngen_setreg(9, opn.ext2reg, dat); } (void)port; @@ -190,15 +188,19 @@ void boardspb_reset(void) { fmtimer_reset(np2cfg.spbopt & 0xc0); opn.channels = 6; opngen_setcfg(6, OPN_STEREO | 0x03f); - soundrom_loadex(np2cfg.spbopt & 7, "SPB"); + soundrom_loadex(np2cfg.spbopt & 7, OEMTEXT("SPB")); opn.base = ((np2cfg.spbopt & 0x10)?0x000:0x100); } void boardspb_bind(void) { + fmboard_fmrestore(0, 0); + fmboard_fmrestore(3, 1); + psggen_restore(&psg1); + fmboard_rhyrestore(&rhythm, 0); sound_streamregist(&opngen, (SOUNDCB)opngen_getpcmvr); sound_streamregist(&psg1, (SOUNDCB)psggen_getpcm); - sound_streamregist(&rhythm, (SOUNDCB)rhythm_getpcm); + rhythm_bind(&rhythm); sound_streamregist(&adpcm, (SOUNDCB)adpcm_getpcm); cbuscore_attachsndex(0x188 - opn.base, spb_o, spb_i); } @@ -219,15 +221,21 @@ void boardspr_reset(void) { opn.reg[0x2ff] = 0; opn.channels = 12; opngen_setcfg(12, OPN_STEREO | 0x03f); - soundrom_loadex(np2cfg.spbopt & 7, "SPB"); + soundrom_loadex(np2cfg.spbopt & 7, OEMTEXT("SPB")); opn.base = (np2cfg.spbopt & 0x10)?0x000:0x100; } void boardspr_bind(void) { + fmboard_fmrestore(0, 0); + fmboard_fmrestore(3, 1); + fmboard_fmrestore(6, 2); + fmboard_fmrestore(9, 3); + psggen_restore(&psg1); + fmboard_rhyrestore(&rhythm, 0); sound_streamregist(&opngen, (SOUNDCB)opngen_getpcmvr); sound_streamregist(&psg1, (SOUNDCB)psggen_getpcm); - sound_streamregist(&rhythm, (SOUNDCB)rhythm_getpcm); + rhythm_bind(&rhythm); sound_streamregist(&adpcm, (SOUNDCB)adpcm_getpcm); cbuscore_attachsndex(0x188 - opn.base, spb_o, spb_i); cbuscore_attachsndex(0x588 - opn.base, spr_o, spr_i);