feat: handle DMA IRQs (maybe?)

This commit is contained in:
2022-05-05 22:04:59 -03:00
parent d5443d9c2f
commit 9d590b099a
4 changed files with 22 additions and 42 deletions

View File

@@ -267,6 +267,15 @@ pub const Arm7tdmi = struct {
}
}
pub fn handleDMATransfers(self: *Self) void {
while (self.bus.isDmaRunning()) {
if (self.bus.dma[1].step(self)) continue;
if (self.bus.dma[0].step(self)) continue;
if (self.bus.dma[2].step(self)) continue;
if (self.bus.dma[3].step(self)) continue;
}
}
pub fn handleInterrupt(self: *Self) void {
const should_handle = self.bus.io.ie.raw & self.bus.io.irq.raw;