--- np2/cbus/board86.c 2004/02/03 08:24:40 1.3 +++ np2/cbus/board86.c 2005/05/12 17:24:05 1.6 @@ -85,14 +85,21 @@ static REG8 IOINPCALL opna_i188(UINT por static REG8 IOINPCALL opna_i18a(UINT port) { + (void)port; if (opn.opnreg == 0x0e) { return(fmboard_getjoy(&psg1)); } else if (opn.opnreg < 0x10) { return(psggen_getreg(&psg1, opn.opnreg)); } - (void)port; +#if 1 + else if (opn.opnreg == 0xff) { + return(1); + } + return(opn.opnreg); +#else return(opn.reg[opn.opnreg]); +#endif } static REG8 IOINPCALL opna_i18c(UINT port) { @@ -144,7 +151,7 @@ void board86_reset(void) { ((np2cfg.snd86opt & 0x8) << 3)); opngen_setcfg(3, OPN_STEREO | 0x038); if (np2cfg.snd86opt & 2) { - soundrom_load(0xcc000, "86"); + soundrom_load(0xcc000, OEMTEXT("86")); } opn.base = (np2cfg.snd86opt & 0x01)?0x000:0x100; fmboard_extreg(extendchannel); @@ -158,7 +165,7 @@ void board86_bind(void) { fmboard_rhyrestore(&rhythm, 0); sound_streamregist(&opngen, (SOUNDCB)opngen_getpcm); sound_streamregist(&psg1, (SOUNDCB)psggen_getpcm); - sound_streamregist(&rhythm, (SOUNDCB)rhythm_getpcm); + rhythm_bind(&rhythm); pcm86io_bind(); cbuscore_attachsndex(0x188 + opn.base, opna_o, opna_i); } @@ -218,7 +225,7 @@ void board86c_bind(void) { fmboard_rhyrestore(&rhythm, 0); sound_streamregist(&opngen, (SOUNDCB)opngen_getpcm); sound_streamregist(&psg1, (SOUNDCB)psggen_getpcm); - sound_streamregist(&rhythm, (SOUNDCB)rhythm_getpcm); + rhythm_bind(&rhythm); sound_streamregist(&adpcm, (SOUNDCB)adpcm_getpcm); pcm86io_bind(); cbuscore_attachsndex(0x188 + opn.base, opnac_o, opnac_i);