Merge pull request #5 from reenigne/master

Merge newer changes
Partial DMA rewrite using MAME code as a reference.
Merge pull request #16 from Alegend45/master

Merge DMA