mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-29 09:09:52 -06:00
Common/Hash: Namespace code under the Common namespace
Brings more common code under the Common namespace.
This commit is contained in:
@ -64,8 +64,8 @@ static bool VerifyRoms()
|
||||
{0x128ea7a2, 0xa4a575f5},
|
||||
}};
|
||||
|
||||
u32 hash_irom = HashAdler32((u8*)g_dsp.irom, DSP_IROM_BYTE_SIZE);
|
||||
u32 hash_drom = HashAdler32((u8*)g_dsp.coef, DSP_COEF_BYTE_SIZE);
|
||||
const u32 hash_irom = Common::HashAdler32(reinterpret_cast<u8*>(g_dsp.irom), DSP_IROM_BYTE_SIZE);
|
||||
const u32 hash_drom = Common::HashAdler32(reinterpret_cast<u8*>(g_dsp.coef), DSP_COEF_BYTE_SIZE);
|
||||
int rom_idx = -1;
|
||||
|
||||
for (size_t i = 0; i < known_roms.size(); ++i)
|
||||
|
@ -286,7 +286,7 @@ static const u8* gdsp_idma_in(u16 dsp_addr, u32 addr, u32 size)
|
||||
u16* dst = g_dsp.iram + (dsp_addr / 2);
|
||||
|
||||
const u8* code = &g_dsp.cpu_ram[addr & 0x0fffffff];
|
||||
g_dsp.iram_crc = HashEctor(code, size);
|
||||
g_dsp.iram_crc = Common::HashEctor(code, size);
|
||||
|
||||
Common::UnWriteProtectMemory(g_dsp.iram, DSP_IRAM_BYTE_SIZE, false);
|
||||
memcpy(dst, code, size);
|
||||
|
@ -101,8 +101,9 @@ void ROMUCode::HandleMail(u32 mail)
|
||||
|
||||
void ROMUCode::BootUCode()
|
||||
{
|
||||
u32 ector_crc = HashEctor((u8*)HLEMemory_Get_Pointer(m_current_ucode.m_ram_address),
|
||||
m_current_ucode.m_length);
|
||||
const u32 ector_crc =
|
||||
Common::HashEctor(static_cast<u8*>(HLEMemory_Get_Pointer(m_current_ucode.m_ram_address)),
|
||||
m_current_ucode.m_length);
|
||||
|
||||
if (SConfig::GetInstance().m_DumpUCode)
|
||||
{
|
||||
|
@ -182,8 +182,9 @@ void UCodeInterface::PrepareBootUCode(u32 mail)
|
||||
m_needs_resume_mail = true;
|
||||
m_upload_setup_in_progress = false;
|
||||
|
||||
u32 ector_crc =
|
||||
HashEctor((u8*)HLEMemory_Get_Pointer(m_next_ucode.iram_mram_addr), m_next_ucode.iram_size);
|
||||
const u32 ector_crc =
|
||||
Common::HashEctor(static_cast<u8*>(HLEMemory_Get_Pointer(m_next_ucode.iram_mram_addr)),
|
||||
m_next_ucode.iram_size);
|
||||
|
||||
if (SConfig::GetInstance().m_DumpUCode)
|
||||
{
|
||||
|
@ -1426,8 +1426,10 @@ void GetSettings()
|
||||
file_coef.Close();
|
||||
for (u16& entry : coef)
|
||||
entry = Common::swap16(entry);
|
||||
s_DSPiromHash = HashAdler32(reinterpret_cast<u8*>(irom.data()), DSP::DSP_IROM_BYTE_SIZE);
|
||||
s_DSPcoefHash = HashAdler32(reinterpret_cast<u8*>(coef.data()), DSP::DSP_COEF_BYTE_SIZE);
|
||||
s_DSPiromHash =
|
||||
Common::HashAdler32(reinterpret_cast<u8*>(irom.data()), DSP::DSP_IROM_BYTE_SIZE);
|
||||
s_DSPcoefHash =
|
||||
Common::HashAdler32(reinterpret_cast<u8*>(coef.data()), DSP::DSP_COEF_BYTE_SIZE);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
Reference in New Issue
Block a user