--- np2/win9x/board118.c 2004/02/03 08:24:40 1.1 +++ np2/win9x/board118.c 2005/02/07 14:46:14 1.4 @@ -20,15 +20,21 @@ static void romeo_restore(BOOL opna) { for (i=0x30; i<0xa0; i++) { juliet_YMF288A(i, opn.reg[i]); } - for (i=0xb7; i>=0xa0; i--) { - juliet_YMF288A(i, opn.reg[i]); + for (i=0; i<3; i++) { + juliet_YMF288A((UINT8)(i + 0xa4), opn.reg[i + 0x0a4]); + juliet_YMF288A((UINT8)(i + 0xa0), opn.reg[i + 0x0a0]); + juliet_YMF288A((UINT8)(i + 0xb0), opn.reg[i + 0x0b0]); + juliet_YMF288A((UINT8)(i + 0xb4), opn.reg[i + 0x0b4]); } if (opna) { for (i=0x30; i<0xa0; i++) { juliet_YMF288B(i, opn.reg[i + 0x100]); } - for (i=0xb7; i>=0xa0; i--) { - juliet_YMF288B(i, opn.reg[i + 0x100]); + for (i=0; i<3; i++) { + juliet_YMF288B((UINT8)(i + 0xa4), opn.reg[i + 0x1a4]); + juliet_YMF288B((UINT8)(i + 0xa0), opn.reg[i + 0x1a0]); + juliet_YMF288B((UINT8)(i + 0xb0), opn.reg[i + 0x1b0]); + juliet_YMF288B((UINT8)(i + 0xb4), opn.reg[i + 0x1b4]); } juliet_YMF288A(0x11, opn.reg[0x11]); juliet_YMF288A(0x18, opn.reg[0x18]); @@ -39,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]); } } @@ -180,14 +186,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)); } } } @@ -199,7 +205,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); @@ -275,7 +281,7 @@ void board118_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); cbuscore_attachsndex(0x188, ymf_o, ymf_i); } cs4231io_bind();