Add interrupt controller emulation

This commit is contained in:
Connor McLaughlin
2019-09-17 16:26:00 +10:00
parent c615e007c0
commit 2128a2984b
13 changed files with 271 additions and 19 deletions

View File

@@ -80,6 +80,16 @@ bool Bus::DispatchAccess(PhysicalMemoryAddress cpu_address, PhysicalMemoryAddres
{
return DoRAMAccess<type, size>(bus_address, value);
}
else if (bus_address < INTERRUPT_CONTROLLER_BASE)
{
return DoInvalidAccess(type, size, cpu_address, bus_address, value);
}
else if (bus_address < (INTERRUPT_CONTROLLER_BASE + INTERRUPT_CONTROLLER_SIZE))
{
return (type == MemoryAccessType::Read) ?
DoReadInterruptController(size, bus_address & INTERRUPT_CONTROLLER_MASK, value) :
DoWriteInterruptController(size, bus_address & INTERRUPT_CONTROLLER_MASK, value);
}
else if (bus_address < DMA_BASE)
{
return DoInvalidAccess(type, size, cpu_address, bus_address, value);