bugfixes, state load for new mode

git-svn-id: file:///home/notaz/opt/svn/PicoDrive@468 be3aeb3a-fb24-0410-a615-afba39da0efa
This commit is contained in:
notaz 2008-05-27 21:38:46 +00:00
parent 538a6098d4
commit 453d2a6eda
9 changed files with 32 additions and 44 deletions

View file

@ -140,7 +140,7 @@ void PsndRerate(int preserve_state)
if (preserve_state) {
// feed it back it's own registers, just like after loading state
memcpy(YM2612GetRegs(), state, 0x200);
YM2612PicoStateLoad();
ym2612_unpack_state();
if ((PicoAHW & PAHW_MCD) && !(Pico_mcd->s68k_regs[0x36] & 1) && (Pico_mcd->scd.Status_CDC & 1))
cdda_start_play();
}

View file

@ -1863,26 +1863,7 @@ int YM2612PicoTick_(int n)
void YM2612PicoStateLoad_(void)
{
#ifndef EXTERNAL_YM2612
int i, real_A1 = ym2612.addr_A1;
reset_channels( &ym2612.CH[0] );
// feed all the registers and update internal state
for(i = 0; i < 0x100; i++) {
YM2612Write_(0, i);
YM2612Write_(1, ym2612.REGS[i]);
}
for(i = 0; i < 0x100; i++) {
YM2612Write_(2, i);
YM2612Write_(3, ym2612.REGS[i|0x100]);
}
ym2612.addr_A1 = real_A1;
#else
reset_channels( &ym2612.CH[0] );
#endif
}
#ifndef EXTERNAL_YM2612