diff --git a/src/burn/snd/burn_ym2151.cpp b/src/burn/snd/burn_ym2151.cpp index a3e221b9d..8cc3e5f53 100644 --- a/src/burn/snd/burn_ym2151.cpp +++ b/src/burn/snd/burn_ym2151.cpp @@ -244,12 +244,11 @@ void BurnYM2151Scan(INT32 nAction) SCAN_VAR(nFractionalPosition); SCAN_VAR(nSamplesRendered); - BurnYM2151Scan_int(nAction); // Scan the YM2151's internal registers - // BurnYM2151Scan_int() only links up the default connections - - // therefore the following is necessary to link up user(game)-defined operator connections: - if (nAction & ACB_WRITE) { // Restore the operator connections, see burn_ym2151.h BurnYM2151WriteRegister() for more info. + BurnYM2151Scan_int(nAction); // Properly scan the YM2151's internal registers + + /*if (nAction & ACB_WRITE) { // Restore the operator connections, see burn_ym2151.h BurnYM2151WriteRegister() for more info. for (INT32 i = 0; i < 0x0100; i++) { YM2151WriteReg(0, i, BurnYM2151Registers[i]); } - } + }*/ } diff --git a/src/burn/snd/burn_ym2151.h b/src/burn/snd/burn_ym2151.h index a2f16fe4e..ef14b15ac 100644 --- a/src/burn/snd/burn_ym2151.h +++ b/src/burn/snd/burn_ym2151.h @@ -29,12 +29,12 @@ static inline void BurnYM2151WriteRegister(const UINT8 nValue) #endif extern UINT32 nBurnCurrentYM2151Register; - extern UINT8 BurnYM2151Registers[0x0100]; + /*extern UINT8 BurnYM2151Registers[0x0100]; - if (nBurnCurrentYM2151Register >= 0x20 && + if (nBurnCurrentYM2151Register >= 0x20 && // this is no longer necessary. June 24, 2014 - dink nBurnCurrentYM2151Register <= 0x3F) { // only(!) remember oper connections BurnYM2151Registers[nBurnCurrentYM2151Register] = nValue; - } + }*/ YM2151WriteReg(0, nBurnCurrentYM2151Register, nValue); } diff --git a/src/burn/snd/ym2151.c b/src/burn/snd/ym2151.c index c772f17b9..90496353a 100644 --- a/src/burn/snd/ym2151.c +++ b/src/burn/snd/ym2151.c @@ -1380,7 +1380,7 @@ static void ym2151_postload_refresh(void) { for (j=0; j<8; j++) { - set_connect(&YMPSG[i].oper[j*4], YMPSG[i].connect[j], j); + set_connect(&YMPSG[i].oper[j*4], j, YMPSG[i].connect[j]); } } } @@ -1499,7 +1499,7 @@ static void ym2151_postload_refresh(void) { for (j=0; j<8; j++) { - set_connect(&YMPSG[i].oper[j*4], YMPSG[i].connect[j], j); + set_connect(&YMPSG[i].oper[j*4], j, YMPSG[i].connect[j]); } } }