wrote memory controller registers and most of the memory controller logic.