|
|
| version 1.1, 2004/02/03 08:24:40 | version 1.6, 2005/05/12 17:26:11 |
|---|---|
| Line 20 static void romeo_restore(BOOL opna) { | Line 20 static void romeo_restore(BOOL opna) { |
| for (i=0x30; i<0xa0; i++) { | for (i=0x30; i<0xa0; i++) { |
| juliet_YMF288A(i, opn.reg[i]); | juliet_YMF288A(i, opn.reg[i]); |
| } | } |
| for (i=0xb7; i>=0xa0; i--) { | for (i=0; i<3; i++) { |
| juliet_YMF288A(i, opn.reg[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) { | if (opna) { |
| for (i=0x30; i<0xa0; i++) { | for (i=0x30; i<0xa0; i++) { |
| juliet_YMF288B(i, opn.reg[i + 0x100]); | juliet_YMF288B(i, opn.reg[i + 0x100]); |
| } | } |
| for (i=0xb7; i>=0xa0; i--) { | for (i=0; i<3; i++) { |
| juliet_YMF288B(i, opn.reg[i + 0x100]); | 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(0x11, opn.reg[0x11]); |
| juliet_YMF288A(0x18, opn.reg[0x18]); | juliet_YMF288A(0x18, opn.reg[0x18]); |
| Line 39 static void romeo_restore(BOOL opna) { | Line 45 static void romeo_restore(BOOL opna) { |
| juliet_YMF288A(0x1d, opn.reg[0x1d]); | juliet_YMF288A(0x1d, opn.reg[0x1d]); |
| } | } |
| for (i=0; i<0x0e; i++) { | for (i=0; i<0x0e; i++) { |
| juliet_YMF288A(i, ((BYTE *)&psg1.reg)[i]); | juliet_YMF288A(i, ((UINT8 *)&psg1.reg)[i]); |
| } | } |
| } | } |
| Line 117 static REG8 IOINPCALL ymf_i188(UINT port | Line 123 static REG8 IOINPCALL ymf_i188(UINT port |
| static REG8 IOINPCALL ymf_i18a(UINT port) { | static REG8 IOINPCALL ymf_i18a(UINT port) { |
| (void)port; | |
| if (opn.opnreg == 0x0e) { | if (opn.opnreg == 0x0e) { |
| return(fmboard_getjoy(&psg1)); | return(fmboard_getjoy(&psg1)); |
| } | } |
| else if (opn.opnreg < 0x10) { | else if (opn.opnreg < 0x10) { |
| return(psggen_getreg(&psg1, opn.opnreg)); | 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]); | return(opn.reg[opn.opnreg]); |
| #endif | |
| } | } |
| static REG8 IOINPCALL ymf_i18c(UINT port) { | static REG8 IOINPCALL ymf_i18c(UINT port) { |
| Line 180 static void IOOUTCALL ymfr_o18a(UINT por | Line 193 static void IOOUTCALL ymfr_o18a(UINT por |
| S98_put(NORMAL2608, opn.opnreg, dat); | S98_put(NORMAL2608, opn.opnreg, dat); |
| if (opn.opnreg < 0x10) { | if (opn.opnreg < 0x10) { |
| if (opn.opnreg != 0x0e) { | if (opn.opnreg != 0x0e) { |
| *((BYTE *)(&psg1.reg) + opn.opnreg) = dat; | *((UINT8 *)(&psg1.reg) + opn.opnreg) = dat; |
| juliet_YMF288A(opn.opnreg, dat); | juliet_YMF288A(opn.opnreg, dat); |
| if (opn.opnreg == 0x07) { | if (opn.opnreg == 0x07) { |
| keydisp_psgmix(&psg1); | keydisp_psgmix(&psg1); |
| } | } |
| else if ((opn.opnreg == 0x08) || (opn.opnreg == 0x09) || | else if ((opn.opnreg == 0x08) || (opn.opnreg == 0x09) || |
| (opn.opnreg == 0x0a)) { | (opn.opnreg == 0x0a)) { |
| keydisp_psgvol(&psg1, (BYTE)(opn.opnreg - 8)); | keydisp_psgvol(&psg1, (UINT8)(opn.opnreg - 8)); |
| } | } |
| } | } |
| } | } |
| Line 199 static void IOOUTCALL ymfr_o18a(UINT por | Line 212 static void IOOUTCALL ymfr_o18a(UINT por |
| if (opn.opnreg == 0x28) { | if (opn.opnreg == 0x28) { |
| juliet_YMF288A(opn.opnreg, dat); | juliet_YMF288A(opn.opnreg, dat); |
| if ((dat & 0x0f) < 3) { | if ((dat & 0x0f) < 3) { |
| keydisp_fmkeyon((BYTE)(dat & 0x0f), dat); | keydisp_fmkeyon((UINT8)(dat & 0x0f), dat); |
| } | } |
| else if (((dat & 0x0f) != 3) && ((dat & 0x0f) < 7)) { | else if (((dat & 0x0f) != 3) && ((dat & 0x0f) < 7)) { |
| keydisp_fmkeyon((UINT8)((dat & 0x0f) - 1), dat); | keydisp_fmkeyon((UINT8)((dat & 0x0f) - 1), dat); |
| Line 252 void board118_reset(void) { | Line 265 void board118_reset(void) { |
| fmtimer_reset(0xc0); | fmtimer_reset(0xc0); |
| opngen_setcfg(3, OPN_STEREO | 0x038); | opngen_setcfg(3, OPN_STEREO | 0x038); |
| cs4231io_reset(); | cs4231io_reset(); |
| soundrom_load(0xcc000, "118"); | soundrom_load(0xcc000, OEMTEXT("118")); |
| fmboard_extreg(extendchannel); | fmboard_extreg(extendchannel); |
| juliet_YMF288Reset(); | juliet_YMF288Reset(); |
| } | } |
| Line 275 void board118_bind(void) { | Line 288 void board118_bind(void) { |
| fmboard_rhyrestore(&rhythm, 0); | fmboard_rhyrestore(&rhythm, 0); |
| sound_streamregist(&opngen, (SOUNDCB)opngen_getpcm); | sound_streamregist(&opngen, (SOUNDCB)opngen_getpcm); |
| sound_streamregist(&psg1, (SOUNDCB)psggen_getpcm); | sound_streamregist(&psg1, (SOUNDCB)psggen_getpcm); |
| sound_streamregist(&rhythm, (SOUNDCB)rhythm_getpcm); | rhythm_bind(&rhythm); |
| cbuscore_attachsndex(0x188, ymf_o, ymf_i); | cbuscore_attachsndex(0x188, ymf_o, ymf_i); |
| } | } |
| cs4231io_bind(); | cs4231io_bind(); |