Fixed porting bugs in the z80 that broke running master system games.