DMA: Batch multi-word transfers together

This commit is contained in:
Connor McLaughlin
2019-10-13 16:48:11 +10:00
parent 88ec178380
commit ec8c5d4bb6
12 changed files with 273 additions and 149 deletions

View File

@ -97,14 +97,17 @@ void MDEC::WriteRegister(u32 offset, u32 value)
}
}
u32 MDEC::DMARead()
void MDEC::DMARead(u32* words, u32 word_count)
{
return ReadDataRegister();
// TODO: Make faster
for (u32 i= 0; i < word_count; i++)
words[i] = ReadDataRegister();
}
void MDEC::DMAWrite(u32 value)
void MDEC::DMAWrite(const u32* words, u32 word_count)
{
WriteCommandRegister(value);
for (u32 i = 0; i < word_count; i++)
WriteCommandRegister(words[i]);
}
void MDEC::SoftReset()