--- np2/win9x/board118.c 2004/02/18 20:11:37 1.3 +++ np2/win9x/board118.c 2005/05/12 17:26:11 1.6 @@ -45,7 +45,7 @@ static void romeo_restore(BOOL opna) { juliet_YMF288A(0x1d, opn.reg[0x1d]); } for (i=0; i<0x0e; i++) { - juliet_YMF288A(i, ((BYTE *)&psg1.reg)[i]); + juliet_YMF288A(i, ((UINT8 *)&psg1.reg)[i]); } } @@ -123,14 +123,21 @@ static REG8 IOINPCALL ymf_i188(UINT port static REG8 IOINPCALL ymf_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 ymf_i18c(UINT port) { @@ -186,14 +193,14 @@ static void IOOUTCALL ymfr_o18a(UINT por S98_put(NORMAL2608, opn.opnreg, dat); if (opn.opnreg < 0x10) { if (opn.opnreg != 0x0e) { - *((BYTE *)(&psg1.reg) + opn.opnreg) = dat; + *((UINT8 *)(&psg1.reg) + opn.opnreg) = dat; juliet_YMF288A(opn.opnreg, dat); if (opn.opnreg == 0x07) { keydisp_psgmix(&psg1); } else if ((opn.opnreg == 0x08) || (opn.opnreg == 0x09) || (opn.opnreg == 0x0a)) { - keydisp_psgvol(&psg1, (BYTE)(opn.opnreg - 8)); + keydisp_psgvol(&psg1, (UINT8)(opn.opnreg - 8)); } } } @@ -205,7 +212,7 @@ static void IOOUTCALL ymfr_o18a(UINT por if (opn.opnreg == 0x28) { juliet_YMF288A(opn.opnreg, dat); if ((dat & 0x0f) < 3) { - keydisp_fmkeyon((BYTE)(dat & 0x0f), dat); + keydisp_fmkeyon((UINT8)(dat & 0x0f), dat); } else if (((dat & 0x0f) != 3) && ((dat & 0x0f) < 7)) { keydisp_fmkeyon((UINT8)((dat & 0x0f) - 1), dat); @@ -258,7 +265,7 @@ void board118_reset(void) { fmtimer_reset(0xc0); opngen_setcfg(3, OPN_STEREO | 0x038); cs4231io_reset(); - soundrom_load(0xcc000, "118"); + soundrom_load(0xcc000, OEMTEXT("118")); fmboard_extreg(extendchannel); juliet_YMF288Reset(); }