DSPCore: Use std::array to represent ifx_regs

This commit is contained in:
Lioncash 2015-10-01 10:26:16 -04:00
parent 696d6eae09
commit ccc3cd884e
3 changed files with 3 additions and 6 deletions

View File

@ -242,7 +242,7 @@ struct SDSP
std::atomic<u32> mbox[2];
// Accelerator / DMA / other hardware registers. Not GPRs.
u16 ifx_regs[256];
std::array<u16, 256> ifx_regs;
// When state saving, all of the above can just be memcpy'd into the save state.
// The below needs special handling.

View File

@ -21,10 +21,7 @@ static void gdsp_do_dma();
void gdsp_ifx_init()
{
for (int i = 0; i < 256; i++)
{
g_dsp.ifx_regs[i] = 0;
}
g_dsp.ifx_regs.fill(0);
g_dsp.mbox[0].store(0);
g_dsp.mbox[1].store(0);

View File

@ -74,7 +74,7 @@ void DSPLLE::DoState(PointerWrap &p)
}
p.Do(g_dsp.step_counter);
p.Do(g_dsp.ifx_regs);
p.DoArray(g_dsp.ifx_regs);
p.Do(g_dsp.mbox[0]);
p.Do(g_dsp.mbox[1]);
UnWriteProtectMemory(g_dsp.iram, DSP_IRAM_BYTE_SIZE, false);