Core: Fix audio issue with save states

This commit is contained in:
zilmar 2022-05-31 23:13:19 +09:30
parent 603ed853bc
commit fae1de846a
2 changed files with 3 additions and 2 deletions

View File

@ -148,7 +148,7 @@ bool AudioInterfaceHandler::Write32(uint32_t Address, uint32_t Value, uint32_t M
SetFrequency(AI_DACRATE_REG, m_System.SystemType());
}
break;
case 0x04500014: AI_DACRATE_REG = (AI_BITRATE_REG & ~Mask) | (MaskedValue); break;
case 0x04500014: AI_BITRATE_REG = (AI_BITRATE_REG & ~Mask) | (MaskedValue); break;
default:
if (HaveDebugger())
{

View File

@ -2090,7 +2090,8 @@ bool CN64System::LoadState(const char * FileName)
Reset(false, true);
m_MMU_VM.UnProtectMemory(0x80000000, 0x80000000 + g_Settings->LoadDword(Game_RDRamSize) - 4);
m_MMU_VM.UnProtectMemory(0xA4000000, 0xA4001FFC);
m_MMU_VM.UnProtectMemory(0xA4000000, 0xA4000FFC);
m_MMU_VM.UnProtectMemory(0xA4001000, 0xA4001FFC);
g_Settings->SaveDword(Game_RDRamSize, SaveRDRAMSize);
unzReadCurrentFile(file, &NextVITimer, sizeof(NextVITimer));
unzReadCurrentFile(file, &m_Reg.m_PROGRAM_COUNTER, sizeof(m_Reg.m_PROGRAM_COUNTER));