Merge pull request #758 from cxd4/CIC-DMA-use-SW
Express initial CIC DMA poke in terms of the SW operation.
This commit is contained in:
commit
a0ac5d6d33
|
@ -18,17 +18,26 @@ m_Sram(Sram)
|
|||
|
||||
void CDMA::OnFirstDMA()
|
||||
{
|
||||
int16_t offset;
|
||||
const uint32_t base = 0x00000000;
|
||||
const uint32_t rt = g_MMU->RdramSize();
|
||||
|
||||
switch (g_Rom->CicChipID())
|
||||
{
|
||||
case CIC_NUS_6101: *(uint32_t *)&((g_MMU->Rdram())[0x318]) = g_MMU->RdramSize(); break;
|
||||
case CIC_NUS_5167: *(uint32_t *)&((g_MMU->Rdram())[0x318]) = g_MMU->RdramSize(); break;
|
||||
case CIC_NUS_6101: offset = +0x0318; break;
|
||||
case CIC_NUS_5167: offset = +0x0318; break;
|
||||
case CIC_UNKNOWN:
|
||||
case CIC_NUS_6102: *(uint32_t *)&((g_MMU->Rdram())[0x318]) = g_MMU->RdramSize(); break;
|
||||
case CIC_NUS_6103: *(uint32_t *)&((g_MMU->Rdram())[0x318]) = g_MMU->RdramSize(); break;
|
||||
case CIC_NUS_6105: *(uint32_t *)&((g_MMU->Rdram())[0x3F0]) = g_MMU->RdramSize(); break;
|
||||
case CIC_NUS_6106: *(uint32_t *)&((g_MMU->Rdram())[0x318]) = g_MMU->RdramSize(); break;
|
||||
default: g_Notify->DisplayError(stdstr_f("Unhandled CicChip(%d) in first DMA", g_Rom->CicChipID()).ToUTF16().c_str());
|
||||
case CIC_NUS_6102: offset = +0x0318; break;
|
||||
case CIC_NUS_6103: offset = +0x0318; break;
|
||||
case CIC_NUS_6105: offset = +0x03F0; break;
|
||||
case CIC_NUS_6106: offset = +0x0318; break;
|
||||
default:
|
||||
g_Notify->DisplayError(
|
||||
stdstr_f("Unhandled CicChip(%d) in first DMA", g_Rom->CicChipID()).ToUTF16().c_str()
|
||||
);
|
||||
return;
|
||||
}
|
||||
g_MMU->SW_PAddr(base + offset, rt);
|
||||
}
|
||||
|
||||
void CDMA::PI_DMA_READ()
|
||||
|
|
Loading…
Reference in New Issue