SPU: Fix some registers not being saved to state

This commit is contained in:
Connor McLaughlin 2020-04-08 20:33:39 +10:00
parent 08567fedf4
commit 0006052728
3 changed files with 6 additions and 2 deletions

View File

@ -2,4 +2,4 @@
#include "types.h"
static constexpr u32 SAVE_STATE_MAGIC = 0x43435544;
static constexpr u32 SAVE_STATE_VERSION = 19;
static constexpr u32 SAVE_STATE_VERSION = 20;

View File

@ -105,6 +105,7 @@ bool SPU::DoState(StateWrapper& sw)
sw.Do(&m_key_on_register);
sw.Do(&m_key_off_register);
sw.Do(&m_endx_register);
sw.Do(&m_pitch_modulation_enable_register);
sw.Do(&m_noise_mode_register);
sw.Do(&m_noise_count);
sw.Do(&m_noise_level);
@ -149,6 +150,9 @@ bool SPU::DoState(StateWrapper& sw)
UpdateTransferEvent();
}
//for (u32 i = 0; i < NUM_REVERB_REGS; i++)
//Log_WarningPrintf("Reverb[%u] = 0x%04X", i, m_reverb_registers.rev[i]);
return !sw.HasError();
}

View File

@ -70,7 +70,7 @@ private:
static constexpr u32 CD_AUDIO_SAMPLE_BUFFER_SIZE = 44100 * 2;
static constexpr u32 CAPTURE_BUFFER_SIZE_PER_CHANNEL = 0x400;
static constexpr u32 MINIMUM_TICKS_BETWEEN_KEY_ON_OFF = 2;
static constexpr u32 NUM_REVERB_REGS = 16;
static constexpr u32 NUM_REVERB_REGS = 32;
static constexpr u32 FIFO_SIZE_IN_HALFWORDS = 32;
static constexpr TickCount TRANSFER_TICKS_PER_HALFWORD = 32;