ym2151 savestates re-re-re-revisited. this time, its perfect - no hacks.
This commit is contained in:
parent
c86f4954de
commit
e2500cda1b
|
@ -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]);
|
||||
}
|
||||
}
|
||||
}*/
|
||||
}
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
|
@ -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]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue