DMA controller rewrite