--- np2/cbus/board26k.c 2003/11/21 06:51:10 1.3 +++ np2/cbus/board26k.c 2005/02/09 20:11:33 1.7 @@ -8,13 +8,13 @@ #include "s98.h" -static void IOOUTCALL opn_o188(UINT port, BYTE dat) { +static void IOOUTCALL opn_o188(UINT port, REG8 dat) { opn.opnreg = dat; (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); if (opn.opnreg < 0x10) { @@ -26,7 +26,6 @@ static void IOOUTCALL opn_o18a(UINT port if (opn.opnreg < 0x30) { if (opn.opnreg == 0x28) { if ((dat & 0x0f) < 3) { - sound_sync(); opngen_keyon(dat & 0x0f, dat); } } @@ -45,7 +44,7 @@ static void IOOUTCALL opn_o18a(UINT port (void)port; } -static BYTE IOINPCALL opn_i188(UINT port) { +static REG8 IOINPCALL opn_i188(UINT port) { (void)port; #if 1 // ドラッケンで未定義フラグ見てる テスト終了 @@ -55,7 +54,7 @@ static BYTE IOINPCALL opn_i188(UINT port #endif } -static BYTE IOINPCALL opn_i18a(UINT port) { +static REG8 IOINPCALL opn_i18a(UINT port) { if (opn.opnreg == 0x0e) { return(fmboard_getjoy(&psg1)); @@ -80,13 +79,15 @@ static const IOINP opn_i[4] = { void board26k_reset(void) { opngen_setcfg(3, 0); - fmtimer_reset((BYTE)(np2cfg.snd26opt & 0xc0)); - soundrom_loadex((BYTE)(np2cfg.snd26opt & 7), "26"); + fmtimer_reset(np2cfg.snd26opt & 0xc0); + soundrom_loadex(np2cfg.snd26opt & 7, OEMTEXT("26")); opn.base = (np2cfg.snd26opt & 0x10)?0x000:0x100; } void board26k_bind(void) { + fmboard_fmrestore(0, 0); + psggen_restore(&psg1); sound_streamregist(&opngen, (SOUNDCB)opngen_getpcm); sound_streamregist(&psg1, (SOUNDCB)psggen_getpcm); cbuscore_attachsndex(0x188 - opn.base, opn_o, opn_i);