| version 1.1, 2003/10/16 17:58:00 | version 1.6, 2004/02/03 08:24:40 | 
| 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.opnreg = 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); | S98_put(NORMAL2608, opn.opnreg, dat); | 
 | if (opn.opnreg < 0x10) { | if (opn.opnreg < 0x10) { | 
| Line 26  static void IOOUTCALL opn_o18a(UINT port | Line 26  static void IOOUTCALL opn_o18a(UINT port | 
 | if (opn.opnreg < 0x30) { | if (opn.opnreg < 0x30) { | 
 | if (opn.opnreg == 0x28) { | if (opn.opnreg == 0x28) { | 
 | if ((dat & 0x0f) < 3) { | if ((dat & 0x0f) < 3) { | 
 | sound_sync(); |  | 
 | opngen_keyon(dat & 0x0f, dat); | opngen_keyon(dat & 0x0f, dat); | 
 | } | } | 
 | } | } | 
| Line 45  static void IOOUTCALL opn_o18a(UINT port | Line 44  static void IOOUTCALL opn_o18a(UINT port | 
 | (void)port; | (void)port; | 
 | } | } | 
 |  |  | 
| static BYTE IOINPCALL opn_i188(UINT port) { | static REG8 IOINPCALL opn_i188(UINT port) { | 
 |  |  | 
 | (void)port; | (void)port; | 
| #if 1 | #if 1                                                   // ドラッケンで未定義フラグ見てる テスト終了 | 
| return(fmtimer.status | 0x7c); | return(fmtimer.status); | 
 | #else | #else | 
| return(fmtimer.status); | return(fmtimer.status | 0x7c); | 
 | #endif | #endif | 
 | } | } | 
 |  |  | 
| static BYTE IOINPCALL opn_i18a(UINT port) { | static REG8 IOINPCALL opn_i18a(UINT port) { | 
 |  |  | 
 | if (opn.opnreg == 0x0e) { | if (opn.opnreg == 0x0e) { | 
 | return(fmboard_getjoy(&psg1)); | return(fmboard_getjoy(&psg1)); | 
| Line 80  static const IOINP opn_i[4] = { | Line 79  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, "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); |