| version 1.4, 2003/12/04 13:54:28 | version 1.8, 2005/05/12 17:24:05 | 
| 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 44  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                                                   // ドラッケンで未定義フラグ見てる テスト終了 | 
| Line 54  static BYTE IOINPCALL opn_i188(UINT port | Line 54  static BYTE IOINPCALL opn_i188(UINT port | 
 | #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 63  static BYTE IOINPCALL opn_i18a(UINT port | Line 63  static BYTE IOINPCALL opn_i18a(UINT port | 
 | return(psggen_getreg(&psg1, opn.opnreg)); | return(psggen_getreg(&psg1, opn.opnreg)); | 
 | } | } | 
 | (void)port; | (void)port; | 
 |  | #if 1 | 
 |  | return(opn.opnreg); | 
 |  | #else | 
 | return(0xff); | return(0xff); | 
 |  | #endif | 
 | } | } | 
 |  |  | 
 |  |  | 
| Line 79  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); |