copying buffer. writing was corrupting the rom